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,39 @@ 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+
43+ - uses : dtolnay/rust-toolchain@stable
44+ with :
45+ components : rustfmt, clippy
46+ env :
47+ PKG_CONFIG_PATH : /usr/lib/x86_64-linux-gnu/pkgconfig:/usr/lib/pkgconfig:/usr/share/pkgconfig
48+
49+ - uses : Swatinem/rust-cache@v2
50+ env :
51+ PKG_CONFIG_PATH : /usr/lib/x86_64-linux-gnu/pkgconfig:/usr/lib/pkgconfig:/usr/share/pkgconfig
3752
3853 - name : Format check
3954 run : cargo fmt --all --check
4055
4156 - name : Clippy
4257 run : cargo clippy --workspace -- -D warnings
58+ env :
59+ PKG_CONFIG_PATH : /usr/lib/x86_64-linux-gnu/pkgconfig:/usr/lib/pkgconfig:/usr/share/pkgconfig
4360
4461 - name : Check (no features)
4562 run : cargo check --workspace
63+ env :
64+ PKG_CONFIG_PATH : /usr/lib/x86_64-linux-gnu/pkgconfig:/usr/lib/pkgconfig:/usr/share/pkgconfig
4665
4766 # ─────────────────────────────────────────────────────────────
4867 # TypeScript Checks (fast)
@@ -82,20 +101,27 @@ jobs:
82101 runs-on : ${{ matrix.os }}
83102 steps :
84103 - uses : actions/checkout@v4
104+
105+ - name : Install Linux deps
106+ if : matrix.os == 'ubuntu-latest'
107+ run : |
108+ sudo apt-get update
109+ sudo apt-get install -y pkg-config libglib2.0-dev libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf libsecret-1-dev
110+ echo "=== Verifying glib-2.0 installation ==="
111+ dpkg -l | grep libglib2.0-dev || echo "libglib2.0-dev not installed"
112+ find /usr -name 'glib-2.0.pc' 2>/dev/null || echo "glib-2.0.pc not found"
113+ pkg-config --modversion glib-2.0 || echo "pkg-config cannot find glib-2.0"
114+ 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)
115+ echo "PKG_CONFIG_PATH=$(pkg-config --variable pc_path pkg-config)" >> $GITHUB_ENV
116+
85117 - uses : dtolnay/rust-toolchain@stable
86118 with :
87119 targets : ${{ matrix.target }}
120+
88121 - uses : Swatinem/rust-cache@v2
89122 with :
90123 key : ${{ matrix.target }}
91124
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-
99125 # Install cargo-nextest
100126 - name : Install nextest
101127 uses : taiki-e/install-action@nextest
@@ -131,27 +157,39 @@ jobs:
131157 runs-on : ${{ matrix.os }}
132158 steps :
133159 - uses : actions/checkout@v4
160+
161+ - name : Install Linux deps
162+ if : matrix.os == 'ubuntu-latest'
163+ run : |
164+ sudo apt-get update
165+ sudo apt-get install -y pkg-config libglib2.0-dev libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf libsecret-1-dev
166+ echo "=== Verifying glib-2.0 installation ==="
167+ dpkg -l | grep libglib2.0-dev || echo "libglib2.0-dev not installed"
168+ find /usr -name 'glib-2.0.pc' 2>/dev/null || echo "glib-2.0.pc not found"
169+ pkg-config --modversion glib-2.0 || echo "pkg-config cannot find glib-2.0"
170+ 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)
171+
134172 - uses : dtolnay/rust-toolchain@stable
135173 with :
136174 targets : ${{ matrix.target }}
175+ env :
176+ PKG_CONFIG_PATH : /usr/lib/x86_64-linux-gnu/pkgconfig:/usr/lib/pkgconfig:/usr/share/pkgconfig
177+
137178 - uses : Swatinem/rust-cache@v2
138179 with :
139180 key : ${{ matrix.target }}-build
181+ env :
182+ PKG_CONFIG_PATH : /usr/lib/x86_64-linux-gnu/pkgconfig:/usr/lib/pkgconfig:/usr/share/pkgconfig
140183 - uses : pnpm/action-setup@v4
141184 - uses : actions/setup-node@v4
142185 with :
143186 node-version : 20
144187 cache : ' pnpm'
145188
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-
152189 - run : pnpm install --frozen-lockfile
153190 - run : pnpm build
154191 env :
192+ PKG_CONFIG_PATH : /usr/lib/x86_64-linux-gnu/pkgconfig:/usr/lib/pkgconfig:/usr/share/pkgconfig
155193 TAURI_SIGNING_PRIVATE_KEY : ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }}
156194
157195 # ─────────────────────────────────────────────────────────────
@@ -215,21 +253,33 @@ jobs:
215253 runs-on : ${{ matrix.os }}
216254 steps :
217255 - uses : actions/checkout@v4
256+
257+ - name : Install Linux deps
258+ if : matrix.os == 'ubuntu-latest'
259+ run : |
260+ sudo apt-get update
261+ 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
262+ echo "=== Verifying glib-2.0 installation ==="
263+ dpkg -l | grep libglib2.0-dev || echo "libglib2.0-dev not installed"
264+ find /usr -name 'glib-2.0.pc' 2>/dev/null || echo "glib-2.0.pc not found"
265+ pkg-config --modversion glib-2.0 || echo "pkg-config cannot find glib-2.0"
266+ 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)
267+
218268 - uses : dtolnay/rust-toolchain@stable
219- - uses : Swatinem/rust-cache@v2
220- with :
221- key : ${{ matrix.os }}-e2e
269+ env :
270+ PKG_CONFIG_PATH : /usr/lib/x86_64-linux-gnu/pkgconfig:/usr/lib/pkgconfig:/usr/share/pkgconfig
271+
222272 - uses : pnpm/action-setup@v4
223273 - uses : actions/setup-node@v4
224274 with :
225275 node-version : 20
226276 cache : ' pnpm'
227277
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
278+ - uses : Swatinem/rust-cache@v2
279+ with :
280+ key : ${{ matrix.os }}-e2e
281+ env :
282+ PKG_CONFIG_PATH : /usr/lib/x86_64-linux-gnu/pkgconfig:/usr/lib/pkgconfig:/usr/share/pkgconfig
233283
234284 # Cache tauri-driver binary
235285 - name : Cache tauri-driver
@@ -242,12 +292,15 @@ jobs:
242292 - name : Install tauri-driver
243293 if : steps.tauri-driver-cache.outputs.cache-hit != 'true'
244294 run : cargo install tauri-driver --locked
295+ env :
296+ PKG_CONFIG_PATH : /usr/lib/x86_64-linux-gnu/pkgconfig:/usr/lib/pkgconfig:/usr/share/pkgconfig
245297
246298 - run : pnpm install --frozen-lockfile
247299
248300 - name : Build app
249301 run : pnpm build
250302 env :
303+ PKG_CONFIG_PATH : /usr/lib/x86_64-linux-gnu/pkgconfig:/usr/lib/pkgconfig:/usr/share/pkgconfig
251304 TAURI_SIGNING_PRIVATE_KEY : ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }}
252305
253306 - name : Run Tauri E2E tests (Linux)
0 commit comments