ci.yml 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. name: CI Checks
  2. on: [push, pull_request]
  3. jobs:
  4. test-units:
  5. strategy:
  6. matrix:
  7. os: [ubuntu-latest, macos-latest]
  8. runs-on: ${{ matrix.os }}
  9. steps:
  10. - uses: actions/checkout@v2
  11. - uses: actions-rs/toolchain@v1
  12. with:
  13. toolchain: stable
  14. override: true
  15. - uses: Swatinem/rust-cache@v1
  16. - name: Install dependencies (Linux)
  17. run: |
  18. sudo apt update
  19. sudo apt -y install build-essential clang libclang-dev llvm-dev libudev-dev pkg-config
  20. if: matrix.os == 'ubuntu-latest'
  21. - name: Install dependencies (macOS)
  22. run: |
  23. brew install llvm
  24. if: matrix.os == 'macos-latest'
  25. - name: Run test units
  26. run: |
  27. make test
  28. - name: Compile all bins
  29. run: |
  30. ./script/compile_all_bins.sh
  31. feature-powerset:
  32. name: Test crate feature powerset on ${{ matrix.os }}
  33. runs-on: ${{ matrix.os }}
  34. strategy:
  35. matrix:
  36. os: [ubuntu-latest, macos-latest]
  37. steps:
  38. - uses: actions/checkout@v2
  39. - uses: actions-rs/toolchain@v1
  40. with:
  41. toolchain: stable
  42. override: true
  43. - uses: taiki-e/install-action@cargo-hack
  44. - uses: Swatinem/rust-cache@v1
  45. - name: Install dependencies (Linux)
  46. run: |
  47. sudo apt update
  48. sudo apt -y install build-essential clang libclang-dev llvm-dev libudev-dev pkg-config
  49. if: matrix.os == 'ubuntu-latest'
  50. - name: Install dependencies (macOS)
  51. run: |
  52. brew install llvm
  53. if: matrix.os == 'macos-latest'
  54. - name: Run feature powerset builds
  55. run: |
  56. make check
  57. fmt:
  58. name: rustfmt
  59. timeout-minutes: 30
  60. runs-on: ubuntu-latest
  61. steps:
  62. - uses: actions/checkout@v2
  63. - uses: actions-rs/toolchain@v1
  64. with:
  65. toolchain: nightly
  66. override: true
  67. - run: |
  68. rustup component add rustfmt
  69. cargo fmt -- --check