Skip to content
Merged
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
46 changes: 46 additions & 0 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,52 @@ jobs:
- name: Test
run: ./build/test/dross_test --gtest_color=yes

# The requirements say either standard library works across the whole Clang
# range, so libc++ is verified at both ends rather than left to best effort.
# Covering only the lower bound would leave the upper end of the declared
# range unverified against libc++ header changes and newly added warnings —
# and -Werror is public, so those reach consumers.
#
# libc++ is not part of the runner image, but it comes from the
# distribution's own repository, so no external source enters a required gate.
build-ubuntu-clang-libcxx:
name: Ubuntu Clang ${{ matrix.clang }} libc++ (${{ matrix.build_type }})
runs-on: ubuntu-26.04
strategy:
fail-fast: false
matrix:
build_type: [Debug, Release]
clang: [20, 22]

steps:
- uses: actions/checkout@v7

- name: Install libc++
run: |
sudo apt-get update
sudo apt-get install -y \
libc++-${{ matrix.clang }}-dev libc++abi-${{ matrix.clang }}-dev

- name: Report toolchain versions
run: |
clang-${{ matrix.clang }} --version
cmake --version

- name: Configure CMake
run: |
cmake -S . -B build \
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
-DCMAKE_C_COMPILER=clang-${{ matrix.clang }} \
-DCMAKE_CXX_COMPILER=clang++-${{ matrix.clang }} \
-DCMAKE_CXX_FLAGS="-stdlib=libc++" \
-DCMAKE_EXE_LINKER_FLAGS="-stdlib=libc++"

- name: Build
run: cmake --build build --config ${{ matrix.build_type }} -j"$(nproc)"

- name: Test
run: ./build/test/dross_test --gtest_color=yes

build-static-library:
name: Static Library Build
runs-on: ubuntu-24.04
Expand Down
35 changes: 0 additions & 35 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,41 +98,6 @@ jobs:
- name: Test
run: ./build/test/dross_test --gtest_color=yes

# The required gates build Clang against the default standard library.
# This covers the other choice, so neither ends up being the only one that
# works.
libcxx:
name: Clang with libc++
runs-on: ubuntu-26.04

steps:
- uses: actions/checkout@v7

- name: Install libc++
run: |
sudo apt-get update
sudo apt-get install -y libc++-20-dev libc++abi-20-dev

- name: Report toolchain versions
run: |
clang-20 --version
cmake --version

- name: Configure CMake
run: |
cmake -S . -B build \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_C_COMPILER=clang-20 \
-DCMAKE_CXX_COMPILER=clang++-20 \
-DCMAKE_CXX_FLAGS="-stdlib=libc++" \
-DCMAKE_EXE_LINKER_FLAGS="-stdlib=libc++"

- name: Build
run: cmake --build build -j"$(nproc)"

- name: Test
run: ./build/test/dross_test --gtest_color=yes

floating-runners:
name: Floating Runner (${{ matrix.os }})
runs-on: ${{ matrix.os }}
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
### Requirements

- **C++23** compatible compiler, verified in CI as:
- Linux: GCC 13–15 or Clang 20–22
- Linux: GCC 13–15, or Clang 20–22 with either libstdc++ or libc++
- macOS: the Apple Clang shipped with macOS 15 or 26
- Newer versions are best effort, exercised by the nightly toolchain watch
- **CMake 3.20+**
Expand Down
5 changes: 3 additions & 2 deletions docs/sphinx/source/contributing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,9 @@ Development Setup
Build Requirements
~~~~~~~~~~~~~~~~~~

- C++23 compatible compiler: on Linux, GCC 13-15 or Clang 20-22; on macOS,
the Apple Clang shipped with macOS 15 or 26. Newer versions are best effort.
- C++23 compatible compiler: on Linux, GCC 13-15, or Clang 20-22 with either
libstdc++ or libc++; on macOS, the Apple Clang shipped with macOS 15 or 26.
Newer versions are best effort.
- CMake 3.20 or later
- Git

Expand Down
10 changes: 6 additions & 4 deletions docs/sphinx/source/getting-started.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,19 @@ To build and use dross, you need:

- **C++ Compiler**: Supporting C++23 standard

- On Linux: GCC 13 through 15, or Clang 20 through 22
- On Linux: GCC 13 through 15, or Clang 20 through 22 with either libstdc++
or libc++
- On macOS: the Apple Clang shipped with macOS 15 or 26

Newer versions are best effort: they are exercised by the nightly toolchain
watch rather than by the required build matrix.

The Clang lower bound is higher than the GCC one because older Clang
releases cannot compile this library's C++23 ``std::expected`` usage against
the libstdc++ they are paired with on Ubuntu 24.04, whether or not newer
libstdc++ headers are installed alongside. Either standard library works
from Clang 20 onwards, so neither is imposed.
the libstdc++ they are paired with on Ubuntu 24.04 — installing the
libstdc++ 14 headers alongside them does not change that either. From Clang
20 onwards both standard libraries work, and the build matrix verifies each
of them, so neither is imposed on you.

- **Build System**: CMake 3.20 or later
- **Operating System**: Linux or macOS
Expand Down
Loading