diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 0000000..a87de45 --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,33 @@ +name: tests + +on: + push: + branches: [master] + pull_request: + +# Cancel in-progress runs for the same PR / branch when a new commit lands. +concurrency: + group: tests-${{ github.ref }} + cancel-in-progress: true + +jobs: + tests: + name: tests (${{ matrix.os }}) + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest, macos-latest, windows-latest] + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Configure + run: cmake -S tests -B tests/build + + - name: Build + run: cmake --build tests/build --config Release + + - name: Run tests + run: ctest --test-dir tests/build --output-on-failure --build-config Release