66 pull_request :
77 branches : [main]
88
9+ # Cancel in-progress runs when a new commit is pushed to the same PR.
10+ # PR: same group per PR so new push cancels previous run. Push to main: unique group so no cancel.
911concurrency :
10- group : ${{ github.workflow }}-${{ github.ref }}
11- cancel-in-progress : true
12+ group : ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
13+ cancel-in-progress : ${{ github.event_name == 'pull_request' }}
1214
1315env :
1416 CARGO_TERM_COLOR : always
1517 RUST_BACKTRACE : 1
1618 # Cache keys for better hit rates
1719 RUST_CACHE_KEY : v1
1820 PLAYWRIGHT_BROWSERS_PATH : ${{ github.workspace }}/.cache/ms-playwright
21+ # Linux: pkg-config must find glib-2.0.pc (set before any cargo step; only used on Linux)
22+ PKG_CONFIG_PATH : /usr/lib/x86_64-linux-gnu/pkgconfig:/usr/lib/pkgconfig:/usr/share/pkgconfig
1923
2024jobs :
2125 # ─────────────────────────────────────────────────────────────
@@ -25,24 +29,36 @@ jobs:
2529 runs-on : ubuntu-latest
2630 steps :
2731 - uses : actions/checkout@v4
28- - uses : dtolnay/rust-toolchain@stable
29- with :
30- components : rustfmt, clippy
31- - uses : Swatinem/rust-cache@v2
3232
3333 - name : Install Linux deps
3434 run : |
3535 sudo apt-get update
36- sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf libsecret-1-dev
36+ sudo apt-get install -y pkg-config libglib2.0-dev libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf libsecret-1-dev
37+ echo "=== Verifying glib-2.0 installation ==="
38+ dpkg -l | grep libglib2.0-dev || echo "libglib2.0-dev not installed"
39+ find /usr -name 'glib-2.0.pc' 2>/dev/null || echo "glib-2.0.pc not found"
40+ pkg-config --modversion glib-2.0 || echo "pkg-config cannot find glib-2.0"
41+ pkg-config --exists 'glib-2.0 >= 2.70' && echo "glib-2.0 >= 2.70 found" || (echo "ERROR: glib-2.0 >= 2.70 not found"; exit 1)
42+ echo "PKG_CONFIG_PATH=$(pkg-config --variable pc_path pkg-config)" >> $GITHUB_ENV
43+
44+ - uses : dtolnay/rust-toolchain@stable
45+ with :
46+ components : rustfmt, clippy
47+
48+ - uses : Swatinem/rust-cache@v2
3749
3850 - name : Format check
3951 run : cargo fmt --all --check
4052
4153 - name : Clippy
4254 run : cargo clippy --workspace -- -D warnings
55+ env :
56+ PKG_CONFIG_PATH : /usr/lib/x86_64-linux-gnu/pkgconfig:/usr/lib/pkgconfig:/usr/share/pkgconfig
4357
4458 - name : Check (no features)
4559 run : cargo check --workspace
60+ env :
61+ PKG_CONFIG_PATH : /usr/lib/x86_64-linux-gnu/pkgconfig:/usr/lib/pkgconfig:/usr/share/pkgconfig
4662
4763 # ─────────────────────────────────────────────────────────────
4864 # TypeScript Checks (fast)
@@ -82,20 +98,27 @@ jobs:
8298 runs-on : ${{ matrix.os }}
8399 steps :
84100 - uses : actions/checkout@v4
101+
102+ - name : Install Linux deps
103+ if : matrix.os == 'ubuntu-latest'
104+ run : |
105+ sudo apt-get update
106+ sudo apt-get install -y pkg-config libglib2.0-dev libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf libsecret-1-dev
107+ echo "=== Verifying glib-2.0 installation ==="
108+ dpkg -l | grep libglib2.0-dev || echo "libglib2.0-dev not installed"
109+ find /usr -name 'glib-2.0.pc' 2>/dev/null || echo "glib-2.0.pc not found"
110+ pkg-config --modversion glib-2.0 || echo "pkg-config cannot find glib-2.0"
111+ pkg-config --exists 'glib-2.0 >= 2.70' && echo "glib-2.0 >= 2.70 found" || (echo "ERROR: glib-2.0 >= 2.70 not found"; exit 1)
112+ echo "PKG_CONFIG_PATH=$(pkg-config --variable pc_path pkg-config)" >> $GITHUB_ENV
113+
85114 - uses : dtolnay/rust-toolchain@stable
86115 with :
87116 targets : ${{ matrix.target }}
117+
88118 - uses : Swatinem/rust-cache@v2
89119 with :
90120 key : ${{ matrix.target }}
91121
92- # Linux dependencies for Tauri
93- - name : Install Linux deps
94- if : matrix.os == 'ubuntu-latest'
95- run : |
96- sudo apt-get update
97- sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf libsecret-1-dev
98-
99122 # Install cargo-nextest
100123 - name : Install nextest
101124 uses : taiki-e/install-action@nextest
@@ -131,9 +154,23 @@ jobs:
131154 runs-on : ${{ matrix.os }}
132155 steps :
133156 - uses : actions/checkout@v4
157+
158+ - name : Install Linux deps
159+ if : matrix.os == 'ubuntu-latest'
160+ run : |
161+ sudo apt-get update
162+ sudo apt-get install -y pkg-config libglib2.0-dev libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf libsecret-1-dev
163+ echo "=== Verifying glib-2.0 installation ==="
164+ dpkg -l | grep libglib2.0-dev || echo "libglib2.0-dev not installed"
165+ find /usr -name 'glib-2.0.pc' 2>/dev/null || echo "glib-2.0.pc not found"
166+ pkg-config --modversion glib-2.0 || echo "pkg-config cannot find glib-2.0"
167+ pkg-config --exists 'glib-2.0 >= 2.70' && echo "glib-2.0 >= 2.70 found" || (echo "ERROR: glib-2.0 >= 2.70 not found"; exit 1)
168+ echo "PKG_CONFIG_PATH=$(pkg-config --variable pc_path pkg-config)" >> $GITHUB_ENV
169+
134170 - uses : dtolnay/rust-toolchain@stable
135171 with :
136172 targets : ${{ matrix.target }}
173+
137174 - uses : Swatinem/rust-cache@v2
138175 with :
139176 key : ${{ matrix.target }}-build
@@ -143,12 +180,6 @@ jobs:
143180 node-version : 20
144181 cache : ' pnpm'
145182
146- - name : Install Linux deps
147- if : matrix.os == 'ubuntu-latest'
148- run : |
149- sudo apt-get update
150- sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf libsecret-1-dev
151-
152183 - run : pnpm install --frozen-lockfile
153184 - run : pnpm build
154185 env :
@@ -215,21 +246,29 @@ jobs:
215246 runs-on : ${{ matrix.os }}
216247 steps :
217248 - uses : actions/checkout@v4
249+
250+ - name : Install Linux deps
251+ if : matrix.os == 'ubuntu-latest'
252+ run : |
253+ sudo apt-get update
254+ sudo apt-get install -y pkg-config libglib2.0-dev libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf libsecret-1-dev webkit2gtk-driver xvfb
255+ echo "=== Verifying glib-2.0 installation ==="
256+ dpkg -l | grep libglib2.0-dev || echo "libglib2.0-dev not installed"
257+ find /usr -name 'glib-2.0.pc' 2>/dev/null || echo "glib-2.0.pc not found"
258+ pkg-config --modversion glib-2.0 || echo "pkg-config cannot find glib-2.0"
259+ pkg-config --exists 'glib-2.0 >= 2.70' && echo "glib-2.0 >= 2.70 found" || (echo "ERROR: glib-2.0 >= 2.70 not found"; exit 1)
260+ echo "PKG_CONFIG_PATH=$(pkg-config --variable pc_path pkg-config)" >> $GITHUB_ENV
261+
218262 - uses : dtolnay/rust-toolchain@stable
219- - uses : Swatinem/rust-cache@v2
220- with :
221- key : ${{ matrix.os }}-e2e
222263 - uses : pnpm/action-setup@v4
223264 - uses : actions/setup-node@v4
224265 with :
225266 node-version : 20
226267 cache : ' pnpm'
227268
228- - name : Install Linux deps
229- if : matrix.os == 'ubuntu-latest'
230- run : |
231- sudo apt-get update
232- sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf libsecret-1-dev webkit2gtk-driver xvfb
269+ - uses : Swatinem/rust-cache@v2
270+ with :
271+ key : ${{ matrix.os }}-e2e
233272
234273 # Cache tauri-driver binary
235274 - name : Cache tauri-driver
0 commit comments