Bug fixed #179
Workflow file for this run
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
# NOTE: This workflow is in the test_cpp_cache repository with full comments | |
name: Continuous Integration | |
on: | |
push: | |
branches: | |
- main | |
- develop | |
- 'feature/*' | |
- 'bugfix/*' | |
- 'release/*' | |
- 'hotfix/*' | |
paths-ignore: | |
- 'docs/**' | |
- 'LICENSE' | |
- 'LICENSE.txt' | |
- 'README.md' | |
pull_request: | |
branches: | |
- main | |
- develop | |
paths-ignore: | |
- 'docs/**' | |
- 'LICENSE' | |
- 'LICENSE.txt' | |
- 'README.md' | |
env: | |
BUILD_TYPE: Release | |
SCCACHE_GHA_ENABLED: "true" | |
jobs: | |
Test: | |
name: ${{ matrix.config.os }} ${{ matrix.config.compiler }} | |
runs-on: ${{ matrix.config.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
config: | |
# Reference: https://github.com/actions/runner-images | |
- { os: "ubuntu-24.04", compiler: "gcc", cmake_gen: "Ninja Multi-Config", cmake_cxx: "/usr/bin/g++-14", cmake_cxx_launcher: "ccache" } | |
- { os: "ubuntu-24.04", compiler: "llvm", cmake_gen: Ninja Multi-Config, cmake_cxx: "/usr/lib/llvm-18/bin/clang++", cmake_cxx_launcher: "ccache" } | |
# project won't compile using g++ on macos-15; can use macos-14 instead | |
#- { os: "macos-15", compiler: "gcc", cmake_gen: "Ninja Multi-Config", cmake_cxx: "g++-14", cmake_cxx_launcher: "ccache" } | |
- { os: "macos-14", compiler: "gcc", cmake_gen: "Ninja Multi-Config", cmake_cxx: "g++-14", cmake_cxx_launcher: "ccache" } | |
- { os: "macos-15", compiler: "llvm", cmake_gen: "Ninja Multi-Config", cmake_cxx: "$(brew --prefix llvm@18)/bin/clang++", cmake_cxx_launcher: "ccache" } | |
- { os: windows-2022, compiler: "msvc", cmake_gen: "Ninja Multi-Config", cmake_cxx: "cl", cmake_cxx_launcher: "sccache" } | |
- { os: windows-2022, compiler: "llvm", cmake_gen: "Ninja Multi-Config", cmake_cxx: "clang++", cmake_cxx_launcher: "sccache" } | |
- { os: windows-2022, compiler: "gcc", cmake_gen: "Ninja Multi-Config", cmake_cxx: "g++", cmake_cxx_launcher: "sccache" } | |
#- { os: "macos-14", compiler: "llvm", cmake_gen: "Ninja Multi-Config", cmake_cxx: "clang++", cmake_cxx_launcher: "ccache" } | |
steps: | |
- uses: actions/checkout@v4 | |
# Reference: https://github.com/hendrikmuhs/ccache-action | |
- name: Cache (non-Windows) | |
if: runner.os != 'Windows' | |
uses: hendrikmuhs/[email protected] | |
with: | |
key: ${{ runner.os }}-${{ matrix.config.compiler }}-${{ env.BUILD_TYPE }} | |
# Reference: https://github.com/Mozilla-Actions/sccache-action | |
- name: Cache (Windows) | |
if: runner.os == 'Windows' | |
uses: mozilla-actions/[email protected] | |
# Reference: https://github.com/aminya/setup-cpp | |
- name: Install C++ Tools | |
uses: aminya/setup-cpp@v1 | |
with: | |
vcvarsall: ${{ runner.os == 'Windows' && matrix.config.compiler == 'msvc' }} | |
ninja: true | |
# Reference: https://cmake.org/cmake/help/latest/manual/cmake.1.html | |
- name: Configure CMake | |
run: cmake -B ./build -G "${{matrix.config.cmake_gen}}" -DCMAKE_CXX_COMPILER="${{matrix.config.cmake_cxx}}" -DCMAKE_CXX_COMPILER_LAUNCHER="${{matrix.config.cmake_cxx_launcher}}" | |
- name: Build | |
run: cmake --build ./build --config ${{env.BUILD_TYPE}} | |
# Reference: https://cmake.org/cmake/help/latest/manual/ctest.1.html | |
- name: Test | |
working-directory: ./build | |
run: ctest -C ${{env.BUILD_TYPE}} |