standard-check.yml 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. name: Standard Check
  2. on: [push, pull_request]
  3. jobs:
  4. # ensure the toolchain is cached
  5. ensure-toolchain:
  6. uses: ./.github/workflows/cache-toolchain.yml
  7. fmt:
  8. name: fmt check
  9. runs-on: ubuntu-latest
  10. needs: [ensure-toolchain]
  11. steps:
  12. - uses: actions/checkout@v3
  13. - name: Cache build tools
  14. id: cache-build-tools
  15. uses: actions/cache@v3
  16. env:
  17. cache-name: cache-build-tools
  18. dadk_version: 0.1.2
  19. with:
  20. path: |
  21. ~/.cargo
  22. ~/.rustup
  23. ~/.bashrc
  24. key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ env.dadk_version }}-${{ hashFiles('.github/workflows/cache-toolchain.yml') }}
  25. - name: Check format
  26. run: |
  27. make fmt-check
  28. build:
  29. name: build check
  30. runs-on: ubuntu-latest
  31. needs: [ensure-toolchain]
  32. steps:
  33. - uses: actions/checkout@v3
  34. - name: Cache build tools
  35. id: cache-build-tools
  36. uses: actions/cache@v3
  37. env:
  38. cache-name: cache-build-tools
  39. dadk_version: 0.1.2
  40. with:
  41. path: |
  42. ~/.cargo
  43. ~/.rustup
  44. ~/.bashrc
  45. key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ env.dadk_version }}-${{ hashFiles('.github/workflows/cache-toolchain.yml') }}
  46. - name: Build check
  47. run: |
  48. make all -j $(nproc)