Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions .github/workflows/check-code-format.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Check Code Format

on:
push:
branches: [ master ]
paths:
- '!**'
- '**.h'
- '**.cc'
- .github/workflows/check-code-format.yml
pull_request:
branches: [ master ]
paths:
- '!**'
- '**.h'
- '**.cc'
- .github/workflows/check-code-format.yml

jobs:
check-code-format:
runs-on: ubuntu-24.04
steps:
- name: Checkout code
uses: actions/checkout@v6

- name: Install clang-format
env:
CLANG_FORMAT_VERSION: 22
run: |
UBUNTU_CODENAME=$(. /etc/os-release && echo $VERSION_CODENAME)
wget -qO- https://apt.llvm.org/llvm-snapshot.gpg.key | sudo tee /etc/apt/trusted.gpg.d/apt.llvm.org.asc
echo "deb http://apt.llvm.org/${UBUNTU_CODENAME}/ llvm-toolchain-${UBUNTU_CODENAME}-${CLANG_FORMAT_VERSION} main" | sudo tee /etc/apt/sources.list.d/llvm.list
echo "deb-src http://apt.llvm.org/${UBUNTU_CODENAME}/ llvm-toolchain-${UBUNTU_CODENAME}-${CLANG_FORMAT_VERSION} main" | sudo tee -a /etc/apt/sources.list.d/llvm.list
sudo apt-get update
sudo apt-get install clang-format-${CLANG_FORMAT_VERSION}
sudo ln -s -f /usr/bin/clang-format-${CLANG_FORMAT_VERSION} /usr/bin/clang-format
clang-format --version

- name: Check code format
run: |
find . -type f \( -name "*.h" -o -name "*.cc" \) > source_files.txt
clang-format --dry-run --Werror --verbose --files=source_files.txt
98 changes: 98 additions & 0 deletions .github/workflows/ci-linux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
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
62 changes: 62 additions & 0 deletions .github/workflows/ci-macos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: macOS Continuous Integrations

on:
push:
branches: [ master ]
paths:
- '!**'
- '**.h'
- '**.cc'
- 'meson*'
- '**/CMakeLists.txt'
- .github/workflows/ci-macos.yml
pull_request:
branches: [ master ]
paths:
- '!**'
- '**.h'
- '**.cc'
- 'meson*'
- '**/CMakeLists.txt'
- .github/workflows/ci-macos.yml

jobs:
ci-macos:
strategy:
fail-fast: false
matrix:
os: [macos-26, macos-26-intel]
compiler:
- {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: |
brew install meson boost

- 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
49 changes: 0 additions & 49 deletions .github/workflows/ci-meson.yml

This file was deleted.

48 changes: 48 additions & 0 deletions .github/workflows/ci-windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Windows Continuous Integrations

on:
push:
branches: [ master ]
paths:
- '!**'
- '**.h'
- '**.cc'
- '**/CMakeLists.txt'
- .github/workflows/ci-windows.yml
pull_request:
branches: [ master ]
paths:
- '!**'
- '**.h'
- '**.cc'
- '**/CMakeLists.txt'
- .github/workflows/ci-windows.yml

jobs:
ci-windows:
strategy:
fail-fast: false
matrix:
os: [windows-2025, windows-2022]
build_system: [cmake]

runs-on: ${{ matrix.os }}

steps:
- name: Checkout code
uses: actions/checkout@v6

- name: Install boost
uses: MarkusJx/install-boost@v2.6.0
id: install-boost-windows
with:
boost_version: 1.89.0
platform_version: 2022
toolset: msvc

- name: Build and test with CMake
if: matrix.build_system == 'cmake'
run: |
cmake -S . -G Ninja -B build -DCMAKE_BUILD_TYPE=Release -DBOOST_ROOT="${{steps.install-boost-windows.outputs.BOOST_ROOT}}" -DATOMIC_QUEUE_BUILD_TESTS=ON -DATOMIC_QUEUE_BUILD_EXAMPLES=ON
cmake --build build --target all
ctest --test-dir build --output-on-failure
52 changes: 0 additions & 52 deletions .github/workflows/ci.yml

This file was deleted.

Loading
Loading