From d2dff4ee3208b1e9a9e0101341fe89cf6f6c5ae4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Commaret?= Date: Sun, 18 Jan 2026 16:41:49 +0100 Subject: [PATCH] Remove deprecated GitHub Actions workflows and issue templates --- .github/ISSUE_TEMPLATE/bug_report.md | 38 ---- .github/ISSUE_TEMPLATE/config.yml | 1 - .github/scripts/issue_triage.py | 164 --------------- .github/workflows/CONTRIBUTING.md | 205 ------------------ .github/workflows/README.md | 78 ------- .github/workflows/USAGE.md | 228 --------------------- .github/workflows/build-cli-matrix.yml | 59 ------ .github/workflows/build-darwin-arm64.yml | 49 ----- .github/workflows/check-clean-git-state.sh | 16 -- .github/workflows/publish-artifacts.yml | 74 ------- 10 files changed, 912 deletions(-) delete mode 100644 .github/ISSUE_TEMPLATE/bug_report.md delete mode 100644 .github/ISSUE_TEMPLATE/config.yml delete mode 100644 .github/scripts/issue_triage.py delete mode 100644 .github/workflows/CONTRIBUTING.md delete mode 100644 .github/workflows/README.md delete mode 100644 .github/workflows/USAGE.md delete mode 100644 .github/workflows/build-cli-matrix.yml delete mode 100644 .github/workflows/build-darwin-arm64.yml delete mode 100755 .github/workflows/check-clean-git-state.sh delete mode 100644 .github/workflows/publish-artifacts.yml diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md deleted file mode 100644 index dd84ea78..00000000 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ /dev/null @@ -1,38 +0,0 @@ ---- -name: Bug report -about: Create a report to help us improve -title: '' -labels: '' -assignees: '' - ---- - -**Describe the bug** -A clear and concise description of what the bug is. - -**To Reproduce** -Steps to reproduce the behavior: -1. Go to '...' -2. Click on '....' -3. Scroll down to '....' -4. See error - -**Expected behavior** -A clear and concise description of what you expected to happen. - -**Screenshots** -If applicable, add screenshots to help explain your problem. - -**Desktop (please complete the following information):** - - OS: [e.g. iOS] - - Browser [e.g. chrome, safari] - - Version [e.g. 22] - -**Smartphone (please complete the following information):** - - Device: [e.g. iPhone6] - - OS: [e.g. iOS8.1] - - Browser [e.g. stock browser, safari] - - Version [e.g. 22] - -**Additional context** -Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml deleted file mode 100644 index 3ba13e0c..00000000 --- a/.github/ISSUE_TEMPLATE/config.yml +++ /dev/null @@ -1 +0,0 @@ -blank_issues_enabled: false diff --git a/.github/scripts/issue_triage.py b/.github/scripts/issue_triage.py deleted file mode 100644 index ade435b2..00000000 --- a/.github/scripts/issue_triage.py +++ /dev/null @@ -1,164 +0,0 @@ -#!/usr/bin/env python -from __future__ import annotations -import os, sys, json, datetime, pathlib, textwrap, requests -from openai import OpenAI - -REPO = "voideditor/void" -CACHE_FILE = pathlib.Path(".github/triage_cache.json") -STAMP_FILE = pathlib.Path(".github/last_triage.txt") - -THEMES_MD = textwrap.dedent("""\ -1. 🔗 LLM Integration & Provider Support -2. đŸ–„ App Build & Platform Compatibility -3. 🎯 Prompt, Token, and Cost Management -4. đŸ§© Editor UX & Interaction Design -5. đŸ€– Agent & Automation Features -6. ⚙ System Config & Environment Setup -7. 🗃 Meta: Feature Comparison, Structure, and Naming -""").strip() - -client = OpenAI(api_key=os.environ["OPENAI_API_KEY"]) -headers = {"Authorization": f"Bearer {os.environ['GITHUB_TOKEN']}"} - - -# ───────── helpers ──────────────────────────────────────────────────────── -def utc_iso_now() -> str: - return datetime.datetime.utcnow().replace(microsecond=0, tzinfo=datetime.timezone.utc).isoformat() - -def read_stamp() -> str: - return STAMP_FILE.read_text().strip() if STAMP_FILE.exists() else "1970-01-01T00:00:00Z" - -def save_stamp(): - STAMP_FILE.parent.mkdir(parents=True, exist_ok=True) - STAMP_FILE.write_text(utc_iso_now()) - -def load_cache() -> dict[int, str]: - return json.loads(CACHE_FILE.read_text()) if CACHE_FILE.exists() else {} - -def save_cache(d: dict[int, str]): - CACHE_FILE.parent.mkdir(parents=True, exist_ok=True) - CACHE_FILE.write_text(json.dumps(d, indent=2)) - -def fetch_open_issues(since_iso: str | None = None) -> list[dict]: - issues, page = [], 1 - while True: - url = ( - f"https://api.github.com/repos/{REPO}/issues" - f"?state=open&per_page=100&page={page}" - + (f"&since={since_iso}" if since_iso else "") - ) - chunk = requests.get(url, headers=headers).json() - if not chunk or (isinstance(chunk, dict) and chunk.get("message")): - break - issues.extend(i for i in chunk if "pull_request" not in i) - page += 1 - return issues - - -# ───────── main ─────────────────────────────────────────────────────────── -last_stamp = read_stamp() -changed = fetch_open_issues(since_iso=last_stamp) - -# Fallback if **nothing** changed AND we have *no* existing output -if not changed: - cache_exists = CACHE_FILE.exists() - wiki_exists = pathlib.Path("wiki/Issue-Categories.md").exists() - if not cache_exists or not wiki_exists: - # first run or someone wiped the wiki → build from scratch - print("⏩ First run or empty wiki — fetching ALL open issues.", file=sys.stderr) - changed = fetch_open_issues() # full list - else: - print(f"✅ No issues updated since {last_stamp}. Nothing to classify.", file=sys.stderr) - save_stamp() - sys.exit(0) - -# ---------------------------------------------------------------- prompt -issue_lines = "\n".join(f"- {i['title']} ({i['html_url']})" for i in changed) -prompt = textwrap.dedent(f"""\ -You are an AI assistant helping triage GitHub issues into exactly 7 predefined themes. - -Each issue must go into exactly one of the themes below: - -{THEMES_MD} - -Format your output in Markdown like: -## 🎯 Prompt, Token, and Cost Management -- [#123](https://github.com/org/repo/issues/123) – Title here - -Classify these issues: -{issue_lines} -""") - -resp = client.chat.completions.create( - model="gpt-4.1", - messages=[{"role": "user", "content": prompt}], - temperature=0.2, -) - -md = resp.choices[0].message.content - -# ---------------------------------------------------------------- parse GPT -new_map: dict[int, str] = {} -current = None -for ln in md.splitlines(): - if ln.startswith("##"): - current = ln.lstrip("# ").strip() - elif ln.lstrip().startswith("- [#"): - try: - num = int(ln.split("[#")[1].split("]")[0]) - new_map[num] = current - except Exception: - pass # ignore malformed lines - -cache = load_cache() -cache.update(new_map) -save_cache(cache) -save_stamp() - -# ---------------------------------------------------------------- rebuild wiki -order = [ - "🔗 LLM Integration & Provider Support", - "đŸ–„ App Build & Platform Compatibility", - "🎯 Prompt, Token, and Cost Management", - "đŸ§© Editor UX & Interaction Design", - "đŸ€– Agent & Automation Features", - "⚙ System Config & Environment Setup", - "🗃 Meta: Feature Comparison, Structure, and Naming", -] - -sections: dict[str, list[int]] = {t: [] for t in order} - -# ── fetch ALL current open issues once (PRs filtered out) ──────────────── -title_map: dict[int, tuple[str, str]] = {} -open_now: set[int] = set() - -page = 1 -while True: - batch = fetch_open_issues(since_iso=None) if page == 1 else [] - if not batch: - break - for it in batch: - num = it["number"] - title_map[num] = (it["title"], it["html_url"]) - open_now.add(num) - page += 1 - -# đŸ§č drop any cached IDs that are no longer open issues (e.g., became a PR or were closed) -for stale in set(cache) - open_now: - del cache[stale] -save_cache(cache) # persist cleaned cache - -# build sections from cleaned cache -for num, theme in cache.items(): - if theme in sections: # extra safety - sections[theme].append(num) - -# ---------------------------------------------------------------- print roadmap -for theme in order: - issues = sections[theme] - if issues: - print(f"## {theme}") - for n in sorted(issues): - title, url = title_map.get(n, ("(missing)", f"https://github.com/{REPO}/issues/{n}")) - print(f"- [#{n}]({url}) – {title}") - print() diff --git a/.github/workflows/CONTRIBUTING.md b/.github/workflows/CONTRIBUTING.md deleted file mode 100644 index 8e86bda4..00000000 --- a/.github/workflows/CONTRIBUTING.md +++ /dev/null @@ -1,205 +0,0 @@ -# Contributing to Void GitHub Actions Workflows - -This document provides guidelines for contributing to the GitHub Actions workflows in the Void project. - -## Workflow Structure - -Each workflow file is located in the `.github/workflows/` directory and follows the standard GitHub Actions YAML format. - -## Creating a New Workflow - -To create a new workflow: - -1. **Identify the purpose**: Determine what the workflow should accomplish (build, test, deploy, etc.) -2. **Choose a name**: Use descriptive names like `build.yml`, `test.yml`, `deploy.yml` -3. **Define triggers**: Specify when the workflow should run (push, pull_request, schedule, workflow_dispatch) -4. **Define jobs**: Break down the workflow into logical jobs -5. **Add documentation**: Update the `README.md` in the workflows directory - -## Best Practices - -### 1. Use Reusable Workflows - -When possible, reuse common steps across workflows: - -```yaml -steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Set up Node.js - uses: actions/setup-node@v4 - with: - node-version-file: '.nvmrc' - cache: 'npm' -``` - -### 2. Use Matrix Strategy - -For testing across multiple platforms or versions: - -```yaml -strategy: - matrix: - os: [ubuntu-22.04, macos-12, windows-2022] - node-version: [18, 20] -``` - -### 3. Cache Dependencies - -Always cache dependencies to speed up builds: - -```yaml -- name: Cache node_modules - uses: actions/cache@v3 - with: - path: node_modules - key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} -``` - -### 4. Set Timeouts - -Always set timeouts to prevent workflows from running indefinitely: - -```yaml -runs-on: ubuntu-22.04 -timeout-minutes: 60 -``` - -### 5. Use Environment Variables - -For sensitive data, use GitHub Secrets: - -```yaml -env: - API_KEY: ${{ secrets.API_KEY }} -``` - -### 6. Clean Up Artifacts - -Remove unnecessary files to save storage: - -```yaml -- name: Clean up - run: | - rm -rf node_modules - rm -rf out -``` - -## Testing Workflows - -Before committing a workflow: - -1. **Test locally**: Use `act` (GitHub Actions runner) to test workflows locally -2. **Test in a branch**: Push to a feature branch and verify the workflow runs -3. **Check logs**: Review the workflow logs for any errors or warnings -4. **Verify artifacts**: If the workflow produces artifacts, verify they are correct - -## Common Workflow Patterns - -### Build Workflow - -```yaml -name: Build - -on: - push: - branches: [main] - pull_request: - branches: [main] - -jobs: - build: - runs-on: ubuntu-22.04 - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 - with: - node-version-file: '.nvmrc' - - run: npm ci - - run: npm run build -``` - -### Test Workflow - -```yaml -name: Test - -on: - push: - branches: [main] - pull_request: - branches: [main] - -jobs: - test: - runs-on: ubuntu-22.04 - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 - with: - node-version-file: '.nvmrc' - - run: npm ci - - run: npm test -``` - -### Deployment Workflow - -```yaml -name: Deploy - -on: - push: - tags: - - 'v*' - -jobs: - deploy: - runs-on: ubuntu-22.04 - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 - with: - node-version-file: '.nvmrc' - - run: npm ci - - run: npm run build - - name: Deploy to production - run: ./deploy.sh -``` - -## Workflow Documentation - -Each workflow should be documented in the `README.md` file in the workflows directory. Include: - -- **Purpose**: What the workflow does -- **Triggers**: When it runs -- **Jobs**: What each job does -- **Artifacts**: Any artifacts produced -- **Dependencies**: Required secrets or environment variables - -## Troubleshooting - -### Workflow Not Triggering - -1. Check the `on` section of the workflow -2. Verify the branch name matches -3. Check if the workflow is disabled in the repository settings - -### Workflow Failing - -1. Check the logs for error messages -2. Verify all dependencies are installed -3. Check for permission issues -4. Verify environment variables are set correctly - -### Workflow Running Too Long - -1. Check for infinite loops in the workflow -2. Verify all steps have timeouts -3. Check for hanging processes - -## Resources - -- [GitHub Actions Documentation](https://docs.github.com/en/actions) -- [GitHub Actions Marketplace](https://github.com/marketplace?type=actions) -- [act - Run GitHub Actions locally](https://github.com/nektos/act) diff --git a/.github/workflows/README.md b/.github/workflows/README.md deleted file mode 100644 index f3bf222e..00000000 --- a/.github/workflows/README.md +++ /dev/null @@ -1,78 +0,0 @@ -# GitHub Actions Workflows - -This directory contains the GitHub Actions workflows for building and testing Void. - -## Available Workflows - -### 1. `build.yml` - Main Build Workflow -Builds the main Void application and runs tests. -- **Triggers**: Push to `master` branch, pull requests, manual dispatch -- **Jobs**: - - `compile`: Compiles the project - - `test-unit`: Runs unit tests on Linux - - `test-browser`: Runs browser tests - - `lint`: Runs ESLint and Stylelint - - `hygiene`: Runs hygiene checks - -### 2. `build-cli.yml` - CLI Build Workflow -Builds the Void CLI (written in Rust) on Linux. -- **Triggers**: Push to `master` branch, pull requests, manual dispatch -- **Jobs**: - - `build-cli`: Builds and tests the CLI - -### 2.5. `build-cli-matrix.yml` - CLI Multi-platform Build Workflow -Builds the Void CLI (written in Rust) on multiple platforms. -- **Triggers**: Push to `master` branch, pull requests, manual dispatch -- **Jobs**: - - `build-cli`: Builds and tests the CLI on Ubuntu, macOS, and Windows - -### 3. `build-extensions.yml` - Extensions Build Workflow -Builds the extensions. -- **Triggers**: Push to `master` branch, pull requests, manual dispatch -- **Jobs**: - - `build-extensions`: Compiles all extensions - -### 4. `build-web.yml` - Web Build Workflow -Builds the web version of Void. -- **Triggers**: Push to `master` branch, pull requests, manual dispatch -- **Jobs**: - - `build-web`: Compiles the web version - -### 5. `triage.yml` - Issue Triage Workflow -Automatically triages GitHub issues using AI. -- **Triggers**: Scheduled every 6 hours, manual dispatch -- **Jobs**: - - `roadmap`: Updates the wiki with issue categories - -### 6. `publish-artifacts.yml` - Publish Build Artifacts -Publishes build artifacts for distribution. -- **Triggers**: Manual dispatch, scheduled every Monday at midnight UTC -- **Jobs**: - - `publish-artifacts`: Compiles all components and packages them for distribution - -### 7. `codeql-analysis.yml` - CodeQL Analysis -Performs static code analysis using CodeQL. -- **Triggers**: Push to `master` branch, pull requests, scheduled every Monday at midnight UTC -- **Jobs**: - - `analyze`: Analyzes the codebase for security and quality issues - -## Running Workflows Manually - -You can manually trigger any workflow by going to the GitHub Actions tab in your repository, selecting the workflow, and clicking "Run workflow". - -## Caching - -The workflows use GitHub Actions caching to speed up builds: -- Node.js dependencies are cached using `npm ci` -- Rust dependencies are cached for the CLI build -- Build artifacts are cached when possible - -## Environment - -All workflows run on Ubuntu 22.04 by default, with appropriate build tools installed. - -## Dependencies - -- Node.js version is specified in `.nvmrc` -- Rust toolchain is set to stable -- Build tools: `build-essential`, `pkg-config`, `libx11-dev`, `libx11-xcb-dev`, `libxkbfile-dev`, `libnotify-bin`, `libkrb5-dev` diff --git a/.github/workflows/USAGE.md b/.github/workflows/USAGE.md deleted file mode 100644 index 3cef9d5f..00000000 --- a/.github/workflows/USAGE.md +++ /dev/null @@ -1,228 +0,0 @@ -# Utilisation des Workflows GitHub Actions - -Ce document explique comment utiliser les workflows GitHub Actions pour builder et tester le projet Void. - -## Table des MatiĂšres - -1. [ExĂ©cution des Workflows](#exĂ©cution-des-workflows) -2. [Workflow Principal (build.yml)](#workflow-principal-buildyml) -3. [Build de la CLI](#build-de-la-cli) -4. [Build des Extensions](#build-des-extensions) -5. [Build Web](#build-web) -6. [Publication des Artifacts](#publication-des-artifacts) -7. [Analyse CodeQL](#analyse-codeql) -8. [Triage des Issues](#triage-des-issues) -9. [ExĂ©cution Locale](#exĂ©cution-locale) -10. [DĂ©pannage](#dĂ©pannage) - -## ExĂ©cution des Workflows - -### DĂ©clenchement Automatique - -Tous les workflows sont configurĂ©s pour s'exĂ©cuter automatiquement dans les cas suivants : - -- **Push** sur la branche `master` -- **Pull Request** vers la branche `master` -- **PlanifiĂ©** (pour certains workflows comme `triage.yml` et `codeql-analysis.yml`) - -### DĂ©clenchement Manuel - -Vous pouvez dĂ©clencher manuellement n'importe quel workflow : - -1. Allez dans l'onglet **Actions** de votre dĂ©pĂŽt GitHub -2. SĂ©lectionnez le workflow que vous souhaitez exĂ©cuter -3. Cliquez sur le bouton **Run workflow** -4. Cliquez sur **Run workflow** Ă  nouveau pour confirmer - -## Workflow Principal (build.yml) - -Ce workflow est le cƓur du processus de build et de test. - -### Jobs disponibles : - -- **compile** : Compile le projet -- **test-unit** : ExĂ©cute les tests unitaires sur Linux -- **test-browser** : ExĂ©cute les tests navigateur -- **lint** : ExĂ©cute ESLint et Stylelint -- **hygiene** : ExĂ©cute les vĂ©rifications d'hygiĂšne - -### Comment utiliser : - -```bash -# Pour voir les rĂ©sultats des builds -cd /Users/jcommaret/Sites/void -npm run compile - -# Pour exĂ©cuter les tests unitaires -npm run test-node - -# Pour exĂ©cuter les tests navigateur -npm run playwright-install -npm run test-browser - -# Pour exĂ©cuter le linting -npm run eslint -npm run stylelint - -# Pour exĂ©cuter les vĂ©rifications d'hygiĂšne -npm run hygiene -``` - -## Build de la CLI - -La CLI est Ă©crite en Rust et peut ĂȘtre buildĂ©e sur diffĂ©rentes plateformes. - -### Build sur Linux/macOS/Windows : - -```bash -cd cli -cargo build --release -``` - -### ExĂ©cution des tests : - -```bash -cd cli -cargo test -``` - -### Build multi-plateforme : - -Le workflow `build-cli-matrix.yml` build la CLI sur : -- Ubuntu 22.04 -- macOS 12 -- Windows 2022 - -## Build des Extensions - -Les extensions sont buildĂ©es sĂ©parĂ©ment pour permettre une mise Ă  jour indĂ©pendante. - -### Comment build les extensions : - -```bash -npm run compile-extensions-build -``` - -## Build Web - -La version web de Void peut ĂȘtre buildĂ©e sĂ©parĂ©ment. - -### Comment build la version web : - -```bash -npm run compile-web -``` - -## Publication des Artifacts - -Le workflow `publish-artifacts.yml` compile tous les composants et les package pour distribution. - -### Comment exĂ©cuter manuellement : - -1. Allez dans l'onglet **Actions** -2. SĂ©lectionnez **Publish Build Artifacts** -3. Cliquez sur **Run workflow** - -### Artifacts produits : - -- `out/` : Build principal -- `void-cli-linux` : Binaire CLI pour Linux -- `out-vscode/` : Build web - -## Analyse CodeQL - -Le workflow `codeql-analysis.yml` effectue une analyse statique du code pour dĂ©tecter les problĂšmes de sĂ©curitĂ© et de qualitĂ©. - -### Comment voir les rĂ©sultats : - -1. Allez dans l'onglet **Security** de votre dĂ©pĂŽt -2. SĂ©lectionnez **Code scanning** -3. Vous verrez les alertes dĂ©tectĂ©es par CodeQL - -## Triage des Issues - -Le workflow `triage.yml` utilise l'IA pour trier automatiquement les issues GitHub. - -### Comment configurer : - -Vous devez configurer les secrets suivants dans votre dĂ©pĂŽt : -- `OPENAI_API_KEY` : ClĂ© API OpenAI -- `WIKI_TOKEN` : Token GitHub avec accĂšs wiki - -### Comment exĂ©cuter manuellement : - -1. Allez dans l'onglet **Actions** -2. SĂ©lectionnez **Issue Triage to Wiki** -3. Cliquez sur **Run workflow** - -## ExĂ©cution Locale - -Vous pouvez tester les workflows localement en utilisant `act` (GitHub Actions runner). - -### Installation : - -```bash -brew install act -``` - -### ExĂ©cution d'un workflow : - -```bash -act -j build -``` - -### ExĂ©cution de tous les workflows : - -```bash -act -``` - -## DĂ©pannage - -### ProblĂšme : Le workflow ne se dĂ©clenche pas - -**Solutions** : -1. VĂ©rifiez que le workflow est bien dans `.github/workflows/` -2. VĂ©rifiez la section `on` du workflow YAML -3. VĂ©rifiez que le workflow n'est pas dĂ©sactivĂ© dans les paramĂštres du dĂ©pĂŽt -4. VĂ©rifiez que vous avez les permissions nĂ©cessaires - -### ProblĂšme : Le workflow Ă©choue - -**Solutions** : -1. VĂ©rifiez les logs du workflow pour voir oĂč il Ă©choue -2. VĂ©rifiez que toutes les dĂ©pendances sont installĂ©es -3. VĂ©rifiez que les variables d'environnement sont correctement configurĂ©es -4. VĂ©rifiez que vous avez assez d'espace disque -5. VĂ©rifiez que vous avez assez de mĂ©moire - -### ProblĂšme : Le workflow prend trop de temps - -**Solutions** : -1. VĂ©rifiez que tous les jobs ont des timeouts configurĂ©s -2. VĂ©rifiez qu'il n'y a pas de boucles infinies dans le code -3. VĂ©rifiez que les dĂ©pendances sont bien cachĂ©es -4. VĂ©rifiez que vous n'avez pas de processus qui s'exĂ©cutent indĂ©finiment - -### ProblĂšme : Les artifacts ne sont pas disponibles - -**Solutions** : -1. VĂ©rifiez que le job qui produit les artifacts a rĂ©ussi -2. VĂ©rifiez que les artifacts sont bien configurĂ©s dans le workflow -3. VĂ©rifiez que vous avez les permissions pour tĂ©lĂ©charger les artifacts -4. VĂ©rifiez que les artifacts n'ont pas expirĂ© (durĂ©e de conservation par dĂ©faut : 30 jours) - -## Bonnes Pratiques - -1. **Commitez souvent** : Plus vous commitez souvent, plus les workflows s'exĂ©cutent souvent, ce qui permet de dĂ©tecter les problĂšmes plus tĂŽt -2. **Utilisez des branches de feature** : CrĂ©ez des branches de feature pour dĂ©velopper de nouvelles fonctionnalitĂ©s et utilisez des pull requests pour les fusionner -3. **VĂ©rifiez les workflows avant de fusionner** : Assurez-vous que tous les workflows passent avant de fusionner une pull request -4. **Nettoyez les artifacts** : Supprimez les artifacts inutiles pour Ă©conomiser de l'espace de stockage -5. **Documentez les changements** : Documentez les changements apportĂ©s aux workflows dans les pull requests - -## Ressources - -- [Documentation GitHub Actions](https://docs.github.com/en/actions) -- [Marketplace GitHub Actions](https://github.com/marketplace?type=actions) -- [act - Run GitHub Actions locally](https://github.com/nektos/act) -- [CodeQL Documentation](https://codeql.github.com/docs/) diff --git a/.github/workflows/build-cli-matrix.yml b/.github/workflows/build-cli-matrix.yml deleted file mode 100644 index 0c89c04d..00000000 --- a/.github/workflows/build-cli-matrix.yml +++ /dev/null @@ -1,59 +0,0 @@ -name: Build CLI - -on: - push: - branches: [ "master" ] - pull_request: - branches: [ "master" ] - workflow_dispatch: - -jobs: - build-cli: - name: Build CLI (macOS) - runs-on: macos-12 - timeout-minutes: 60 - defaults: - run: - working-directory: cli - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Check clean git state - run: .github/workflows/check-clean-git-state.sh - - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: '3.11' - - - name: Set up Rust - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - profile: minimal - override: true - - - name: Cache Cargo dependencies - uses: actions/cache@v3 - with: - path: | - ~/.cargo/registry - ~/.cargo/git - cli/target - key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} - - - name: Build CLI - run: | - cargo build --release - - - name: Run CLI tests - run: | - cargo test - - - name: Upload artifact - uses: actions/upload-artifact@v4 - with: - name: code-cli-macos - path: cli/target/release/code - diff --git a/.github/workflows/build-darwin-arm64.yml b/.github/workflows/build-darwin-arm64.yml deleted file mode 100644 index faf623b9..00000000 --- a/.github/workflows/build-darwin-arm64.yml +++ /dev/null @@ -1,49 +0,0 @@ -name: Build Void for macOS (ARM64) - -on: - push: - branches: [ "master" ] - pull_request: - branches: [ "master" ] - workflow_dispatch: - -jobs: - build: - runs-on: macos-latest - timeout-minutes: 60 - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Set up Node.js - uses: actions/setup-node@v4 - with: - node-version: '22' - cache: 'npm' - - - name: Install dependencies - run: npm install - - - name: Install stable TypeScript version - run: npm install typescript@5.4.5 --save-dev - - - name: Start gulp watch in background - run: npm run gulp watch & - env: - NODE_ENV: development - - - name: Wait for monaco.d.ts to be generated - run: sleep 180 - - - name: Build React - run: npm run buildreact - - - name: Build for macOS ARM64 - run: npm run gulp vscode-darwin-arm64 - - - name: Upload artifact - uses: actions/upload-artifact@v4 - with: - name: void-darwin-arm64 - path: out-vscode/ - retention-days: 7 diff --git a/.github/workflows/check-clean-git-state.sh b/.github/workflows/check-clean-git-state.sh deleted file mode 100755 index 52cb83b6..00000000 --- a/.github/workflows/check-clean-git-state.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash - -# Check if git status is clean (no uncommitted changes) -if ! git diff --quiet --ignore-submodules HEAD; then - echo "Error: Uncommitted changes detected in the repository" - git status - exit 1 -fi - -if ! git diff --quiet --cached --ignore-submodules HEAD; then - echo "Error: Uncommitted staged changes detected in the repository" - git status - exit 1 -fi - -echo "Git status is clean" diff --git a/.github/workflows/publish-artifacts.yml b/.github/workflows/publish-artifacts.yml deleted file mode 100644 index eb75159a..00000000 --- a/.github/workflows/publish-artifacts.yml +++ /dev/null @@ -1,74 +0,0 @@ -name: Publish Build Artifacts - -on: - workflow_dispatch: - schedule: - - cron: '0 0 * * 1' # Every Monday at midnight UTC - -jobs: - publish-artifacts: - name: Publish Build Artifacts - runs-on: ubuntu-22.04 - timeout-minutes: 120 - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Set up Node.js - uses: actions/setup-node@v4 - with: - node-version-file: '.nvmrc' - cache: 'npm' - - - name: Install dependencies - run: | - npm ci - env: - ELECTRON_SKIP_BINARY_DOWNLOAD: 1 - PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1 - - - name: Install build tools - run: | - sudo apt update -y - sudo apt install -y build-essential pkg-config libx11-dev libx11-xcb-dev libxkbfile-dev libnotify-bin libkrb5-dev - - - name: Compile - run: | - npm run compile - - - name: Build extensions - run: | - npm run compile-extensions-build - - - name: Build web version - run: | - npm run compile-web - - - name: Build CLI - working-directory: cli - run: | - cargo build --release - - - name: Package artifacts - run: | - # Create a directory for artifacts - mkdir -p artifacts - - # Copy main build artifacts - cp -r out/ artifacts/out/ - - # Copy CLI binary - cp cli/target/release/void artifacts/void-cli-linux - - # Copy web build - cp -r out-vscode/ artifacts/out-vscode/ - - # Create a zip file - zip -r void-artifacts.zip artifacts/ - - - name: Upload artifacts - uses: actions/upload-artifact@v3 - with: - name: void-build-artifacts - path: void-artifacts.zip - retention-days: 30