cleanup CI #122
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: ["main"] | |
pull_request: | |
branches: ["main"] | |
jobs: | |
build: | |
runs-on: ${{ matrix.os.name }}-${{ matrix.os.version }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
- name: ubuntu | |
version: 24.04 | |
build_type: [Release, Debug] | |
cpp_version: [20, 23, 26] | |
boost_version: [1.86.0] | |
compiler: | |
- vendor: GNU | |
version: 13 | |
executable: g++-13 | |
- vendor: GNU | |
version: 14 | |
executable: g++-14 | |
- vendor: LLVM | |
version: 19 | |
executable: clang++-19 | |
- vendor: LLVM | |
version: 20 | |
executable: clang++-20 | |
exclude: | |
- compiler: | |
vendor: GNU | |
version: 13 | |
cpp_version: 26 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Clang | |
if: matrix.compiler.vendor == 'LLVM' | |
run: | | |
wget https://apt.llvm.org/llvm.sh | |
chmod +x ./llvm.sh | |
sudo ./llvm.sh ${{ matrix.compiler.version }} all | |
- name: Setup GCC | |
if: matrix.compiler.vendor == 'GNU' | |
run: sudo apt update && sudo apt install -y g++-${{ matrix.compiler.version }} | |
- name: Cache Boost | |
uses: actions/cache@v4 | |
id: cache-boost | |
with: | |
path: ${{ github.workspace }}/boost/dist | |
key: boost-${{ matrix.boost_version }}-${{ matrix.os.name }}-${{ matrix.compiler.executable }}-${{ matrix.cpp_version }} | |
- name: Clone Boost | |
if: steps.cache-boost.outputs.cache-hit != 'true' | |
uses: actions/checkout@v4 | |
with: | |
repository: boostorg/boost | |
ref: boost-${{ matrix.boost_version }} | |
path: boost | |
- name: Setup Boost | |
if: steps.cache-boost.outputs.cache-hit != 'true' | |
working-directory: ${{ github.workspace }}/boost | |
run: | | |
git submodule update --depth 1 --init tools/boostdep | |
git submodule update --depth 1 --init tools/cmake | |
git submodule update --depth 1 --init libs/test | |
python3 tools/boostdep/depinst/depinst.py -X test -g "--depth 1" test | |
cmake -Bbuild -S. | |
cmake --build build \ | |
-DCMAKE_CXX_COMPILER=${{ matrix.compiler.executable }} \ | |
-DCMAKE_BUILD_TYPE=Debug \ | |
-DCMAKE_CXX_STANDARD=${{ matrix.cpp_version }} | |
cmake --install build --prefix dist | |
cmake --build build \ | |
-DCMAKE_CXX_COMPILER=${{ matrix.compiler.executable }} \ | |
-DCMAKE_BUILD_TYPE=Release \ | |
-DCMAKE_CXX_STANDARD=${{ matrix.cpp_version }} | |
cmake --install build --prefix dist | |
- name: Configure CMake | |
run: > | |
cmake -B ${{ github.workspace }}/build | |
-DCMAKE_CXX_COMPILER=${{ matrix.compiler.executable }} | |
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} | |
-DCMAKE_CXX_STANDARD=${{ matrix.cpp_version }} | |
-DCMAKE_PREFIX_PATH=${{ github.workspace }}/boost/dist | |
-S ${{ github.workspace }} | |
- name: Build | |
run: cmake --build ${{ github.workspace }}/build --verbose --config ${{ matrix.build_type }} --target yk_util_test | |
- name: Test | |
working-directory: ${{ github.workspace }}/build/test | |
run: ./yk_util_test --report_level=short |