WIP: Test setup for h3handicap #64
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
# Inspiration: https://gist.github.com/NickNaso/0d478f1481686d5bcc868cac06620a60 | |
name: build-and-test | |
on: [push] | |
jobs: | |
build: | |
name: ${{ matrix.config.name }} | |
runs-on: ${{ matrix.config.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
config: | |
- { | |
name: "Windows (MSVC)", | |
os: windows-latest, | |
build_type: "Release", | |
cc: "cl", | |
cxx: "cl", | |
generator: "Visual Studio 17 2022" | |
} | |
- { | |
name: "MacOS Clang/Xcode", | |
os: macos-latest, | |
build_type: "Release", | |
cc: "clang", | |
cxx: "clang++", | |
generator: "Xcode" | |
} | |
- { | |
name: "MacOS GCC/Xcode", | |
os: macos-latest, | |
build_type: "Release", | |
cc: "gcc", | |
cxx: "g++", | |
generator: "Xcode" | |
} | |
- { | |
name: "MacOS Clang/Makefile", | |
os: macos-latest, | |
build_type: "Release", | |
cc: "clang", | |
cxx: "clang++", | |
generator: "Unix Makefiles" | |
} | |
- { | |
name: "MacOS GCC/Makefile", | |
os: macos-latest, | |
build_type: "Release", | |
cc: "gcc", | |
cxx: "g++", | |
generator: "Unix Makefiles" | |
} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Configure | |
shell: bash | |
run: | | |
mkdir build | |
mkdir install | |
cmake \ | |
-S . \ | |
-B build \ | |
-DCMAKE_BUILD_TYPE=${{ matrix.config.build_type }} \ | |
-G "${{ matrix.config.generator }}" \ | |
--install-prefix "$(pwd)/install" | |
- name: Build | |
shell: bash | |
run: cmake --build build --config ${{ matrix.config.build_type }} --target install | |
- name: Archive Install Directory | |
uses: actions/upload-artifact@v3 | |
with: | |
name: install-artifacts | |
path: | | |
install | |
- name: Test | |
shell: bash | |
run: ctest -C ${{ matrix.config.build_type }} --verbose --output-on-failure --test-dir build |