You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

60 lines
1.4 KiB

2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
  1. name: Build
  2. on:
  3. push:
  4. branches:
  5. - main
  6. pull_request:
  7. branches:
  8. - main
  9. schedule:
  10. - cron: '0 0 * * 1'
  11. workflow_dispatch:
  12. jobs:
  13. build:
  14. runs-on: ubuntu-latest
  15. steps:
  16. - name: Cancel Outdated Builds
  17. uses: styfle/cancel-workflow-action@0.11.0
  18. with:
  19. all_but_latest: true
  20. access_token: ${{ github.token }}
  21. - name: Checkout Repository
  22. uses: actions/checkout@v3
  23. - uses: Swatinem/rust-cache@v2
  24. name: Enable Rust Caching
  25. - name: Format Check
  26. run: cargo fmt -- --check
  27. - name: Clippy Check
  28. run: cargo clippy --workspace -- -D warnings
  29. - name: Audit Check
  30. run: cargo audit
  31. - name: Check Bench
  32. run: cargo bench --no-run
  33. - name: Check Ignored Tests
  34. run: cargo test --no-run -- --ignored
  35. - name: Test
  36. run: bash ./scripts/run_tests.sh
  37. - name: Generate Documentation
  38. run: |
  39. cargo doc --no-deps --lib --release
  40. cp -R target/doc public
  41. echo '<meta http-equiv="refresh" content="0; url=jf_plonk">' > public/index.html
  42. - name: Deploy
  43. uses: peaceiris/actions-gh-pages@v3
  44. if: ${{ github.ref == 'refs/heads/main' }}
  45. with:
  46. github_token: ${{ secrets.GITHUB_TOKEN }}
  47. publish_dir: ./public
  48. cname: hyperplonk.docs.espressosys.com