ci.yml 2.0 KB

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