Strip down the required features for various libraries #327
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
schedule: | |
- cron: '0 0 1 * *' | |
name: Continuous integration | |
jobs: | |
test: | |
name: Test suite | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
rust: | |
- stable | |
- beta | |
- nightly | |
- 1.68.2 | |
steps: | |
- uses: actions/[email protected] | |
- uses: dtolnay/rust-toolchain@stable | |
with: | |
toolchain: ${{ matrix.rust }} | |
components: clippy, rustfmt | |
- uses: Swatinem/[email protected] | |
- name: Check formatting | |
run: cargo fmt -- --check | |
if: ${{ matrix.rust == 'nightly' }} | |
- name: Clippy | |
run: cargo clippy | |
env: | |
RUSTFLAGS: -Dwarnings | |
continue-on-error: ${{ matrix.rust == 'nightly' || matrix.rust == 'beta' }} | |
- name: Install cargo-binstall | |
run: | | |
curl --location --remote-name https://github.com/ryankurte/cargo-binstall/releases/download/v0.11.1/cargo-binstall-x86_64-unknown-linux-musl.tgz | |
tar -zxvf cargo-binstall-x86_64-unknown-linux-musl.tgz | |
mv cargo-binstall ~/.cargo/bin | |
ls -l ~/.cargo/bin | |
- name: Install "build all features" | |
run: cargo binstall cargo-all-features --no-confirm --version 1.7.0 | |
- name: Build all features | |
run: cargo build-all-features | |
- name: Test all features | |
run: cargo test-all-features | |
env: | |
RUST_TEST_THREADS: 3 # So the parallel tests have enough threads | |
RUST_LOG: debug | |
multi-os-testing: | |
name: Test suite | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: | |
- windows-latest | |
- macos-latest | |
steps: | |
- uses: actions/[email protected] | |
- uses: dtolnay/rust-toolchain@stable | |
with: | |
toolchain: stable | |
- uses: Swatinem/[email protected] | |
- name: Build and test | |
run: cargo test --all-features -- --nocapture | |
env: | |
RUST_TEST_THREADS: 3 # So the parallel tests have enough threads | |
RUST_LOG: debug | |
minimal-versions: | |
name: minimal versions check | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/[email protected] | |
- uses: dtolnay/rust-toolchain@stable | |
with: | |
toolchain: nightly | |
- name: Remove lock | |
run: rm Cargo.lock | |
- run: cargo build -Z minimal-versions | |
dependency-updates: | |
name: dependency updates | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/[email protected] | |
- uses: dtolnay/rust-toolchain@stable | |
with: | |
toolchain: stable | |
- name: Update packages | |
run: cargo update | |
- name: Build and test | |
run: cargo test --all-features -- --nocapture | |
env: | |
RUST_TEST_THREADS: 3 # So the parallel tests have enough threads | |
RUST_LOG: debug |