Skip to content

Fix/cmake

Fix/cmake #50

Workflow file for this run

name: Header
on:
push:
branches:
- 'master'
pull_request:
workflow_dispatch:
concurrency:
group: header-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: ${{ github.event_name != 'push' }}
env:
TZ: Europe/Berlin
defaults:
run:
shell: bash -Eexuo pipefail {0}
jobs:
build:
runs-on: ubuntu-latest
name: ${{ matrix.compiler }} ${{ matrix.type }}
if: github.repository_owner == 'xxsds' || github.event_name == 'workflow_dispatch'
strategy:
fail-fast: false
matrix:
compiler: ["clang-18", "gcc-14", "gcc-11"]
type: ["Release", "Debug"]
container:
image: ghcr.io/seqan/${{ matrix.compiler }}
volumes:
- /home/runner:/home/runner
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: true
- name: Get number of processors
run: echo "NUM_THREADS=$(getconf _NPROCESSORS_ONLN)" >> "$GITHUB_ENV"
- name: Load ccache
uses: actions/cache@v4
with:
path: /home/runner/.ccache
save-always: true
key: ccache-${{ runner.os }}-${{ github.workflow }}-${{ matrix.compiler }}-${{ github.ref }}
- name: Configure tests
run: |
mkdir bbuild && cd bbuild
cmake .. -DCMAKE_BUILD_TYPE=${{ matrix.type }} \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
-DCMAKE_CXX_FLAGS="-pedantic -Wall -Wextra -Werror -std=c++23" \
-DSDSL_CEREAL=1 \
-DSDSL_HEADER_TEST=ON
make -j${NUM_THREADS} gtest_build
- name: Build tests
working-directory: bbuild
run: |
ccache -z
make -k -j${NUM_THREADS} sdsl_header_test
ccache -sv
- name: Run tests
working-directory: bbuild
run: ctest . -j${NUM_THREADS} --output-on-failure