Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* text=auto eol=lf
64 changes: 56 additions & 8 deletions .github/workflows/linux.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,46 @@ jobs:
matrix:
format: ["JSON", "AVRO", "BOOST_SERIALIZATION", "CAPNPROTO", "CBOR", "CEREAL", "FLEXBUFFERS", "MSGPACK", "PARQUET", "TOML", "UBJSON", "XML", "YAML", "benchmarks", "headers"]
compiler: [llvm, gcc]
compiler-version: [11, 12, 13, 14, 16, 17, 18]
compiler-version: [11, 12, 13, 14, 15, 16, 17, 18, 19]
cxx: [20, 23]
modules: ["OFF", "ON"]
exclude:
- compiler: gcc
- compiler: llvm
compiler-version: 16
modules: "ON"
- compiler: llvm
compiler-version: 17
modules: "ON"
- compiler: llvm
compiler-version: 18
modules: "ON"
- compiler: gcc
compiler-version: 11
modules: "ON"
- compiler: gcc
compiler-version: 12
modules: "ON"
- compiler: gcc
compiler-version: 13
modules: "ON"
- compiler: gcc
compiler-version: 14
modules: "ON"
# Keep the matrix below GitHub's 256-job limit: GCC 14 covers headers,
# while GCC 16 covers the minimum supported module compiler.
- compiler: gcc
compiler-version: 16
modules: "OFF"
- compiler: gcc
compiler-version: 15
- compiler: gcc
compiler-version: 17
- compiler: gcc
compiler-version: 18
- compiler: gcc
compiler-version: 19
- compiler: llvm
compiler-version: 15
- compiler: llvm
compiler-version: 11
- compiler: llvm
Expand All @@ -41,9 +72,9 @@ jobs:
- compiler: llvm
compiler-version: 17
cxx: 23
name: "${{ github.job }} (${{ matrix.format }}-C++${{ matrix.cxx }}-${{ matrix.compiler }}-${{ matrix.compiler-version }})"
name: "${{ github.job }} (${{ matrix.format }}-C++${{ matrix.cxx }}-${{ matrix.compiler }}-${{ matrix.compiler-version }}-modules-${{ matrix.modules }})"
concurrency:
group: "linux-${{ github.ref }}-${{ github.job }}-${{ matrix.format }}-C++${{ matrix.cxx }}-${{ matrix.compiler }}-${{ matrix.compiler-version }}"
group: "linux-${{ github.ref }}-${{ github.job }}-${{ matrix.format }}-C++${{ matrix.cxx }}-${{ matrix.compiler }}-${{ matrix.compiler-version }}-modules-${{ matrix.modules }}"
cancel-in-progress: true
runs-on: ubuntu-24.04
steps:
Expand All @@ -60,11 +91,28 @@ jobs:
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
- name: Run vcpkg
uses: lukka/run-vcpkg@v11
- name: Set up Python for benchmark tooling
if: matrix.format == 'benchmarks'
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Use CMake 3.31.6 for the pinned benchmark port
if: matrix.format == 'benchmarks'
shell: bash
run: |
python -m pip install cmake==3.31.6
python -c "import cmake; print(cmake.CMAKE_BIN_DIR)" >> "$GITHUB_PATH"
- name: Install dependencies
run: |
sudo apt update
if [[ "${{ matrix.compiler-version }}" == 11 ]]; then
sudo apt install -y ninja-build g++-11
elif [[ "${{ matrix.compiler }}" == "gcc" && "${{ matrix.compiler-version }}" == 16 ]]; then
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
sudo apt update
sudo apt install -y ninja-build g++-16
elif [[ "${{ matrix.compiler }}" == "llvm" && "${{ matrix.compiler-version }}" == 19 ]]; then
sudo apt install -y ninja-build clang-19 clang-tools-19
else
sudo apt install -y ninja-build
fi
Expand All @@ -79,13 +127,13 @@ jobs:
fi
$CXX --version
if [[ "${{ matrix.format }}" == "JSON" ]]; then
cmake -S . -B build -G Ninja -DCMAKE_CXX_STANDARD=${{ matrix.cxx }} -DCMAKE_CXX_STANDARD=20 -DREFLECTCPP_BUILD_TESTS=ON -DCMAKE_BUILD_TYPE=Release
cmake -S . -B build -G Ninja -DCMAKE_CXX_STANDARD=${{ matrix.cxx }} -DREFLECTCPP_BUILD_MODULES=${{ matrix.modules }} -DREFLECTCPP_BUILD_TESTS=ON -DCMAKE_BUILD_TYPE=Release
elif [[ "${{ matrix.format }}" == "benchmarks" ]]; then
cmake -S . -B build -G Ninja -DCMAKE_CXX_STANDARD=${{ matrix.cxx }} -DCMAKE_CXX_STANDARD=20 -DREFLECTCPP_BUILD_BENCHMARKS=ON -DREFLECTCPP_ALL_FORMATS=ON -DCMAKE_BUILD_TYPE=Release
cmake -S . -B build -G Ninja -DCMAKE_CXX_STANDARD=${{ matrix.cxx }} -DREFLECTCPP_BUILD_MODULES=${{ matrix.modules }} -DREFLECTCPP_BUILD_BENCHMARKS=ON -DREFLECTCPP_ALL_FORMATS=ON -DCMAKE_BUILD_TYPE=Release
elif [[ "${{ matrix.format }}" == "headers" ]]; then
cmake -S . -B build -G Ninja -DCMAKE_CXX_STANDARD=${{ matrix.cxx }} -DCMAKE_CXX_STANDARD=20 -DREFLECTCPP_CHECK_HEADERS=ON -DCMAKE_BUILD_TYPE=Release
cmake -S . -B build -G Ninja -DCMAKE_CXX_STANDARD=${{ matrix.cxx }} -DREFLECTCPP_BUILD_MODULES=${{ matrix.modules }} -DREFLECTCPP_CHECK_HEADERS=ON -DCMAKE_BUILD_TYPE=Release
else
cmake -S . -B build -G Ninja -DCMAKE_CXX_STANDARD=${{ matrix.cxx }} -DCMAKE_CXX_STANDARD=20 -DREFLECTCPP_BUILD_TESTS=ON -DREFLECTCPP_JSON=OFF -DREFLECTCPP_${{ matrix.format }}=ON -DCMAKE_BUILD_TYPE=Release
cmake -S . -B build -G Ninja -DCMAKE_CXX_STANDARD=${{ matrix.cxx }} -DREFLECTCPP_BUILD_MODULES=${{ matrix.modules }} -DREFLECTCPP_BUILD_TESTS=ON -DREFLECTCPP_JSON=OFF -DREFLECTCPP_${{ matrix.format }}=ON -DCMAKE_BUILD_TYPE=Release
fi
cmake --build build -j4
- name: Run tests
Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/macos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,15 @@ jobs:
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
- name: Run vcpkg
uses: lukka/run-vcpkg@v11
- name: Set up Python for benchmark tooling
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Use CMake 3.31.6 for the pinned benchmark port
shell: bash
run: |
python -m pip install cmake==3.31.6
python -c "import cmake; print(cmake.CMAKE_BIN_DIR)" >> "$GITHUB_PATH"
- name: Install bison
run: brew install bison openssl@3
- name: Install ninja
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/mkdocs-gh-pages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,24 @@ jobs:
version: 1.12.0

