Skip to content

Added invocable affordance #27

Added invocable affordance

Added invocable affordance #27

Workflow file for this run

name: CMake
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
name: Build ${{ matrix.build_type }} using ${{ matrix.toolchain.name }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
build_type: [ Debug, RelWithDebInfo ]
toolchain:
- { name: gcc-14, c_compiler: gcc, cxx_compiler: g++, version: "14", image: "gcc:14" }
- { name: gcc-15, c_compiler: gcc, cxx_compiler: g++, version: "15", image: "gcc:15" }
- { name: clang-19, c_compiler: clang-19, cxx_compiler: clang++-19, version: "19", image: "ghcr.io/silkeh/clang:19" }
- { name: clang-20, c_compiler: clang-20, cxx_compiler: clang++-20, version: "20", image: "ghcr.io/silkeh/clang:20" }
container:
image: ${{ matrix.toolchain.image }}
steps:
- uses: actions/checkout@v4
- name: Install dependencies
shell: bash
run: |
apt-get update
apt-get install -y --no-install-recommends ca-certificates gnupg lsb-release wget
wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc | gpg --dearmor -o /usr/share/keyrings/kitware-archive-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ jammy main" > /etc/apt/sources.list.d/kitware.list
apt-get update
apt-get install -y --no-install-recommends cmake git
- name: Configure CMake
shell: bash
run: |
if [[ "${{ matrix.toolchain.name }}" == clang* ]]; then
STDLIB_FLAGS="-DCMAKE_CXX_FLAGS=-stdlib=libc++ -DCMAKE_EXE_LINKER_FLAGS=-stdlib=libc++"
else
STDLIB_FLAGS=""
fi
cmake -B build \
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
-DCMAKE_C_COMPILER=${{ matrix.toolchain.c_compiler }} \
-DCMAKE_CXX_COMPILER=${{ matrix.toolchain.cxx_compiler }} \
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
-DSIMPLY_INSTALL_PRE_COMMIT_HOOKS=OFF \
${STDLIB_FLAGS} \
-S .
- name: Build
run: cmake --build build --config ${{ matrix.build_type }}
- name: Test
working-directory: build
run: ctest --build-config ${{ matrix.build_type }}