Skip to content

Merge pull request #128 from SGSSGene/fix/cmake #150

Merge pull request #128 from SGSSGene/fix/cmake

Merge pull request #128 from SGSSGene/fix/cmake #150

Workflow file for this run

name: macOS
on:
push:
branches:
- 'master'
pull_request:
workflow_dispatch:
concurrency:
group: macos-${{ 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: macos-12
name: ${{ matrix.compiler }} ${{ matrix.cereal == '1' && 'cereal' || '' }}
if: github.repository_owner == 'xxsds' || github.event_name == 'workflow_dispatch'
strategy:
fail-fast: false
matrix:
compiler: ["clang-18", "clang-17", "gcc-14", "gcc-13", "gcc-12", "gcc-11"]
cereal: ["0", "1"]
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: Setup toolchain
uses: seqan/actions/setup-toolchain@main
with:
compiler: ${{ matrix.compiler }}
ccache_size: 75M
- name: Configure tests
run: |
mkdir bbuild && cd bbuild
cmake .. -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
-DCMAKE_CXX_FLAGS="-pedantic -Wall -Wextra -Werror -std=c++23" \
-DSDSL_CEREAL=${{ matrix.cereal }}
make -j${NUM_THREADS} gtest_build
- name: Build tests
working-directory: bbuild
run: |
ccache -z
make -k -j${NUM_THREADS} sdsl_test_targets sdsl_examples sdsl_tutorials
ccache -sv
- name: Run tests
working-directory: bbuild
run: ctest . -j${NUM_THREADS} --output-on-failure