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 -- --skip dpc --skip integration_test
86
87 check_no_std:
88 name: Check no_std
89 runs-on: ubuntu-latest
90 steps:
91 - name: Checkout
92 uses: actions/checkout@v2
93
94 - name: Install Rust (${{ matrix.rust }})
95 uses: actions-rs/toolchain@v1
96 with:
97 toolchain: stable
98 target: thumbv6m-none-eabi
99 override: true
100
101 - uses: actions/cache@v2
102 with:
103 path: |
104 ~/.cargo/registry
105 ~/.cargo/git
106 target
107 key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
108
109 - name: algebra-core
110 run: |
111 cd algebra-core
112 cargo build -p algebra-core --no-default-features --target thumbv6m-none-eabi
113 cargo check --examples -p algebra-core --no-default-features --target thumbv6m-none-eabi
114 cd ..
115
116 - name: algebra
117 run: |
118 cd algebra
119 cargo build -p algebra --no-default-features --target thumbv6m-none-eabi
120 cargo check --examples -p algebra --no-default-features --target thumbv6m-none-eabi
121 cd ..
122
123 - name: r1cs-core
124 run: |
125 cd r1cs-core
126 cargo build -p r1cs-core --no-default-features --target thumbv6m-none-eabi
127 cargo check --examples -p r1cs-core --no-default-features --target thumbv6m-none-eabi
128 cd ..
129
130 - name: r1cs-std
131 run: |
132 cd r1cs-std
133 cargo build -p r1cs-std --no-default-features --target thumbv6m-none-eabi
134 cargo check --examples -p r1cs-std --no-default-features --target thumbv6m-none-eabi
135 cd ..
136
137 - name: ff-fft
138 run: |
139 cd ff-fft
140 cargo build -p ff-fft --no-default-features --target thumbv6m-none-eabi
141 cargo check --examples -p ff-fft --no-default-features --target thumbv6m-none-eabi
142 cd ..
143
144 - name: groth16
145 run: |
146 cd groth16
147 cargo build -p groth16 --no-default-features --target thumbv6m-none-eabi
148 cargo check --examples -p groth16 --no-default-features --target thumbv6m-none-eabi
149 cd ..
150
151 - name: gm17
152 run: |
153 cd gm17
154 cargo build -p gm17 --no-default-features --target thumbv6m-none-eabi
155 cargo check --examples -p gm17 --no-default-features --target thumbv6m-none-eabi
156 cd ..
157
158 - name: crypto-primitives
159 run: |
160 cd crypto-primitives
161 cargo build -p crypto-primitives --no-default-features --target thumbv6m-none-eabi
162 cargo check --examples -p crypto-primitives --no-default-features --target thumbv6m-none-eabi
163 cd ..