ci.yml 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. name: CI Checks
  2. on: [push, pull_request]
  3. jobs:
  4. test:
  5. name: Test on ${{ matrix.os }}
  6. runs-on: ${{ matrix.os }}
  7. strategy:
  8. matrix:
  9. os: [ubuntu-latest]
  10. steps:
  11. - uses: actions/checkout@v2
  12. - uses: actions-rs/toolchain@v1
  13. with:
  14. toolchain: stable
  15. override: true
  16. - name: Install dependencies
  17. run: |
  18. sudo apt update
  19. sudo apt -y install build-essential clang libclang-dev llvm-dev libudev-dev pkg-config
  20. - name: Run tests
  21. run: |
  22. make test
  23. feature-powerset:
  24. name: Test crate feature powerset on ${{ matrix.os }}
  25. runs-on: ${{ matrix.os }}
  26. strategy:
  27. matrix:
  28. os: [ubuntu-latest]
  29. steps:
  30. - uses: actions/checkout@v2
  31. - uses: actions-rs/toolchain@v1
  32. with:
  33. toolchain: stable
  34. override: true
  35. - uses: taiki-e/install-action@cargo-hack
  36. - name: Install dependencies
  37. run: |
  38. sudo apt update
  39. sudo apt -y install build-essential clang libclang-dev llvm-dev libudev-dev pkg-config
  40. - name: Run feature powerset builds
  41. run: |
  42. make check
  43. fmt:
  44. name: rustfmt
  45. timeout-minutes: 30
  46. runs-on: ubuntu-latest
  47. steps:
  48. - uses: actions/checkout@v2
  49. - uses: actions-rs/toolchain@v1
  50. with:
  51. toolchain: nightly
  52. override: true
  53. - run: |
  54. rustup component add rustfmt
  55. cargo fmt -- --check