ci.yml 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  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. feature-powerset:
  29. name: Test crate feature powerset on ${{ matrix.os }}
  30. runs-on: ${{ matrix.os }}
  31. strategy:
  32. matrix:
  33. os: [ubuntu-latest, macos-latest]
  34. steps:
  35. - uses: actions/checkout@v2
  36. - uses: actions-rs/toolchain@v1
  37. with:
  38. toolchain: stable
  39. override: true
  40. - uses: taiki-e/install-action@cargo-hack
  41. - uses: Swatinem/rust-cache@v1
  42. - name: Install dependencies (Linux)
  43. run: |
  44. sudo apt update
  45. sudo apt -y install build-essential clang libclang-dev llvm-dev libudev-dev pkg-config
  46. if: matrix.os == 'ubuntu-latest'
  47. - name: Install dependencies (macOS)
  48. run: |
  49. brew install llvm
  50. if: matrix.os == 'macos-latest'
  51. - name: Run feature powerset builds
  52. run: |
  53. make check
  54. fmt:
  55. name: rustfmt
  56. timeout-minutes: 30
  57. runs-on: ubuntu-latest
  58. steps:
  59. - uses: actions/checkout@v2
  60. - uses: actions-rs/toolchain@v1
  61. with:
  62. toolchain: nightly
  63. override: true
  64. - run: |
  65. rustup component add rustfmt
  66. cargo fmt -- --check