From 566d95d81bde03edee3769cffb8860830c980463 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Armando=20P=C3=A9rez=20Marqu=C3=A9s?= Date: Sun, 16 Jan 2022 12:29:28 -0700 Subject: [PATCH] ci: Add jobs for `cargo check` with all features and no features (#3440) * ci: Add jobs for `cargo check` with all features and no features Augmenting #3435: These jobs will check that compilation still succeeds when no features are selected and with all features selected. So when in the future new features are added, these quick checks can prevent miss-compilation for users that like to tweak with feature sets. * (fixup) More descriptive job names * ci: Make the new `cargo_check_*` jobs depend on `cargo_check` --- .github/workflows/workflow.yml | 44 ++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 19f25a3c..46b2e577 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -85,6 +85,50 @@ jobs: - name: Build | Check run: cargo check --workspace --locked + # Ensure that the project could be successfully compiled with no features enabled + cargo_check_no_features: + name: Compile with no features enabled + needs: cargo_check + runs-on: ubuntu-latest + steps: + - name: Setup | Checkout + uses: actions/checkout@v2.4.0 + + - name: Setup | Cache + uses: Swatinem/rust-cache@v1 + + - name: Setup | Rust + uses: actions-rs/toolchain@v1.0.7 + with: + toolchain: stable + profile: minimal + override: true + + - name: Build | Check + run: cargo check --workspace --locked --no-default-features + + # Ensure that the project could be successfully compiled with all features enabled + cargo_check_all_features: + name: Compile with all features enabled + needs: cargo_check + runs-on: ubuntu-latest + steps: + - name: Setup | Checkout + uses: actions/checkout@v2.4.0 + + - name: Setup | Cache + uses: Swatinem/rust-cache@v1 + + - name: Setup | Rust + uses: actions-rs/toolchain@v1.0.7 + with: + toolchain: stable + profile: minimal + override: true + + - name: Build | Check + run: cargo check --workspace --locked --all-features + # Run tests on Linux, macOS, and Windows # On both Rust stable and Rust nightly test: