-
Notifications
You must be signed in to change notification settings - Fork 3
55 lines (55 loc) · 1.85 KB
/
rust.yml
File metadata and controls
55 lines (55 loc) · 1.85 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
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"