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, reopened, synchronize]
8
9jobs:
10 rustfmt:
11 name: rustfmt ${{matrix.toolchain}} on ${{matrix.os}}
12 runs-on: ${{matrix.os}}-latest
13 strategy:
14 fail-fast: false
15 matrix:
16 toolchain: [nightly]
17 os: [ubuntu]
18 steps:
19 - uses: actions/checkout@v4
20 - name: Install minimal Rust with rustfmt
21 uses: actions-rs/toolchain@v1
22 with:
23 profile: minimal
24 toolchain: ${{matrix.toolchain}}
25 components: rustfmt
26 override: true
27 - name: fmt
28 uses: actions-rs/cargo@v1
29 with:
30 command: fmt
31 args: --all -- --check
32
33 clippy:
34 name: clippy ${{matrix.toolchain}} on ${{matrix.os}}
35 runs-on: ${{matrix.os}}-latest
36 strategy:
37 fail-fast: false
38 matrix:
39 toolchain: [nightly]
40 os: [ubuntu]
41 steps:
42 - uses: actions/checkout@v4
43 with:
44 submodules: recursive
45 - name: Install minimal Rust with clippy
46 uses: actions-rs/toolchain@v1
47 with:
48 profile: minimal
49 toolchain: ${{matrix.toolchain}}
50 components: clippy
51 override: true
52 - name: Clippy
53 uses: actions-rs/cargo@v1
54 with:
55 command: clippy
56 args: --all-targets -- -D clippy::all -D warnings
57 - name: Clippy all features
58 uses: actions-rs/cargo@v1
59 with:
60 command: clippy
61 args: --all-targets --all-features -- -D clippy::all -D warnings
62
63 test:
64 name: test ${{matrix.toolchain}} on ${{matrix.os}} with ${{matrix.args}}
65 runs-on: ${{matrix.os}}-latest
66 strategy:
67 fail-fast: false
68 matrix:
69 toolchain: [stable, nightly]
70 os: [ubuntu]
71 features: ["--features default,serde", --no-default-features]
72 timeout-minutes: 30
73 steps:
74 - uses: actions/checkout@v4
75 with:
76 submodules: recursive
77 - name: Install rust
78 uses: actions-rs/toolchain@v1
79 with:
80 toolchain: ${{matrix.toolchain}}
81 override: true
82 - name: Test
83 uses: actions-rs/cargo@v1
84 with:
85 command: test
86 args: ${{matrix.features}}
87
88 no-std:
89 name: build ${{matrix.toolchain}} no-std for wasm32-unknown-unknown
90 runs-on: ubuntu-latest
91 strategy:
92 fail-fast: false
93 matrix:
94 toolchain: [stable, nightly]
95 steps:
96 - uses: actions/checkout@v4
97 with:
98 submodules: recursive
99 - name: Install rust
100 uses: actions-rs/toolchain@v1
101 with:
102 toolchain: ${{matrix.toolchain}}
103 override: true
104 - run: rustup target add wasm32-unknown-unknown
105 - name: Build
106 uses: actions-rs/cargo@v1
107 with:
108 command: build
109 args: --no-default-features --target wasm32-unknown-unknown