[pre-commit.ci] pre-commit autoupdate #137
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: 🔂 Unit tests on multiple platforms | |
on: | |
push: | |
branches: ["main"] | |
pull_request: | |
branches: ["main"] | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, windows-latest] | |
compiler: [Clang, GCC] | |
build_type: [Debug, Release] | |
exclude: | |
- os: windows-latest | |
- compiler: Clang | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
submodules: true | |
- uses: seanmiddleditch/gha-setup-ninja@v4 | |
- name: Set reusable strings | |
id: strings | |
shell: bash | |
run: | | |
echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT" | |
- name: Setup vcpkg | |
uses: lukka/run-vcpkg@v11 | |
- name: Configure CMake | |
run: > | |
cmake -B ${{ steps.strings.outputs.build-output-dir }} | |
--preset ${{ matrix.compiler }}-${{ matrix.build_type }} | |
- name: Build | |
run: cmake --build ${{ steps.strings.outputs.build-output-dir }} -j | |
# - name: Test | |
# working-directory: ${{ steps.strings.outputs.build-output-dir }} | |
# # Execute tests defined by the CMake configuration. Note that --build-config is needed because the default Windows generator is a multi-config generator (Visual Studio generator). | |
# # See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail | |
# run: ctest --build-config ${{ matrix.build_type }} |