Update C++ version to 20 #24
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: Linux | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
jobs: | |
build: | |
runs-on: ubuntu-24.04 | |
strategy: | |
matrix: | |
cxx: [g++-12, clang++-18] | |
build_type: [Debug, Release] | |
std: [20] | |
include: | |
- cxx: g++-12 | |
install: sudo apt install g++-12 | |
build_type: Debug | |
- cxx: clang++-18 | |
install: sudo apt install clang-18 libc++-18-dev libc++abi-18-dev | |
build_type: Debug | |
cxxflags: -stdlib=libc++ | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Create Build Environment | |
run: | | |
sudo apt update | |
${{matrix.install}} | |
- name: Configure CMake | |
env: | |
CXX: ${{matrix.cxx}} | |
CXXFLAGS: ${{matrix.cxxflags}} | |
run: | | |
cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{matrix.build_type}} -DCMAKE_CXX_STANDARD=${{matrix.std}} -DASS_ENABLE_TESTING=ON | |
- name: Build | |
# Build your program with the given configuration | |
run: | | |
threads=`nproc` | |
cmake --build ${{github.workspace}}/build --config ${{matrix.build_type}} --parallel $threads | |
- name: Test | |
working-directory: ${{github.workspace}}/build | |
# Execute tests defined by the CMake configuration. | |
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail | |
run: ctest -C ${{matrix.build_type}} | |
env: | |
CTEST_OUTPUT_ON_FAILURE: True |