-
Notifications
You must be signed in to change notification settings - Fork 106
97 lines (80 loc) · 2.64 KB
/
build.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
name: Build
on:
push:
branches:
- main
pull_request:
schedule:
- cron: "0 0 * * 1"
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Cancel Outdated Builds
uses: styfle/cancel-workflow-action@0.12.1
with:
all_but_latest: true
access_token: ${{ github.token }}
- name: Checkout Repository
uses: actions/checkout@v4
- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
profile: default
toolchain: stable
override: true
default: true
components: rustfmt, clippy
target: |
wasm32-unknown-unknown
- name: Install nightly toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
override: false
default: false
components: rustfmt
- uses: Swatinem/rust-cache@v2
name: Enable Rust Caching
- name: Spell Check
uses: crate-ci/typos@v1.23.1
- name: Format Check
run: cargo +nightly fmt -- --check
- name: Clippy
uses: actions-rs/clippy-check@v1
with:
token: ${{ github.token }}
- name: Audit
uses: actions-rs/audit-check@v1
with:
token: ${{ github.token }}
- name: Check Bench
run: cargo bench --features "test-srs bls schnorr gadgets" --no-run
- name: Check all tests and binaries compilation
run: |
cargo check --workspace --tests --lib --bins
cargo check --workspace --features 'std parallel test-srs test-apis bls schnorr gadgets'
- name: Check no_std support and WASM compilation
env:
RUSTFLAGS: '-C target-cpu=generic --cfg curve25519_dalek_backend="u32"'
run: |
cargo check --no-default-features --features "bls schnorr gadgets"
cargo build --target wasm32-unknown-unknown --no-default-features --features "bls schnorr gadgets"
- name: Test
run: bash ./scripts/run_tests.sh
- name: Example
run: cargo run --release --example proof-of-exp --features test-srs
- name: Generate Documentation
run: |
cargo doc --no-deps --lib --release
cp -R target/doc public
echo '<meta http-equiv="refresh" content="0; url=jf_plonk">' > public/index.html
- name: Deploy
uses: peaceiris/actions-gh-pages@v4
if: ${{ github.ref == 'refs/heads/main' }}
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./public
cname: jellyfish.docs.espressosys.com