-
Notifications
You must be signed in to change notification settings - Fork 180
79 lines (73 loc) · 2.72 KB
/
ci.yml
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
name: CI
on:
workflow_dispatch:
pull_request:
push:
branches:
- main
jobs:
light-checks:
name: Light checks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main
- name: Clippy
run: |
rustup update --no-self-update nightly
rustup +nightly component add clippy
# Specifically, don't enable `async` feature in winter-prover crate
cargo +nightly clippy --workspace --all-targets --features std,concurrent -- -D clippy::all -D warnings
- name: Rustfmt
run: |
rustup +nightly component add rustfmt
cargo +nightly fmt --all --check
# Note: the examples won't compile when the prover is built with the `async` feature, since they're designed to be sync only.
# Hence, we avoid this scenario explicitly.
check:
name: Check all features and all targets against the MSRV, except for winter-prover and winterfell
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main
- name: Perform checks
run: |
rustup update --no-self-update stable
cargo +stable install cargo-hack --locked
RUSTFLAGS=-Dwarnings cargo +stable hack --no-private --feature-powerset --keep-going check --rust-version --verbose --all-targets --workspace --exclude winter-prover --exclude winterfell
# Check prover and winterfell alone; specifically, that the `async` feature builds correctly
check-prover:
name: Check prover and winterfell packages
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main
- name: Perform check
run: |
rustup update --no-self-update stable
cargo +stable install cargo-hack --locked
RUSTFLAGS=-Dwarnings cargo +stable hack --package winter-prover --package winterfell --no-private --feature-powerset --keep-going check --rust-version --verbose
test:
name: Test Rust ${{matrix.toolchain}} on ${{matrix.os}}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
toolchain: [stable, nightly]
steps:
- uses: actions/checkout@main
- name: Run test
run: |
rustup update --no-self-update ${{ matrix.toolchain }}
cargo +${{ matrix.toolchain }} test
no-std:
name: Build for no-std
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
toolchain: [stable, nightly]
steps:
- uses: actions/checkout@main
- name: Build for no-std
run: |
rustup update --no-self-update ${{ matrix.toolchain }}
rustup +${{ matrix.toolchain }} target add wasm32-unknown-unknown
cargo +${{ matrix.toolchain }} build --verbose --no-default-features --target wasm32-unknown-unknown