Skip to content

Commit a2104e3

Browse files
committed
fix(ci): harden native addon builds
Install the Rust target needed for macOS x64 prebuilds and include npm build inputs in the native cache key so CI does not reuse stale binaries.
1 parent 3eef694 commit a2104e3

3 files changed

Lines changed: 11 additions & 8 deletions

File tree

.github/workflows/release.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ jobs:
3030
cache: "npm"
3131
- name: rust
3232
uses: dtolnay/rust-toolchain@stable
33+
- name: rust target (macos x64)
34+
if: ${{ matrix.os == 'macos-latest' && matrix.arch == '--arch x86_64' }}
35+
run: rustup target add x86_64-apple-darwin
3336
- name: MSVC (windows)
3437
uses: ilammy/msvc-dev-cmd@v1
3538
if: contains(matrix.os, 'windows')

.github/workflows/run-all-tests-main.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ jobs:
2121
path: |
2222
packages/fuzzer/prebuilds
2323
key:
24-
fuzzer-cache-${{ runner.os }}-${{
25-
hashFiles('packages/fuzzer/CMakeLists.txt',
26-
'packages/fuzzer/**/*.h', 'packages/fuzzer/**/*.cpp',
27-
'packages/fuzzer/rust/Cargo.toml',
24+
fuzzer-cache-${{ runner.os }}-${{ hashFiles('package-lock.json',
25+
'package.json', 'packages/fuzzer/package.json',
26+
'packages/fuzzer/CMakeLists.txt', 'packages/fuzzer/**/*.h',
27+
'packages/fuzzer/**/*.cpp', 'packages/fuzzer/rust/Cargo.toml',
2828
'packages/fuzzer/rust/Cargo.lock',
2929
'packages/fuzzer/rust/src/**/*.rs') }}
3030
- name: node

.github/workflows/run-all-tests-pr.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,10 @@ jobs:
6363
path: |
6464
packages/fuzzer/prebuilds
6565
key:
66-
fuzzer-cache-${{ matrix.os }}-${{
67-
hashFiles('packages/fuzzer/CMakeLists.txt',
68-
'packages/fuzzer/**/*.h', 'packages/fuzzer/**/*.cpp',
69-
'packages/fuzzer/rust/Cargo.toml',
66+
fuzzer-cache-${{ matrix.os }}-${{ hashFiles('package-lock.json',
67+
'package.json', 'packages/fuzzer/package.json',
68+
'packages/fuzzer/CMakeLists.txt', 'packages/fuzzer/**/*.h',
69+
'packages/fuzzer/**/*.cpp', 'packages/fuzzer/rust/Cargo.toml',
7070
'packages/fuzzer/rust/Cargo.lock',
7171
'packages/fuzzer/rust/src/**/*.rs') }}
7272
- name: node

0 commit comments

Comments
 (0)