hyperplonk/.github/workflows/build.yml
.github/workflows/build.ymlRaw
1name: Build
2
3on:
4 push:
5 branches:
6 - main
7 pull_request:
8 branches:
9 - main
10 schedule:
11 - cron: '0 0 * * 1'
12 workflow_dispatch:
13
14jobs:
15 build:
16 runs-on: ubuntu-latest
17 steps:
18 - name: Cancel Outdated Builds
19 uses: styfle/cancel-workflow-action@0.9.1
20 with:
21 all_but_latest: true
22 access_token: ${{ github.token }}
23
24 - name: Checkout Repository
25 uses: actions/checkout@v3
26
27 - name: Install stable toolchain
28 uses: actions-rs/toolchain@v1
29 with:
30 profile: default
31 toolchain: stable
32 override: true
33 default: true
34 components: rustfmt, clippy
35
36 - name: Install stable toolchain
37 uses: actions-rs/toolchain@v1
38 with:
39 profile: minimal
40 toolchain: nightly
41 override: false
42 default: false
43 components: rustfmt
44
45 - uses: Swatinem/rust-cache@v1
46 name: Enable Rust Caching
47
48 - name: Format Check
49 run: cargo +nightly fmt -- --check
50
51 - name: Clippy
52 uses: actions-rs/clippy-check@v1
53 with:
54 token: ${{ github.token }}
55
56 - name: Audit
57 uses: actions-rs/audit-check@v1
58 with:
59 token: ${{ github.token }}
60
61 - name: Check Bench
62 run: cargo bench --no-run
63
64 - name: Check Ignored Tests
65 run: cargo test --no-run -- --ignored
66
67 - name: Test
68 run: bash ./scripts/run_tests.sh
69
70 - name: Generate Documentation
71 run: |
72 cargo doc --no-deps --lib --release
73 cp -R target/doc public
74 echo '<meta http-equiv="refresh" content="0; url=jf_plonk">' > public/index.html
75
76 - name: Deploy
77 uses: peaceiris/actions-gh-pages@v3
78 if: ${{ github.ref == 'refs/heads/main' }}
79 with:
80 github_token: ${{ secrets.GITHUB_TOKEN }}
81 publish_dir: ./public
82 cname: hyperplonk.docs.espressosys.com