Skip to content

Commit

Permalink
[CI] Use cargo-semver-checks to check compat in CI (#351)
Browse files Browse the repository at this point in the history
We run the checks in the matrix so that we can run once for each target
platform, although we don't yet actually make use of the target, so
we're just running the same job repeatedly for the native target (ie,
x86_64). I'm not yet sure how to run for different targets or whether
it's even supported (I've filed [1] to ask).

[1] obi1kenobi/cargo-semver-checks-action#54
  • Loading branch information
joshlf authored Sep 8, 2023
1 parent a494e2b commit 12e7fac
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,28 @@ jobs:
# `alloc` feature.
if: matrix.features != '' && matrix.features != '--no-default-features'

# Check semver compatibility with the most recently-published version on
# crates.io. We do this in the matrix rather than in its own job so that it
# gets run on different targets. Some of our API is target-specific (e.g.,
# SIMD type impls), and so we need to run on each target.
#
# TODO(https://github.com/obi1kenobi/cargo-semver-checks-action/issues/54):
# Currently we don't actually do anything with `matrix.target`, so we're
# just duplicating work by running this job multiple times, each time
# targetting the host platform.
- name: Check semver compatibility
uses: obi1kenobi/cargo-semver-checks-action@v2
with:
# Don't semver check zerocopy-derive; as a proc macro, it doesn't have
# an API that cargo-semver-checks can understand.
package: zerocopy
feature-group: all-features
# TODO: Set this to the specific nightly we have pinned in CI. Not a big
# deal since this isn't affected by the trybuild stderr files, which is
# the reason we need to pin to a specific nightly.
rust-toolchain: nightly
if: matrix.crate == 'zerocopy' && matrix.features == '--all-features' && matrix.toolchain == 'nightly'

check_fmt:
runs-on: ubuntu-latest
name: Check Rust formatting
Expand Down

0 comments on commit 12e7fac

Please sign in to comment.