From af59df8107bba1c0cc39051b5834675e07268013 Mon Sep 17 00:00:00 2001 From: Kaur Kuut Date: Thu, 31 Oct 2024 15:27:52 +0200 Subject: [PATCH] Add `--ignore-unknown-features` to the CI. (#58) Having this flag enables the CI to continue working if the workspace gets a package that doesn't have e.g. the `std` feature. This brings it in sync with the latest Linebender standard, see e.g. [parley](https://github.com/linebender/parley/blob/09f7e6dc4acd12316c25bc0d8684a3da6234fea8/.github/workflows/ci.yml#L103). --- .github/workflows/ci.yml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1062cbe..5578a95 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -41,16 +41,16 @@ env: # and as such will error out if our dependency tree accidentally tries to use std. # https://doc.rust-lang.org/stable/rustc/platform-support/x86_64-unknown-none.html # -# We don't save caches in the merge-group cases, because those caches will never be re-used (apart +# We don't save caches in the merge-group cases, because those caches will never be re-used (apart # from the very rare cases where there are multiple PRs in the merge queue). -# This is because GitHub doesn't share caches between merge queues and `main`. +# This is because GitHub doesn't share caches between merge queues and the main branch. name: CI on: pull_request: merge_group: - # We run on push, even though the commit is the same as when we ran in merge_group. + # We run on push, even though the commit is the same as when we ran in merge_group. # This allows the cache to be primed. # See https://github.com/orgs/community/discussions/66430 push: @@ -108,13 +108,13 @@ jobs: tool: cargo-hack - name: cargo clippy (no_std) - run: cargo hack clippy --workspace --locked --optional-deps --each-feature --features libm --exclude-features ${{ env.FEATURES_DEPENDING_ON_STD }} --target x86_64-unknown-none -- -D warnings + run: cargo hack clippy --workspace --locked --optional-deps --each-feature --ignore-unknown-features --features libm --exclude-features ${{ env.FEATURES_DEPENDING_ON_STD }} --target x86_64-unknown-none -- -D warnings - name: cargo clippy - run: cargo hack clippy --workspace --locked --optional-deps --each-feature --features std -- -D warnings + run: cargo hack clippy --workspace --locked --optional-deps --each-feature --ignore-unknown-features --features std -- -D warnings - name: cargo clippy (auxiliary) - run: cargo hack clippy --workspace --locked --optional-deps --each-feature --features std --tests --benches --examples -- -D warnings + run: cargo hack clippy --workspace --locked --optional-deps --each-feature --ignore-unknown-features --features std --tests --benches --examples -- -D warnings clippy-stable-wasm: name: cargo clippy (wasm32) @@ -140,10 +140,10 @@ jobs: tool: cargo-hack - name: cargo clippy - run: cargo hack clippy --workspace --locked --target wasm32-unknown-unknown --optional-deps --each-feature --features std -- -D warnings + run: cargo hack clippy --workspace --locked --target wasm32-unknown-unknown --optional-deps --each-feature --ignore-unknown-features --features std -- -D warnings - name: cargo clippy (auxiliary) - run: cargo hack clippy --workspace --locked --target wasm32-unknown-unknown --optional-deps --each-feature --features std --tests --benches --examples -- -D warnings + run: cargo hack clippy --workspace --locked --target wasm32-unknown-unknown --optional-deps --each-feature --ignore-unknown-features --features std --tests --benches --examples -- -D warnings test-stable: name: cargo test @@ -214,10 +214,10 @@ jobs: tool: cargo-hack - name: cargo check (no_std) - run: cargo hack check ${{ env.RUST_MIN_VER_PKGS }} --locked --optional-deps --each-feature --features libm --exclude-features ${{ env.FEATURES_DEPENDING_ON_STD }} --target x86_64-unknown-none + run: cargo hack check ${{ env.RUST_MIN_VER_PKGS }} --locked --optional-deps --each-feature --ignore-unknown-features --features libm --exclude-features ${{ env.FEATURES_DEPENDING_ON_STD }} --target x86_64-unknown-none - name: cargo check - run: cargo hack check ${{ env.RUST_MIN_VER_PKGS }} --locked --optional-deps --each-feature --features std + run: cargo hack check ${{ env.RUST_MIN_VER_PKGS }} --locked --optional-deps --each-feature --ignore-unknown-features --features std check-msrv-wasm: name: cargo check (msrv) (wasm32) @@ -242,7 +242,7 @@ jobs: tool: cargo-hack - name: cargo check - run: cargo hack check ${{ env.RUST_MIN_VER_PKGS }} --locked --target wasm32-unknown-unknown --optional-deps --each-feature --features std + run: cargo hack check ${{ env.RUST_MIN_VER_PKGS }} --locked --target wasm32-unknown-unknown --optional-deps --each-feature --ignore-unknown-features --features std doc: name: cargo doc