Adds CI for GNU testing #20
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "Build and test" | |
on: | |
pull_request: | |
branches: | |
- main | |
- dev | |
workflow_dispatch: | |
jobs: | |
builds-and-tests: | |
strategy: | |
matrix: | |
os: [windows-latest] | |
preset: ["msbuild"] | |
build-type: ["Debug", "Release"] | |
include: | |
- os: ubuntu-latest | |
preset: "gnu" | |
name: ${{ matrix.os }} / ${{matrix.preset}} / ${{matrix.build-type}} | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: checkout repository | |
uses: actions/checkout@v3 | |
- name: getcmake | |
uses: lukka/get-cmake@latest | |
- name: Setup vcpkg | |
uses: lukka/run-vcpkg@v11 | |
with: | |
vcpkgJsonGlob: 'vcpkg.json' | |
- name: Windows configure and build | |
if: matrix.preset=='msbuild' | |
run: | | |
cmake --preset ${{matrix.preset}} -S . -B build | |
cmake --build build --config ${{matrix.build-type}} -j | |
- name: Windows Run tests | |
if: matrix.preset=='msbuild' | |
run: build/bin/${{matrix.build-type}}/tessellator_tests.exe | |
- name: Ubuntu configure and build | |
if: matrix.preset=='gnu' | |
run: | | |
cmake --preset ${{matrix.preset}} -S . -B build | |
cmake --build build -j | |
- name: Ubuntu Run tests | |
if: matrix.preset=='gnu' | |
run: build/bin/tessellator_tests | |