arnaucube
arnaucube/hyperplonkPublic Self-hosted repository
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.11.0
20        with:
21          all_but_latest: true
22          access_token: ${{ github.token }}
23
24      - name: Checkout Repository
25        uses: actions/checkout@v3
26
27      - uses: Swatinem/rust-cache@v2
28        name: Enable Rust Caching
29
30      - name: Format Check
31        run: cargo fmt -- --check
32
33      - name: Clippy Check
34        run: cargo clippy --workspace -- -D warnings
35
36      - name: Audit Check
37        run: cargo audit
38
39      - name: Check Bench
40        run: cargo bench --no-run
41
42      - name: Check Ignored Tests
43        run: cargo test --no-run -- --ignored
44
45      - name: Test
46        run: bash ./scripts/run_tests.sh
47
48      - name: Generate Documentation
49        run: |
50          cargo doc --no-deps --lib --release
51          cp -R target/doc public
52          echo '<meta http-equiv="refresh" content="0; url=jf_plonk">' > public/index.html          
53
54      - name: Deploy
55        uses: peaceiris/actions-gh-pages@v3
56        if: ${{ github.ref == 'refs/heads/main' }}
57        with:
58          github_token: ${{ secrets.GITHUB_TOKEN }}
59          publish_dir: ./public
60          cname: hyperplonk.docs.espressosys.com