ci.yml 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. name: CI Checks
  2. on: [push, pull_request]
  3. jobs:
  4. test-units:
  5. strategy:
  6. matrix:
  7. os: [ubuntu-latest]
  8. runs-on: ${{ matrix.os }}
  9. steps:
  10. - uses: actions/checkout@v4
  11. - uses: actions-rs/toolchain@v1
  12. with:
  13. toolchain: nightly-2024-04-05
  14. override: true
  15. - uses: actions-rs/toolchain@v1
  16. with:
  17. toolchain: nightly-2024-04-05
  18. target: wasm32-unknown-unknown
  19. override: true
  20. - uses: Swatinem/rust-cache@v2
  21. - name: Update apt cache
  22. run: |
  23. sudo apt update -y
  24. - name: Install dependencies (Linux)
  25. run: |
  26. sh contrib/dependency_setup.sh
  27. if: matrix.os == 'ubuntu-latest'
  28. - name: Run test units
  29. run: |
  30. make CARGO="cargo +nightly-2024-04-05" test
  31. - name: Compile all bins
  32. run: |
  33. make CARGO="cargo +nightly-2024-04-05"
  34. feature-powerset:
  35. name: Test crate feature powerset on ${{ matrix.os }}
  36. runs-on: ${{ matrix.os }}
  37. strategy:
  38. matrix:
  39. os: [ubuntu-latest]
  40. steps:
  41. - uses: actions/checkout@v4
  42. - uses: actions-rs/toolchain@v1
  43. with:
  44. toolchain: nightly-2024-04-05
  45. override: true
  46. - uses: actions-rs/toolchain@v1
  47. with:
  48. toolchain: nightly-2024-04-05
  49. target: wasm32-unknown-unknown
  50. override: true
  51. - uses: taiki-e/install-action@cargo-hack
  52. - uses: Swatinem/rust-cache@v2
  53. - name: Update apt cache
  54. run: |
  55. sudo apt update -y
  56. - name: Install dependencies (Linux)
  57. run: |
  58. sh contrib/dependency_setup.sh
  59. if: matrix.os == 'ubuntu-latest'
  60. - name: Run feature powerset builds
  61. run: |
  62. make CARGO="cargo +nightly-2024-04-05" check
  63. fmt:
  64. name: rustfmt
  65. timeout-minutes: 30
  66. runs-on: ubuntu-latest
  67. steps:
  68. - uses: actions/checkout@v4
  69. - uses: actions-rs/toolchain@v1
  70. with:
  71. toolchain: nightly-2024-04-05
  72. components: rustfmt
  73. override: true
  74. - run: |
  75. cargo +nightly-2024-04-05 fmt -- --check