build.yml 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  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_LIB=ON -DBUILD_EXAMPLE=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, v141]
  30. include:
  31. - toolset: clang-cl
  32. toolset_option: -T"ClangCl"
  33. - toolset: v141
  34. toolset_option: -T"v141"
  35. exclude:
  36. - os: windows-2016
  37. toolset: clang-cl
  38. - os: windows-2016
  39. toolset: v141
  40. runs-on: ${{ matrix.os }}
  41. steps:
  42. - uses: actions/checkout@v2
  43. - name: Compile tests
  44. working-directory: build
  45. run: |
  46. cmake -DBUILD_LIB=ON -DBUILD_EXAMPLE=ON ${{ matrix.toolset_option }} ..
  47. cmake --build . -j 4
  48. - name: Run tests
  49. working-directory: build
  50. env:
  51. CTEST_OUTPUT_ON_FAILURE: 1
  52. run: ctest --timeout 5 -C Debug -j4
  53. macos:
  54. timeout-minutes: 10
  55. runs-on: macOS-latest
  56. steps:
  57. - uses: actions/checkout@v2
  58. - name: Compile tests
  59. working-directory: build
  60. run: |
  61. cmake -DBUILD_LIB=ON -DBUILD_EXAMPLE=ON ..
  62. make -j4
  63. - name: Run tests
  64. working-directory: build
  65. env:
  66. CTEST_OUTPUT_ON_FAILURE: 1
  67. run: ctest --timeout 5 -C Debug -j4