miden-crypto/.github/workflows/ci.yml
.github/workflows/ci.ymlRaw
1name: CI
2on:
3 push:
4 branches:
5 - main
6 pull_request:
7 types: [opened, repoened, synchronize]
8
9jobs:
10 build:
11 name: Build ${{matrix.toolchain}} on ${{matrix.os}} with ${{matrix.args}}
12 runs-on: ${{matrix.os}}-latest
13 strategy:
14 fail-fast: false
15 matrix:
16 toolchain: [stable, nightly]
17 os: [ubuntu]
18 target: [wasm32-unknown-unknown]
19 args: [--no-default-features --target wasm32-unknown-unknown]
20 steps:
21 - uses: actions/checkout@main
22 - name: Install rust
23 uses: actions-rs/toolchain@v1
24 with:
25 toolchain: ${{matrix.toolchain}}
26 override: true
27 - run: rustup target add ${{matrix.target}}
28 - name: Test
29 uses: actions-rs/cargo@v1
30 with:
31 command: build
32 args: ${{matrix.args}}
33
34 test:
35 name: Test ${{matrix.toolchain}} on ${{matrix.os}} with ${{matrix.features}}
36 runs-on: ${{matrix.os}}-latest
37 strategy:
38 fail-fast: false
39 matrix:
40 toolchain: [stable, nightly]
41 os: [ubuntu]
42 features: [--all-features, --no-default-features]
43 steps:
44 - uses: actions/checkout@main
45 - name: Install rust
46 uses: actions-rs/toolchain@v1
47 with:
48 toolchain: ${{matrix.toolchain}}
49 override: true
50 - name: Test
51 uses: actions-rs/cargo@v1
52 with:
53 command: test
54 args: ${{matrix.features}}
55
56 clippy:
57 name: Clippy with ${{matrix.features}}
58 runs-on: ubuntu-latest
59 strategy:
60 fail-fast: false
61 matrix:
62 features: [--all-features, --no-default-features]
63 steps:
64 - uses: actions/checkout@main
65 - name: Install minimal nightly with clippy
66 uses: actions-rs/toolchain@v1
67 with:
68 profile: minimal
69 toolchain: nightly
70 components: clippy
71 override: true
72 - name: Clippy
73 uses: actions-rs/cargo@v1
74 with:
75 command: clippy
76 args: --all ${{matrix.features}} -- -D clippy::all -D warnings
77
78 rustfmt:
79 name: rustfmt
80 runs-on: ubuntu-latest
81 steps:
82 - uses: actions/checkout@main
83 - name: Install minimal stable with rustfmt
84 uses: actions-rs/toolchain@v1
85 with:
86 profile: minimal
87 toolchain: stable
88 components: rustfmt
89 override: true
90
91 - name: rustfmt
92 uses: actions-rs/cargo@v1
93 with:
94 command: fmt
95 args: --all -- --check