-
Notifications
You must be signed in to change notification settings - Fork 5
99 lines (84 loc) · 2.79 KB
/
Basic.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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
# Based on https://github.com/actions-rs/example/blob/master/.github/workflows/quickstart.yml
on: [push, pull_request]
name: Basic
jobs:
test:
name: Build and test
runs-on: ubuntu-latest
strategy:
matrix:
bls_lib: [zkcrypto, arkworks, arkworks-asm]
steps:
- name: Checkout sources
uses: actions/checkout@v2
- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: 1.69.0
target: wasm32-unknown-unknown
override: true
- name: Build
uses: actions-rs/cargo@v1
with:
command: build
args: --locked --features ${{ matrix.bls_lib }}
- name: Build with js feature
uses: actions-rs/cargo@v1
with:
command: build
args: --locked --features ${{ matrix.bls_lib }},js
- name: Run unit tests
uses: actions-rs/cargo@v1
with:
command: test
args: --locked --features ${{ matrix.bls_lib }}
env:
RUST_BACKTRACE: 1
examples:
name: Build and run examples
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v2
- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: 1.69.0
target: wasm32-unknown-unknown
override: true
- name: Build all
uses: actions-rs/cargo@v1
with:
command: build
args: --examples --locked
env:
RUST_BACKTRACE: 1
- name: Run example cli
# curl -sS https://drand.cloudflare.com/public/72785
run: ./target/debug/examples/drand_verify 72785 a609e19a03c2fcc559e8dae14900aaefe517cb55c840f6e69bc8e4f66c8d18e8a609685d9917efbfb0c37f058c2de88f13d297c7e19e0ab24813079efe57a182554ff054c7638153f9b26a60e7111f71a0ff63d9571704905d3ca6df0b031747 82f5d3d2de4db19d40a6980e8aa37842a0e55d1df06bd68bddc8d60002e8e959eb9cfa368b3c1b77d18f02a54fe047b80f0989315f83b12a74fd8679c4f12aae86eaf6ab5690b34f1fddd50ee3cc6f6cdf59e95526d5a5d82aaa84fa6f181e42
lints:
name: Lints
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v2
- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: 1.69.0
override: true
components: rustfmt, clippy
- name: Run cargo fmt
uses: actions-rs/cargo@v1
with:
command: fmt
args: -- --check
- name: Run cargo clippy
uses: actions-rs/cargo@v1
with:
command: clippy
# Cannot use --all-targets because benches require Rust nightly
args: --tests --examples -- -D warnings