build.yml 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. name: build
  2. on: [push, pull_request]
  3. jobs:
  4. linux:
  5. timeout-minutes: 10
  6. strategy:
  7. matrix:
  8. compiler: [g++, clang++]
  9. runs-on: ubuntu-latest
  10. steps:
  11. - uses: actions/checkout@v2
  12. - name: Compile tests
  13. working-directory: build
  14. env:
  15. CXX: ${{ matrix.compiler }}
  16. run: |
  17. cmake -DBUILD_TESTING=ON -DBUILD_LIB=ON ..
  18. make -j4
  19. - name: Run tests
  20. working-directory: build
  21. env:
  22. CTEST_OUTPUT_ON_FAILURE: 1
  23. run: ctest --timeout 5 -C Debug -j4
  24. windows:
  25. timeout-minutes: 10
  26. strategy:
  27. matrix:
  28. os: [windows-latest, windows-2016]
  29. toolset: [clang-cl, default]
  30. include:
  31. - toolset: clang-cl
  32. toolset_option: -T"ClangCl"
  33. exclude:
  34. - os: windows-2016
  35. toolset: clang-cl
  36. runs-on: ${{ matrix.os }}
  37. steps:
  38. - uses: actions/checkout@v2
  39. - name: Compile tests
  40. working-directory: build
  41. run: |
  42. cmake -DBUILD_TESTING=ON -DBUILD_LIB=ON ${{ matrix.toolset_option }} ..
  43. cmake --build . -j 4
  44. - name: Run tests
  45. working-directory: build
  46. env:
  47. CTEST_OUTPUT_ON_FAILURE: 1
  48. run: ctest --timeout 5 -C Debug -j4
  49. macos:
  50. timeout-minutes: 10
  51. runs-on: macOS-latest
  52. steps:
  53. - uses: actions/checkout@v2
  54. - name: Compile tests
  55. working-directory: build
  56. run: |
  57. cmake -DBUILD_TESTING=ON -DBUILD_LIB=ON ..
  58. make -j4
  59. - name: Run tests
  60. working-directory: build
  61. env:
  62. CTEST_OUTPUT_ON_FAILURE: 1
  63. run: ctest --timeout 5 -C Debug -j4