Skip to content

Fun tests

Fun tests #28

Workflow file for this run

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