Release 1.0 #74
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, master] | |
| pull_request: | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| jobs: | |
| fmt: | |
| name: Format check | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Install Rust (stable) | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: rustfmt | |
| - name: cargo fmt | |
| run: cargo fmt --all -- --check | |
| clippy: | |
| name: Clippy | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Install Rust (stable) | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: clippy | |
| - name: Install system dependencies | |
| # Note: Needed for plotters in the fink-fat-eval crate | |
| run: sudo apt-get update && sudo apt-get install -y libfontconfig1-dev | |
| - name: Cache Rust | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| cache-on-failure: true | |
| - name: cargo clippy | |
| run: cargo clippy --all-targets --all-features -- -D warnings | |
| check: | |
| name: Cargo check | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Install Rust (stable) | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Install system dependencies | |
| # Note: Needed for plotters in the fink-fat-eval crate | |
| run: sudo apt-get update && sudo apt-get install -y libfontconfig1-dev | |
| - name: Cache Rust | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| cache-on-failure: true | |
| - name: cargo check | |
| run: cargo check --all-targets --all-features | |
| doc: | |
| name: Documentation check | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Install Rust (stable) | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Install system dependencies | |
| # Note: Needed for plotters in the fink-fat-eval crate | |
| run: sudo apt-get update && sudo apt-get install -y libfontconfig1-dev | |
| - name: Cache Rust | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| cache-on-failure: true | |
| - name: cargo doc | |
| run: RUSTDOCFLAGS="-D warnings" cargo doc --no-deps --all-features | |
| coverage: | |
| name: Tests & Coverage | |
| runs-on: ubuntu-latest | |
| needs: [fmt, clippy, check, doc] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Install Rust stable + llvm-tools | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: llvm-tools-preview | |
| - name: Install system dependencies | |
| # Note: Needed for plotters in the fink-fat-eval crate | |
| run: sudo apt-get update && sudo apt-get install -y libfontconfig1-dev | |
| - name: Cache Rust | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| cache-on-failure: true | |
| - name: Install cargo-llvm-cov | |
| uses: taiki-e/install-action@cargo-llvm-cov | |
| - name: Clean coverage artifacts | |
| run: cargo llvm-cov clean --workspace | |
| - name: Generate coverage (lcov, all features) | |
| env: | |
| RAYON_NUM_THREADS: 2 | |
| RUST_TEST_THREADS: 1 | |
| run: | | |
| cargo llvm-cov \ | |
| --workspace \ | |
| --all-features \ | |
| --lcov --output-path lcov.info | |
| - name: Upload to Codecov | |
| uses: codecov/codecov-action@v4 | |
| with: | |
| files: lcov.info | |
| flags: rust | |
| fail_ci_if_error: false | |
| token: ${{ secrets.CODECOV_TOKEN }} |