Skip to content

Commit

Permalink
Run MSRV checks only on published packages.
Browse files Browse the repository at this point in the history
  • Loading branch information
xStrom committed Dec 11, 2024
1 parent 8cba448 commit 2d34ecd
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@ env:
# Be sure to also update the rust-version property in the workspace Cargo.toml file,
# plus all the README.md files of the affected packages.
RUST_MIN_VER: "1.81"
# List of packages that will be checked with the minimum supported Rust version.
# This should be limited to packages that are intended for publishing.
RUST_MIN_VER_PKGS: "-p xilem -p xilem_core -p masonry"
# List of packages that can not target Wasm.
NO_WASM_PKGS: "--exclude masonry --exclude xilem"
# Only some of our examples support Android (primarily due to extra required boilerplate).
Expand Down Expand Up @@ -44,6 +41,7 @@ env:
#
# The MSRV jobs run only cargo check because different clippy versions can disagree on goals and
# running tests introduces dev dependencies which may require a higher MSRV than the bare package.
# Checking is limited to packages that are intended for publishing to keep MSRV as low as possible.
#
# If the workspace uses debug_assertions then we verify code twice, with it set to true or false.
# We always keep it true for external dependencies so that we can reuse the cache for faster builds.
Expand Down Expand Up @@ -375,11 +373,11 @@ jobs:
save-if: ${{ github.event_name != 'merge_group' }}

- name: Run cargo check
run: cargo hack check ${{ env.RUST_MIN_VER_PKGS }} --locked --profile ci --optional-deps --each-feature
run: cargo hack check --workspace --ignore-private --locked --profile ci --optional-deps --each-feature

- name: Run cargo check (no debug_assertions)
if: env.USING_DEBUG_ASSERTIONS == 'true'
run: cargo hack check ${{ env.RUST_MIN_VER_PKGS }} --locked --profile ci --optional-deps --each-feature
run: cargo hack check --workspace --ignore-private --locked --profile ci --optional-deps --each-feature
env:
CARGO_PROFILE_CI_DEBUG_ASSERTIONS: "false"

Expand Down Expand Up @@ -407,11 +405,11 @@ jobs:
save-if: ${{ github.event_name != 'merge_group' }}

- name: Run cargo check
run: cargo hack check ${{ env.RUST_MIN_VER_PKGS }} ${{ env.NO_WASM_PKGS }} --locked --profile ci --target wasm32-unknown-unknown --optional-deps --each-feature
run: cargo hack check --workspace --ignore-private ${{ env.NO_WASM_PKGS }} --locked --profile ci --target wasm32-unknown-unknown --optional-deps --each-feature

- name: Run cargo check (no debug_assertions)
if: env.USING_DEBUG_ASSERTIONS == 'true'
run: cargo hack check ${{ env.RUST_MIN_VER_PKGS }} ${{ env.NO_WASM_PKGS }} --locked --profile ci --target wasm32-unknown-unknown --optional-deps --each-feature
run: cargo hack check --workspace --ignore-private ${{ env.NO_WASM_PKGS }} --locked --profile ci --target wasm32-unknown-unknown --optional-deps --each-feature
env:
CARGO_PROFILE_CI_DEBUG_ASSERTIONS: "false"

Expand Down

0 comments on commit 2d34ecd

Please sign in to comment.