@@ -43,24 +43,33 @@ jobs:
4343 target : aarch64-unknown-linux-gnu
4444 - os : macos-latest
4545 target : aarch64-apple-darwin
46+ pre-build-cmd : echo "MACOSX_DEPLOYMENT_TARGET=13.0" >> "$GITHUB_ENV"
4647 - os : macos-13
4748 target : x86_64-apple-darwin
49+ pre-build-cmd : echo "MACOSX_DEPLOYMENT_TARGET=13.0" >> "$GITHUB_ENV"
4850 outputs :
4951 has_secrets : ${{ steps.check_secrets.outputs.has_secrets }}
5052 steps :
5153 - uses : actions/checkout@v4
52- - uses : DeterminateSystems/nix-installer-action@786fff0690178f1234e4e1fe9b536e94f5433196 # v20
53- - uses : DeterminateSystems/magic-nix-cache-action@565684385bcd71bad329742eefe8d12f2e765b39 # v13
54+ - uses : dtolnay/rust-toolchain@stable
55+ - uses : Swatinem/rust-cache@v2
56+
57+ - name : Run pre-build command
58+ if : matrix.pre-build-cmd != ''
59+ run : ${{ matrix.pre-build-cmd }}
60+
61+ # Require Cargo.lock to be up to date and ensure the registry cache is populated
62+ - name : Cargo Fetch (run `cargo generate-lockfile` if this fails)
63+ run : cargo fetch --locked --verbose
5464
5565 - name : Build for ${{ matrix.target }}
56- working-directory : ffi
57- run : nix build .#firewood-ffi
66+ run : cargo build --frozen --profile maxperf --features ethhash,logger --target ${{ matrix.target }} -p firewood-ffi
5867
5968 - name : Upload binary
6069 uses : actions/upload-artifact@v4
6170 with :
6271 name : ${{ matrix.target }}
63- path : ffi/result/lib /libfirewood_ffi.a
72+ path : target/${{ matrix.target }}/maxperf /libfirewood_ffi.a
6473 if-no-files-found : error
6574
6675 - name : Check if FIREWOOD_GO_GITHUB_TOKEN is set
0 commit comments