update CI #7
This file contains hidden or 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 | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| env: | |
| RUSTFLAGS: --deny warnings | |
| jobs: | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: clippy, rustfmt | |
| - name: Install Boost | |
| run: sudo apt-get update && sudo apt-get install -y libboost-all-dev | |
| - uses: Swatinem/rust-cache@v2 | |
| - name: Clippy (default features) | |
| run: cargo clippy --all-targets | |
| - name: Clippy (all features) | |
| run: cargo clippy --all-targets --all-features | |
| - name: Format | |
| run: cargo fmt --all -- --check | |
| test: | |
| name: Test on ${{ matrix.os }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, macOS-latest] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Install Boost (Ubuntu) | |
| if: matrix.os == 'ubuntu-latest' | |
| run: sudo apt-get update && sudo apt-get install -y libboost-all-dev | |
| - name: Install Boost (macOS) | |
| if: matrix.os == 'macOS-latest' | |
| run: brew install boost | |
| - uses: Swatinem/rust-cache@v2 | |
| - name: Test default features | |
| run: cargo test | |
| - name: Test all features | |
| run: cargo test --all-features |