1
0
mirror of https://github.com/Llewellynvdm/starship.git synced 2024-11-28 15:56:28 +00:00

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`
This commit is contained in:
Armando Pérez Marqués 2022-01-16 12:29:28 -07:00 committed by GitHub
parent 7e32fd952e
commit 566d95d81b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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: