Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix clang build #548

Merged
merged 4 commits into from
May 23, 2024
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
20 changes: 7 additions & 13 deletions .github/workflows/linux-clang-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ env:

jobs:
build:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04

steps:
- name: Checkout
Expand All @@ -22,24 +22,18 @@ jobs:

- name: Install apt-get dependencies
run: |
sudo add-apt-repository ppa:trebelnik-stefina/launchpad-getkeys \
&& sudo apt-get update \
&& sudo apt-get install launchpad-getkeys \
&& sudo sudo apt-get update \
&& sudo add-apt-repository 'deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-16 main' \
&& sudo launchpad-getkeys \
&& sudo apt-get update -y \
&& sudo apt-get install -y lld-16 ninja-build build-essential libstdc++-13-dev \
clang-16 clang-tools-16 llvm-16 lcov
sudo apt -qq update \
&& sudo apt install -y --no-install-recommends --no-install-suggests ninja-build

- name: Initialize submodules
run: git submodule update --init --recursive

- name: Configure CMake
run: |
cmake -B ${{github.workspace}}/build \
cmake -S ${{github.workspace}} -B ${{github.workspace}}/build \
-DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} \
-DCMAKE_CXX_COMPILER=/usr/bin/clang++-16 \
-DCMAKE_C_COMPILER=/usr/bin/clang-18 \
-DCMAKE_CXX_COMPILER=/usr/bin/clang++-18 \
-DCODE_COVERAGE:BOOL=ON \
-GNinja

Expand All @@ -50,7 +44,7 @@ jobs:
working-directory: ${{github.workspace}}/build
run: |
ninja faker-ccov-all \
&& llvm-cov-16 show `cat ccov/binaries.list` -instr-profile=ccov/all-merged.profdata > coverage.txt
&& llvm-cov-18 show `cat ccov/binaries.list` -instr-profile=ccov/all-merged.profdata > coverage.txt

- name: Codecov
uses: codecov/[email protected]
Expand Down
4 changes: 2 additions & 2 deletions cmake/cmake-coverage.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ option(
OFF)

# Programs
find_program(LLVM_COV_PATH llvm-cov-16)
find_program(LLVM_PROFDATA_PATH llvm-profdata-16)
find_program(LLVM_COV_PATH llvm-cov-18)
find_program(LLVM_PROFDATA_PATH llvm-profdata-18)
find_program(LCOV_PATH lcov)
find_program(GENHTML_PATH genhtml)
# Hide behind the 'advanced' mode flag for GUI/ccmake
Expand Down
Loading