Skip to content

Rewritten CI from scratch #9

Rewritten CI from scratch

Rewritten CI from scratch #9

Workflow file for this run

name: Linux Continuous Integrations
on:
push:
branches: [ master ]
paths:
- '!**'
- '**.h'
- '**.cc'
- Makefile
- 'meson*'
- '**/CMakeLists.txt'
- .github/workflows/ci-linux.yml
pull_request:
branches: [ master ]
paths:
- '!**'
- '**.h'
- '**.cc'
- Makefile
- 'meson*'
- '**/CMakeLists.txt'
- .github/workflows/ci-linux.yml
jobs:
ci-linux:
strategy:
fail-fast: false
matrix:
os: [ubuntu-24.04, ubuntu-24.04-arm, ubuntu-22.04, ubuntu-22.04-arm]
compiler:
- {c: gcc, cpp: g++}
- {c: clang, cpp: clang++}
sanitize: [address, undefined, thread]
build_system: [cmake, meson]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install --yes -qq meson libboost-all-dev
- name: Build and test with CMake
if: matrix.build_system == 'cmake'
env:
CC: ${{ matrix.compiler.c }}
CXX: ${{ matrix.compiler.cpp }}
run: |
cmake -S . -G Ninja -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_FLAGS_INIT="-fsanitize=${{ matrix.sanitize }}" -DCMAKE_CXX_FLAGS_INIT="-fsanitize=${{ matrix.sanitize }}" -DCMAKE_EXE_LINKER_FLAGS_INIT="-fsanitize=${{ matrix.sanitize }}" -DATOMIC_QUEUE_BUILD_TESTS=ON -DATOMIC_QUEUE_BUILD_EXAMPLES=ON
cmake --build build --target all
ctest --test-dir build --output-on-failure
- name: Build and test with Meson
if: matrix.build_system == 'meson'
env:
CC: ${{ matrix.compiler.c }}
CXX: ${{ matrix.compiler.cpp }}
run: |
meson setup build -Dwerror=true -Dwarning_level=3 -Db_sanitize=${{ matrix.sanitize }}
meson compile -C build
meson test -C build --print-errorlogs
ci-linux-makefile:
strategy:
fail-fast: false
matrix:
toolset: [gcc, clang]
os: [ubuntu-22.04, ubuntu-24.04, ubuntu-22.04-arm, ubuntu-24.04-arm]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v6
- name: Install Boost.Test
run: |
sudo apt-get update
sudo apt-get install --yes -qq libboost-test-dev
- name: Environment variables
run: make -r TOOLSET=${{ matrix.toolset }} env
- name: Toolset versions
run: make -r TOOLSET=${{ matrix.toolset }} versions
- name: Build and run unit tests
run: make -rj2 TOOLSET=${{ matrix.toolset }} example run_tests
- name: Build and run unit tests with address sanitizer
run: make -rj2 TOOLSET=${{ matrix.toolset }} BUILD=sanitize2 run_tests
- name: Build and run unit tests with thread sanitizer
run: make -rj2 TOOLSET=${{ matrix.toolset }} BUILD=sanitize run_tests