-
Notifications
You must be signed in to change notification settings - Fork 124
Closed
Labels
compatibility-nonbreakingChanges that are (likely to be) non-breakingChanges that are (likely to be) non-breakingexperience-mediumThis issue is of medium difficulty, and requires some experienceThis issue is of medium difficulty, and requires some experiencehelp wantedExtra attention is neededExtra attention is needed
Description
We use cargo-semver-checks-action
in CI to ensure we do not accidentally break semver compatibility:
zerocopy/.github/workflows/ci.yml
Lines 244 to 264 in 0ff2dd1
# 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' |
This check occurs within our build matrix, so it's re-run for each target
:
zerocopy/.github/workflows/ci.yml
Lines 41 to 53 in 0ff2dd1
target: [ | |
"i686-unknown-linux-gnu", | |
"x86_64-unknown-linux-gnu", | |
"arm-unknown-linux-gnueabi", | |
"aarch64-unknown-linux-gnu", | |
"powerpc-unknown-linux-gnu", | |
"powerpc64-unknown-linux-gnu", | |
"riscv64gc-unknown-linux-gnu", | |
"mips-unknown-linux-gnu", | |
"mips64-unknown-linux-gnuabi64", | |
"s390x-unknown-linux-gnu", | |
"wasm32-wasi" | |
] |
However, we aren't actually making use of target
, meaning we are re-running the exact same check 11 times on the Github Actions host target (x86_64-unknown-linux-gnu
).
We need to modify this CI job to respect the value of target
. To do this, see here: obi1kenobi/cargo-semver-checks-action#54 (comment)
Metadata
Metadata
Assignees
Labels
compatibility-nonbreakingChanges that are (likely to be) non-breakingChanges that are (likely to be) non-breakingexperience-mediumThis issue is of medium difficulty, and requires some experienceThis issue is of medium difficulty, and requires some experiencehelp wantedExtra attention is neededExtra attention is needed