diff options
| author | 2026-01-14 20:58:31 +0800 | |
|---|---|---|
| committer | 2026-01-14 20:58:31 +0800 | |
| commit | 18c123fcd0ed42bcd6e9ac68204106d31efd041d (patch) | |
| tree | 569cd89b9fb40ffe56e4f862e0c6be7962b26134 /.github/workflows/test.yml | |
| parent | ec09a0bc05ebc2bf23155a79690e51ef977db9dc (diff) | |
| download | DropOut-18c123fcd0ed42bcd6e9ac68204106d31efd041d.tar.gz DropOut-18c123fcd0ed42bcd6e9ac68204106d31efd041d.zip | |
feat: enhance testing workflow with Arch Linux Wayland support and improved environment setup
Diffstat (limited to '.github/workflows/test.yml')
| -rw-r--r-- | .github/workflows/test.yml | 39 |
1 files changed, 35 insertions, 4 deletions
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b5311c9..e7868f5 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -15,23 +15,54 @@ env: jobs: test: - name: Test on ${{ matrix.platform }} + name: Test on ${{ matrix.name }} runs-on: ${{ matrix.platform }} + container: + image: ${{ matrix.container }} + options: --user root strategy: fail-fast: false matrix: # On Push: Linux only. On PR: All platforms. - platform: ${{ (github.event_name == 'pull_request') && fromJson('["ubuntu-22.04", "windows-latest", "macos-14"]') || fromJson('["ubuntu-22.04"]') }} + include: + - platform: "ubuntu-22.04" + name: "Ubuntu 22.04" + - platform: "ubuntu-22.04" + name: "Arch Linux (Wayland)" + container: "archlinux:latest" + wayland: true + - platform: "windows-latest" + name: "Windows" + pr_only: true + - platform: "macos-14" + name: "macOS" + pr_only: true + # Exclude PR-only platforms on push events + if: (!matrix.pr_only || github.event_name == 'pull_request') steps: - uses: actions/checkout@v4 - - name: Install Dependencies (Linux) - if: runner.os == 'Linux' + - name: Install Dependencies (Ubuntu) + if: runner.os == 'Linux' && !matrix.wayland run: | sudo apt-get update sudo apt-get install -y libwebkit2gtk-4.1-dev build-essential curl wget file libssl-dev libgtk-3-dev libayatana-appindicator3-dev librsvg2-dev + - name: Install Dependencies (Arch Linux) + if: matrix.wayland + run: | + pacman -Syu --noconfirm + pacman -S --noconfirm webkit2gtk-4.1 base-devel curl wget file openssl gtk3 + + - name: Setup Wayland Environment (Arch) + if: matrix.wayland + run: | + echo "WAYLAND_DISPLAY=wayland-1" >> $GITHUB_ENV + echo "GDK_BACKEND=wayland" >> $GITHUB_ENV + echo "XDG_SESSION_TYPE=wayland" >> $GITHUB_ENV + echo "Wayland test environment configured" + - name: Install Rust uses: dtolnay/rust-toolchain@stable |