Install cbindgen using a Git commit hash

The hash doubles as a checksum of the code that's downloaded and built. Installing from crates.io doesn't provide equivalent functionality.
This commit is contained in:
Oliver Hamlet
2025-10-01 20:01:52 +01:00
parent 8cfe561712
commit a5cb37f203
+4 -1
View File
@@ -62,6 +62,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/cache@v4
id: cache-cargo
with:
path: |
~/.cargo/bin/
@@ -72,7 +73,8 @@ jobs:
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Install cbindgen
run: cargo install --force cbindgen --version 0.27.0 --locked
run: cargo install --locked --git https://github.com/mozilla/cbindgen --rev 58c6156b0d91e82abb03c26187b8d18fa4345ce0 cbindgen
if: steps.cache-cargo.outputs.cache-hit != 'true'
- name: Install cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov
@@ -111,6 +113,7 @@ jobs:
shell: bash
run: |
cargo build --manifest-path ffi/Cargo.toml
cbindgen --version
cbindgen ffi/ -o ffi/include/loot_condition_interpreter.h
- name: Build and run C++ tests