Bump rust and dev deps (#908) #145
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: Build and Test | |
| on: | |
| push: | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| format-check: | |
| name: Format and Spelling Check | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Load common configuration | |
| id: config | |
| uses: ./.github/actions/load-config | |
| - name: Set up Rust nightly | |
| uses: actions-rust-lang/setup-rust-toolchain@v1 | |
| with: | |
| toolchain: ${{ steps.config.outputs.rust_nightly_version }} | |
| components: rustfmt | |
| - name: Check code formatting | |
| run: | | |
| cargo +${{ steps.config.outputs.rust_nightly_version }} fmt --all --check | |
| cd website && npm ci && npm run format-check | |
| - name: Check spelling | |
| run: | | |
| cargo +${{ steps.config.outputs.rust_nightly_version }} install typos-cli --version 1.43.4 --locked | |
| typos && echo "No spelling errors!" | |
| clippy-and-unit-tests: | |
| name: Clippy and Unit Test | |
| runs-on: ubuntu-latest | |
| env: | |
| MLIR_SYS_190_PREFIX: /usr/lib/llvm-19 | |
| LLVM_SYS_191_PREFIX: /usr/lib/llvm-19 | |
| TABLEGEN_190_PREFIX: /usr/lib/llvm-19 | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Install LLVM 19 (required for cairo_native) | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y \ | |
| llvm-19 llvm-19-dev llvm-19-runtime \ | |
| clang-19 clang-tools-19 lld-19 \ | |
| libpolly-19-dev libmlir-19-dev mlir-19-tools | |
| - name: Load common configuration | |
| id: config | |
| uses: ./.github/actions/load-config | |
| - name: Set up Rust stable | |
| uses: actions-rust-lang/setup-rust-toolchain@v1 | |
| with: | |
| toolchain: ${{ steps.config.outputs.rust_stable_version }} | |
| components: clippy | |
| - name: Verify lockfile | |
| run: cargo update -w --locked | |
| - name: Run cargo check | |
| run: cargo check --workspace --all-targets --all-features | |
| - name: Run clippy check | |
| run: | | |
| cargo clippy --workspace -- -Dwarnings | |
| cargo clippy --workspace --all-features -- -Dwarnings | |
| cargo clippy --workspace --tests -- -Dwarnings | |
| - name: Run tests | |
| run: RUST_BACKTRACE=full cargo test --workspace --exclude integration --no-fail-fast | |
| integration-test: | |
| name: Integration Test | |
| runs-on: self-hosted | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Load common configuration | |
| id: config | |
| uses: ./.github/actions/load-config | |
| - name: Set up Rust stable | |
| uses: actions-rust-lang/setup-rust-toolchain@v1 | |
| with: | |
| toolchain: ${{ steps.config.outputs.rust_stable_version }} | |
| - name: Install Foundry | |
| uses: foundry-rs/foundry-toolchain@v1.1.0 | |
| with: | |
| version: nightly-5b7e4cb3c882b28f3c32ba580de27ce7381f415a | |
| - name: Build in release mode | |
| run: cargo build --release | |
| - name: Run tests | |
| run: RUST_BACKTRACE=full cargo test --package integration --no-fail-fast |