Skip to content
Draft
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
12 changes: 5 additions & 7 deletions .github/workflows/cmake-clang.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ on:
branches: [ "main" ]

env:
CXX_COMPILER: clang++-17
C_COMPILER: clang-17
CXX_COMPILER: clang++-20
C_COMPILER: clang-20

jobs:
build:
Expand All @@ -26,10 +26,8 @@ jobs:

- name: Prepare environment
run: |
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - && \
sudo add-apt-repository 'deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-17 main' && \
sudo apt update && \
sudo apt-get install clang-17 lldb-17 lld-17 libc++-17-dev libc++abi-17-dev
sudo apt-get update
sudo apt-get install -y clang-20 lld-20 libc++-20-dev libc++abi-20-dev

- name: Configure CMake
run: cmake -B ${{env.BUILD_DIR}} -DCMAKE_CXX_COMPILER=${{env.CXX_COMPILER}} -DCMAKE_C_COMPILER=${{env.C_COMPILER}} -DCMAKE_BUILD_TYPE=${{matrix.build_type}}
Expand All @@ -39,4 +37,4 @@ jobs:

- name: Test
working-directory: ${{env.BUILD_DIR}}
run: ctest -C ${{env.BUILD_TYPE}}
run: ctest -C ${{matrix.build_type}}
17 changes: 11 additions & 6 deletions .github/workflows/cmake-gcc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ on:
branches: [ "main" ]

env:
CXX_COMPILER: g++-12
C_COMPILER: gcc-12
CXX_COMPILER: g++-14
C_COMPILER: gcc-14

jobs:
build:
Expand All @@ -32,15 +32,19 @@ jobs:

- name: Test
working-directory: ${{env.BUILD_DIR}}
run: ctest -C ${{env.BUILD_TYPE}}
run: ctest -C ${{matrix.build_type}}

- name: Generate coverage report
if: ${{matrix.build_type == 'Debug'}}
working-directory: ${{github.workspace}}
run: |
sudo apt-get install lcov
lcov --gcov-tool gcov-12 --base-directory . --directory ${{env.BUILD_DIR}} -c -o coverage.info
lcov --gcov-tool gcov-12 --remove coverage.info "test/*" -o coverage.info
set -eux
python3 -m pip install --upgrade pip
python3 -m pip install gcovr
g++-14 --version
gcov-14 --version
gcovr --version
gcovr -r . --gcov-executable gcov-14 --object-directory ${{env.BUILD_DIR}} --exclude 'test/.*' --exclude '3p/.*' --lcov -o coverage.info

- name: Upload coverage to Codecov
if: ${{matrix.build_type == 'Debug'}}
Expand All @@ -49,3 +53,4 @@ jobs:
fail_ci_if_error: true
verbose: true
files: coverage.info
token: ${{ secrets.CODECOV_TOKEN }}
Loading