Skip to content

Commit fc3683c

Browse files
committed
fix(e2e): gate build-skip on BOTH binary + CEF cache hits
The CEF cache step's path was wrong (pointed at the platform-default ~/.cache/tauri-cef while cef-dll-sys actually writes to ~/Library/Caches/tauri-cef). I just fixed the path, but the *first* run on the new path will be a cache miss. If the binary cache hits and the CEF cache misses, the build step is skipped — leaving no libcef.so on Linux / no libcef.dll on Windows, and the runner fails at launch. Gate the build-skip condition on BOTH caches hitting. Bump the CEF cache key to v2 since the path moved (any stale empty cache at the old path would otherwise restore as a no-op and look like a hit). Mac is unaffected — the .app bundle is self-contained with CEF Frameworks embedded, so binary cache alone is sufficient there.
1 parent fe76ed3 commit fc3683c

1 file changed

Lines changed: 13 additions & 6 deletions

File tree

.github/workflows/e2e-reusable.yml

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,7 @@ jobs:
223223
key: e2e-linux-unified
224224

225225
- name: Cache CEF binary distribution
226+
id: cef-cache
226227
uses: actions/cache@v5
227228
with:
228229
# e2e-build.sh + ensure-tauri-cli.sh always export
@@ -232,9 +233,9 @@ jobs:
232233
# short-circuit skips the build step.
233234
path: |
234235
~/Library/Caches/tauri-cef
235-
key: cef-x86_64-unknown-linux-gnu-${{ hashFiles('app/src-tauri/Cargo.toml') }}
236+
key: cef-x86_64-unknown-linux-gnu-v2-${{ hashFiles('app/src-tauri/Cargo.toml') }}
236237
restore-keys: |
237-
cef-x86_64-unknown-linux-gnu-
238+
cef-x86_64-unknown-linux-gnu-v2-
238239
239240
- name: Cache Appium global install
240241
uses: actions/cache@v5
@@ -273,8 +274,11 @@ jobs:
273274
app/dist
274275
key: e2e-binary-${{ runner.os }}-${{ hashFiles('src/**/*.rs', 'app/src-tauri/src/**', 'app/src-tauri/build.rs', 'app/src-tauri/tauri.conf.json', 'Cargo.lock', 'app/src-tauri/Cargo.lock', 'app/src-tauri/vendor/tauri-cef/Cargo.lock', 'rust-toolchain.toml', 'app/src/**', 'app/index.html', 'app/vite.config.*', 'app/tailwind.config.*', 'app/postcss.config.*', 'app/package.json', 'pnpm-lock.yaml', 'app/scripts/e2e-build.sh') }}
275276

277+
# Skip the (slow) build only when BOTH the binary AND the CEF runtime
278+
# caches hit — having the binary without libcef makes the runner fail
279+
# with 'libcef.so: cannot open shared object file' at launch.
276280
- name: Build E2E app
277-
if: steps.e2e-binary-cache.outputs.cache-hit != 'true'
281+
if: steps.e2e-binary-cache.outputs.cache-hit != 'true' || steps.cef-cache.outputs.cache-hit != 'true'
278282
run: pnpm --filter openhuman-app test:e2e:build
279283

280284
- name: Run E2E shard (${{ matrix.shard.name }} — suites=${{ matrix.shard.suites }})
@@ -741,6 +745,7 @@ jobs:
741745
key: e2e-windows-unified
742746

743747
- name: Cache CEF binary distribution
748+
id: cef-cache
744749
uses: actions/cache@v5
745750
with:
746751
# ensure-tauri-cli.sh + e2e-build.sh both export
@@ -749,9 +754,9 @@ jobs:
749754
# is the actual download target.
750755
path: |
751756
~/Library/Caches/tauri-cef
752-
key: cef-x86_64-pc-windows-msvc-${{ hashFiles('app/src-tauri/Cargo.toml') }}
757+
key: cef-x86_64-pc-windows-msvc-v2-${{ hashFiles('app/src-tauri/Cargo.toml') }}
753758
restore-keys: |
754-
cef-x86_64-pc-windows-msvc-
759+
cef-x86_64-pc-windows-msvc-v2-
755760
756761
- name: Cache Appium global install
757762
uses: actions/cache@v5
@@ -791,8 +796,10 @@ jobs:
791796
app/dist
792797
key: e2e-binary-${{ runner.os }}-${{ hashFiles('src/**/*.rs', 'app/src-tauri/src/**', 'app/src-tauri/build.rs', 'app/src-tauri/tauri.conf.json', 'Cargo.lock', 'app/src-tauri/Cargo.lock', 'app/src-tauri/vendor/tauri-cef/Cargo.lock', 'rust-toolchain.toml', 'app/src/**', 'app/index.html', 'app/vite.config.*', 'app/tailwind.config.*', 'app/postcss.config.*', 'app/package.json', 'pnpm-lock.yaml', 'app/scripts/e2e-build.sh') }}
793798

799+
# Skip the build only when BOTH the binary AND the CEF runtime caches
800+
# hit (see Linux full job for the rationale).
794801
- name: Build E2E app
795-
if: steps.e2e-binary-cache.outputs.cache-hit != 'true'
802+
if: steps.e2e-binary-cache.outputs.cache-hit != 'true' || steps.cef-cache.outputs.cache-hit != 'true'
796803
run: pnpm --filter openhuman-app test:e2e:build
797804

798805
- name: Run E2E shard (${{ matrix.shard.name }} — suites=${{ matrix.shard.suites }})

0 commit comments

Comments
 (0)