all: Improve the API #201
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
name: CI | |
permissions: | |
contents: read | |
on: | |
workflow_dispatch: | |
pull_request: | |
branches: | |
- main | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
ci: | |
strategy: | |
fail-fast: false | |
matrix: | |
rust: | |
- stable | |
- nightly | |
- "1.65.0" | |
platform: | |
- ubuntu-latest | |
- windows-latest | |
- macos-latest | |
runs-on: ${{ matrix.platform }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ./.github/actions/install_deps | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: ${{ matrix.rust }} | |
components: rustfmt, clippy | |
- name: Check the code format | |
if: matrix.rust == 'nightly' # Avoid differences between the versions | |
run: cargo fmt -- --check | |
- name: Check clippy lints | |
run: cargo clippy --all-targets --all-features -- -D clippy::pedantic | |
- name: Check clippy lints for the examples | |
run: cargo clippy --all-targets --all-features --examples -- -D clippy::pedantic | |
- name: Build the code | |
run: cargo build | |
- name: Build the code with all features enabled | |
run: cargo build --all-features | |
- name: Build the docs | |
run: cargo doc | |
- name: Build the docs with all features enabled | |
run: cargo doc --all-features | |
- name: Build the examples | |
run: cargo check --examples | |
- name: Build the examples with all features enabled | |
run: cargo check --examples --all-features | |
- name: Build the examples in release mode | |
run: cargo check --examples | |
- name: Build the examples in release mode with all features enabled | |
run: cargo check --examples --all-features | |
- name: Test the code | |
run: cargo test | |
- name: Test the code with all features enabled | |
run: cargo test --all-features | |
- name: Test the code in release mode | |
run: cargo test --release | |
- name: Test the code with all features enabled | |
run: cargo test --all-features --release | |
- name: Setup headless display for integration tests | |
if: runner.os == 'Linux' # The integration tests only work on Linux right now | |
uses: ./.github/actions/headless_display | |
- name: Run integration tests | |
if: runner.os == 'Linux' # The integration tests only work on Linux right now | |
run: cargo test --all-features -- --include-ignored --nocapture | |
- name: Install Miri | |
if: matrix.rust == 'nightly' # Miri only works on Nightly | |
run: | | |
rustup toolchain install nightly --component miri | |
rustup override set nightly | |
cargo clean | |
cargo miri setup | |
- name: Run Miri to check unsafe code | |
if: matrix.rust == 'nightly' # Miri only works on Nightly | |
run: cargo miri test --verbose --all-features |