From 820449001a6452e1c0ee98d862246535c8151afa Mon Sep 17 00:00:00 2001 From: ReTeamSpeak Date: Tue, 12 May 2026 17:51:23 +0900 Subject: [PATCH] fix(ci): simplify workflow to Ubuntu-only runners for Gitea Actions --- .github/workflows/ci.yml | 82 +++++++++------------------------------- 1 file changed, 17 insertions(+), 65 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index caf1f91..7e4632b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,20 +14,8 @@ env: jobs: # Test job test: - name: Test (${{ matrix.os }}) - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - os: [ubuntu-latest, windows-latest, macos-latest] - include: - - os: ubuntu-latest - target: x86_64-unknown-linux-gnu - - os: windows-latest - target: x86_64-pc-windows-msvc - - os: macos-latest - target: x86_64-apple-darwin - + name: Test + runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 @@ -39,11 +27,10 @@ jobs: echo "$HOME/.cargo/bin" >> "$GITHUB_PATH" export PATH="$HOME/.cargo/bin:$PATH" fi - rustup toolchain install stable --profile minimal --target ${{ matrix.target }} + rustup toolchain install stable --profile minimal --target x86_64-unknown-linux-gnu rustup default stable - - name: Install system dependencies (Linux) - if: runner.os == 'Linux' + - name: Install system dependencies run: | sudo apt-get update sudo apt-get install -y \ @@ -63,9 +50,8 @@ jobs: ~/.cargo/registry ~/.cargo/git src/target - key: ${{ runner.os }}-cargo-${{ hashFiles('src/Cargo.lock') }} - restore-keys: | - ${{ runner.os }}-cargo- + key: linux-cargo-${{ hashFiles('src/Cargo.lock') }} + restore-keys: linux-cargo- - name: Check working-directory: src @@ -106,28 +92,11 @@ jobs: name: frontend-dist path: src/tauri-app/frontend/dist/ - # Build desktop apps + # Build desktop app (Linux only) build-desktop: - name: Build Desktop (${{ matrix.platform }}) + name: Build Desktop (Linux) needs: [test, build-frontend] - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - include: - - os: ubuntu-latest - platform: linux - target: x86_64-unknown-linux-gnu - artifact: linux-amd64 - - os: windows-latest - platform: windows - target: x86_64-pc-windows-msvc - artifact: windows-amd64 - - os: macos-latest - platform: macos - target: x86_64-apple-darwin - artifact: macos-amd64 - + runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 @@ -139,11 +108,10 @@ jobs: echo "$HOME/.cargo/bin" >> "$GITHUB_PATH" export PATH="$HOME/.cargo/bin:$PATH" fi - rustup toolchain install stable --profile minimal --target ${{ matrix.target }} + rustup toolchain install stable --profile minimal --target x86_64-unknown-linux-gnu rustup default stable - - name: Install system dependencies (Linux) - if: matrix.platform == 'linux' + - name: Install system dependencies run: | sudo apt-get update sudo apt-get install -y \ @@ -169,40 +137,24 @@ jobs: ~/.cargo/registry ~/.cargo/git src/target - key: ${{ runner.os }}-cargo-${{ hashFiles('src/Cargo.lock') }} - restore-keys: | - ${{ runner.os }}-cargo- + key: linux-cargo-${{ hashFiles('src/Cargo.lock') }} + restore-keys: linux-cargo- - name: Build working-directory: src run: cargo build --release - - name: Package (Linux) - if: matrix.platform == 'linux' + - name: Package run: | mkdir -p dist cp src/target/release/re-teamspeak dist/ || true - tar -czf re-teamspeak-${{ matrix.artifact }}.tar.gz -C dist . - - - name: Package (Windows) - if: matrix.platform == 'windows' - run: | - mkdir dist - copy src\target\release\re-teamspeak.exe dist\ || copy src\target\release\re_teamspeak.exe dist\ || echo "Binary not found" - Compress-Archive -Path dist\* -DestinationPath re-teamspeak-${{ matrix.artifact }}.zip - - - name: Package (macOS) - if: matrix.platform == 'macos' - run: | - mkdir -p dist - cp src/target/release/re-teamspeak dist/ || true - tar -czf re-teamspeak-${{ matrix.artifact }}.tar.gz -C dist . + tar -czf re-teamspeak-linux-amd64.tar.gz -C dist . - name: Upload artifact uses: actions/upload-artifact@v3 with: - name: re-teamspeak-${{ matrix.artifact }} - path: re-teamspeak-${{ matrix.artifact }}.* + name: re-teamspeak-linux-amd64 + path: re-teamspeak-linux-amd64.* # Release release: