summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel McCarney <daniel@binaryparadox.net>2023-07-13 16:06:49 -0400
committerDaniel McCarney <daniel@binaryparadox.net>2023-07-13 16:49:39 -0400
commitf20d7d943156d3c736dc6b572db1567489b25a02 (patch)
treed289ed3d8ed5b3efbe307c3eff6085bc998f3968
parent4f977fb49c5ca1cda6fa63dfafb68b6b245d3eae (diff)
ci: explicitly pin cbindgen version for diff check.
This commit installs an explicitly pinned version of `cbindgen` before performing the diff check of the `ensure-header-updated` workflow step. Previously we used the version of `cbindgen` that was installed on the base GitHub runner image, which can be hard to match to the version used in local development and may change out from under us. Since there can be non-semantic differences in output between point releases of `cbindgen` that will fail the diff check it's important developers can predict the exact version that will used in CI in order to match it when generating an updated `.h` locally.
-rw-r--r--.github/workflows/test.yaml6
1 files changed, 6 insertions, 0 deletions
diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml
index 19a5df0..438c1da 100644
--- a/.github/workflows/test.yaml
+++ b/.github/workflows/test.yaml
@@ -111,6 +111,12 @@ jobs:
persist-credentials: false
- name: Install nightly rust toolchain
uses: dtolnay/rust-toolchain@nightly
+ - name: Install cbindgen
+ # Pin the installed version of cbindgen so that local usage can be
+ # reliably matched to CI. There can be non-semantic differences in
+ # output between point releases of cbindgen that will fail this check
+ # otherwise.
+ run: cargo install cbindgen --force --version 0.24.5
- run: touch src/lib.rs
- run: cbindgen --version
- run: make src/rustls.h