ci.yml 1.6 KB

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