Mesa compatibility #353
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: Rust | |
| on: | |
| push: | |
| branches: ["main"] | |
| pull_request: | |
| branches: ["main"] | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| build-and-test: | |
| name: build-and-test (${{ matrix.os }}, ${{ matrix.rust_toolchain }}, ${{ matrix.features || 'default' }}) | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| rust_toolchain: [stable, beta] | |
| os: [ubuntu-latest, macos-latest] | |
| features: ["", "mesa-hardfork"] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: dtolnay/rust-toolchain@master | |
| with: | |
| toolchain: ${{ matrix.rust_toolchain }} | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| key: ${{ matrix.rust_toolchain }}-${{ matrix.os }} | |
| - name: Install test prerequisites | |
| uses: ./.github/actions/setup-frost-prereqs | |
| - name: Build | |
| run: cargo build --verbose ${{ matrix.features && format('--features {0}', matrix.features) }} | |
| - name: Run tests | |
| run: cargo test --verbose ${{ matrix.features && format('--features {0}', matrix.features) }} | |
| - name: Test mina-tx with frost-bluepallas-compat | |
| run: cargo test -p mina-tx --verbose --features frost-bluepallas-compat${{ matrix.features && format(',{0}', matrix.features) }} | |
| check-format-and-audit: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: dtolnay/rust-toolchain@master | |
| with: | |
| toolchain: stable | |
| components: rustfmt | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| key: stable-ubuntu-latest | |
| - name: Install cargo-audit | |
| run: cargo install cargo-audit --locked | |
| - name: Security audit | |
| run: cargo audit | |
| - name: Check formatting | |
| run: cargo fmt --check | |
| - name: Build documentation | |
| run: cargo doc --no-deps --document-private-items | |
| env: | |
| RUSTDOCFLAGS: "-D warnings" |