- name: Set git credentials
if: github.repository == 'getml/reflect-cpp'
run: |
git config --global user.name "${{ github.actor }}"
git config --global user.email "${{ github.actor }}@users.noreply.github.com"

- name: Fetch latest commit from gh-pages
if: github.repository == 'getml/reflect-cpp'
run: |
git fetch origin gh-pages --depth=1

- name: Deploy MkDocs documentation
if: github.repository == 'getml/reflect-cpp'
run: hatch run default:mkdocs gh-deploy

- name: Build MkDocs documentation on forks
if: github.repository != 'getml/reflect-cpp'
run: hatch run default:mkdocs build




Expand Down
17 changes: 17 additions & 0 deletions .github/workflows/windows.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,21 @@ jobs:
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
- uses: ilammy/msvc-dev-cmd@v1
- uses: lukka/run-vcpkg@v11
- name: Set up Python for benchmark tooling
if: matrix.format == 'benchmarks'
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Use CMake 3.31.6 for the pinned benchmark port
if: matrix.format == 'benchmarks'
shell: bash
run: |
python -m pip install cmake==3.31.6
python -c "import cmake; print(cmake.CMAKE_BIN_DIR)" >> "$GITHUB_PATH"
- name: Add vcpkg runtime DLLs to PATH
# Some ports expose UNKNOWN imported targets, so TARGET_RUNTIME_DLLS
# cannot stage their DLLs for GoogleTest discovery during the build.
run: '"${{ github.workspace }}\build\vcpkg_installed\x64-windows\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append'
- name: Compile benchmarks
if: matrix.format == 'benchmarks'
run: |
Expand Down Expand Up @@ -94,6 +109,8 @@ jobs:
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
- uses: ilammy/msvc-dev-cmd@v1
- uses: lukka/run-vcpkg@v11
- name: Add vcpkg runtime DLLs to PATH
run: '"${{ github.workspace }}\build\vcpkg_installed\x64-windows\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append'
- name: Compile tests (JSON)
if: matrix.format == 'JSON'
run: |
Expand Down
Loading