diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..52d97cf --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,46 @@ +name: CI + +on: + push: + branches: + - dev + - main + pull_request: + branches: + - dev + - main + workflow_dispatch: + +permissions: + contents: read + +jobs: + build: + name: Build (${{ matrix.os }}) + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest, windows-latest] + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Configure (Linux) + if: runner.os == 'Linux' + run: cmake -S . -B build -DCMAKE_BUILD_TYPE=Release + + - name: Build (Linux) + if: runner.os == 'Linux' + run: cmake --build build --config Release + + - name: Configure (Windows) + if: runner.os == 'Windows' + shell: pwsh + run: cmake -S . -B build -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=Release + + - name: Build (Windows) + if: runner.os == 'Windows' + shell: pwsh + run: cmake --build build --config Release