|
| 1 | +name: test |
| 2 | +on: |
| 3 | + workflow_dispatch: |
| 4 | + push: |
| 5 | +jobs: |
| 6 | + unit-tests: |
| 7 | + runs-on: ubuntu-latest |
| 8 | + steps: |
| 9 | + - name: Checkout this repository |
| 10 | + |
| 11 | + |
| 12 | + - name: Configure, build, and test this project |
| 13 | + id: cmake_action |
| 14 | + |
| 15 | + with: |
| 16 | + generator: Ninja |
| 17 | + cxx-compiler: clang++ |
| 18 | + args: -DBUILD_TESTING=ON |
| 19 | + run-test: true |
| 20 | + test-args: --no-compress-output -T Test |
| 21 | + |
| 22 | + - name: Setup Testspace client |
| 23 | + id: setup_testspace |
| 24 | + if: steps.cmake_action.outcome == 'success' || steps.cmake_action.outcome == 'failure' |
| 25 | + uses: testspace-com/[email protected] |
| 26 | + with: |
| 27 | + domain: ${{github.repository_owner}} |
| 28 | + |
| 29 | + - name: Send test result to Testspace |
| 30 | + if: steps.setup_testspace.outcome == 'success' |
| 31 | + run: testspace [Tests]"build/Testing/*/Test.xml" |
| 32 | + |
| 33 | + - name: Generate and send code coverage report to Coveralls |
| 34 | + if: steps.cmake_action.outcome == 'success' || steps.cmake_action.outcome == 'failure' |
| 35 | + |
| 36 | + with: |
| 37 | + gcov-executable: llvm-cov gcov |
| 38 | + exclude: build/* |
| 39 | + coveralls-send: true |
| 40 | + github-token: ${{ secrets.GITHUB_TOKEN }} |
| 41 | + |
| 42 | + check-warning: |
| 43 | + runs-on: ubuntu-latest |
| 44 | + steps: |
| 45 | + - name: Checkout this repository |
| 46 | + |
| 47 | + |
| 48 | + - name: Configure and build this project |
| 49 | + |
| 50 | + with: |
| 51 | + generator: Ninja |
| 52 | + cxx-flags: -Werror |
| 53 | + args: -DBUILD_TESTING=ON |
| 54 | + |
| 55 | + check-warning-msvc: |
| 56 | + runs-on: windows-latest |
| 57 | + steps: |
| 58 | + - name: Checkout this repository |
| 59 | + |
| 60 | + |
| 61 | + - name: Configure and build this project |
| 62 | + |
| 63 | + with: |
| 64 | + cxx-compiler: cl |
| 65 | + cxx-flags: /WX |
| 66 | + args: -DBUILD_TESTING=ON |
| 67 | + |
| 68 | + check-formatting: |
| 69 | + runs-on: ubuntu-latest |
| 70 | + steps: |
| 71 | + - name: Checkout this repository |
| 72 | + |
| 73 | + |
| 74 | + - name: Install cmake-format |
| 75 | + run: pip3 install cmake-format |
| 76 | + |
| 77 | + - name: Configure and check formatting |
| 78 | + |
| 79 | + with: |
| 80 | + targets: format check-format |
0 commit comments