ark-r1cs-std/.github/workflows/ci.yml
.github/workflows/ci.ymlRaw
1name: CI
2on:
3 pull_request:
4 push:
5 branches:
6 - master
7env:
8 RUST_BACKTRACE: 1
9
10jobs:
11 style:
12 name: Check Style
13 runs-on: ubuntu-latest
14 steps:
15
16 - name: Checkout
17 uses: actions/checkout@v1
18 - name: Install Rust
19 uses: actions-rs/toolchain@v1
20 with:
21 profile: minimal
22 toolchain: stable
23 override: true
24 components: rustfmt
25
26 - name: cargo fmt --check
27 uses: actions-rs/cargo@v1
28 with:
29 command: fmt
30 args: --all -- --check
31
32 test:
33 name: Test
34 runs-on: ubuntu-latest
35 env:
36 RUSTFLAGS: -Dwarnings
37 strategy:
38 matrix:
39 rust:
40 - stable
41 - nightly
42 steps:
43 - name: Checkout
44 uses: actions/checkout@v2
45
46 - name: Install Rust (${{ matrix.rust }})
47 uses: actions-rs/toolchain@v1
48 with:
49 profile: minimal
50 toolchain: ${{ matrix.rust }}
51 override: true
52
53 - uses: actions/cache@v2
54 with:
55 path: |
56 ~/.cargo/registry
57 ~/.cargo/git
58 target
59 key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
60
61 - name: Check examples
62 uses: actions-rs/cargo@v1
63 with:
64 command: check
65 args: --examples --all
66
67 - name: Check examples with all features on stable
68 uses: actions-rs/cargo@v1
69 with:
70 command: check
71 args: --examples --all-features --all
72 if: matrix.rust == 'stable'
73
74 - name: Check benchmarks on nightly
75 uses: actions-rs/cargo@v1
76 with:
77 command: check
78 args: --all-features --examples --all --benches
79 if: matrix.rust == 'nightly'
80
81 - name: Test
82 uses: actions-rs/cargo@v1
83 with:
84 command: test
85 args: "--all \
86 --all-features \
87 --exclude cp-benches \
88 --exclude algebra-benches \
89 --exclude ff-fft-benches \
90 -- --skip dpc --skip integration_test"
91
92 check_no_std:
93 name: Check no_std
94 runs-on: ubuntu-latest
95 steps:
96 - name: Checkout
97 uses: actions/checkout@v2
98
99 - name: Install Rust (${{ matrix.rust }})
100 uses: actions-rs/toolchain@v1
101 with:
102 toolchain: stable
103 target: thumbv6m-none-eabi
104 override: true
105
106 - name: Install Rust ARM64 (${{ matrix.rust }})
107 uses: actions-rs/toolchain@v1
108 with:
109 toolchain: stable
110 target: aarch64-unknown-none
111 override: true
112
113 - uses: actions/cache@v2
114 with:
115 path: |
116 ~/.cargo/registry
117 ~/.cargo/git
118 target
119 key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
120
121 - name: algebra-core
122 run: |
123 cd algebra-core
124 cargo build -p algebra-core --no-default-features --target thumbv6m-none-eabi
125 cargo check --examples -p algebra-core --no-default-features --target thumbv6m-none-eabi
126 cd ..
127
128 - name: algebra
129 run: |
130 cd algebra
131 cargo build -p algebra --no-default-features --target thumbv6m-none-eabi
132 cargo check --examples -p algebra --no-default-features --target thumbv6m-none-eabi
133 cd ..
134
135 - name: r1cs-core
136 run: |
137 cd r1cs-core
138 cargo build -p r1cs-core --no-default-features --target thumbv6m-none-eabi
139 cargo check --examples -p r1cs-core --no-default-features --target thumbv6m-none-eabi
140 cd ..
141
142 - name: r1cs-std
143 run: |
144 cd r1cs-std
145 cargo build -p r1cs-std --no-default-features --target aarch64-unknown-none
146 cargo check --examples -p r1cs-std --no-default-features --target aarch64-unknown-none
147 cd ..
148
149 - name: ff-fft
150 run: |
151 cd ff-fft
152 cargo build -p ff-fft --no-default-features --target thumbv6m-none-eabi
153 cargo check --examples -p ff-fft --no-default-features --target thumbv6m-none-eabi
154 cd ..
155
156 - name: groth16
157 run: |
158 cd groth16
159 cargo build -p groth16 --no-default-features --target thumbv6m-none-eabi
160 cargo check --examples -p groth16 --no-default-features --target thumbv6m-none-eabi
161 cd ..
162
163 - name: gm17
164 run: |
165 cd gm17
166 cargo build -p gm17 --no-default-features --target thumbv6m-none-eabi
167 cargo check --examples -p gm17 --no-default-features --target thumbv6m-none-eabi
168 cd ..
169
170 - name: crypto-primitives
171 run: |
172 cd crypto-primitives
173 cargo build -p crypto-primitives --no-default-features --target aarch64-unknown-none
174 cargo check --examples -p crypto-primitives --no-default-features --target aarch64-unknown-none
175 cd ..