Skip to content

Commit

Permalink
Add CI test
Browse files Browse the repository at this point in the history
  • Loading branch information
dofuuz committed Dec 18, 2024
1 parent edbdb40 commit 2e0e8c6
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Run tests

on: [push, pull_request, workflow_dispatch]

jobs:
build:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
build_type: [Release]
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v4

- name: Configure CMake
run: >
cmake -B ${{ matrix.build_type }}
-G "Ninja"
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
-S ${{ github.workspace }}
- name: Build
run: cmake --build ${{ matrix.build_type }} --config ${{ matrix.build_type }}

- name: Test
working-directory: ${{ matrix.build_type }}
run: ctest --build-config ${{ matrix.build_type }}

- uses: actions/upload-artifact@v4
if: ${{ !cancelled() }}
with:
name: ${{ matrix.os }}-${{ matrix.build_type }}
path: ${{ matrix.build_type }}

0 comments on commit 2e0e8c6

Please sign in to comment.