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

Update coverage check workflow #218

Merged
merged 4 commits into from
Oct 15, 2024
Merged
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
29 changes: 10 additions & 19 deletions .github/workflows/coverage_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ on:
- synchronize
- reopened

env:
VCPKG_BINARY_SOURCES: 'clear;nuget,GitHub,readwrite'

jobs:
coverage:
runs-on: ubuntu-latest
Expand All @@ -18,47 +21,35 @@ jobs:
submodules: true
fetch-depth: 0

- name: Install Clang 16 and LLVM 16
run: |
sudo apt-get update
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh 16

- name: Set up dependencies
run: |
sudo apt-get update
sudo apt-get install -y cmake gcovr libsystemd-dev
sudo apt-get install -y autopoint libtool zlib1g-dev \
libgcrypt20-dev libmagic-dev libpopt-dev libmagic-dev \
libsqlite3-dev liblua5.4-dev gettext libarchive-dev
shell: bash

- name: Update PATH for LLVM
run: echo "/usr/lib/llvm-16/bin" >> $GITHUB_PATH
sudo apt-get install -y cmake llvm gcovr libsystemd-dev autopoint \
libtool zlib1g-dev libgcrypt20-dev libmagic-dev libpopt-dev \
libmagic-dev libsqlite3-dev liblua5.4-dev gettext libarchive-dev
shell: bash

- name: Set up Binary caching
- name: Set up Binary caching
uses: ./.github/actions/vcpkg_related/cover_vcpkg_dependencies
with:
gh_token: ${{ secrets.GITHUB_TOKEN }}

- name: Generate CMake project
run: |
mkdir -p build && cd build
cmake -DCMAKE_CXX_COMPILER=clang++-16 -DCMAKE_C_COMPILER=clang-16 ../src -DCMAKE_BUILD_TYPE=Debug -DBUILD_TESTS=1 -DCOVERAGE=1 -G "Unix Makefiles"
cmake -DCMAKE_CXX_COMPILER=clang++-16 -DCMAKE_C_COMPILER=clang-16 ../src -DCMAKE_BUILD_TYPE=Debug -DBUILD_TESTS=1 -DCOVERAGE=1 -DENABLE_CLANG_TIDY=OFF -G "Unix Makefiles"
shell: bash

- name: Compile
run: |
cd build
cmake --build . --config Debug
cmake --build . --config Debug -j $(nproc)
shell: bash

- name: Generate and Check Coverage
run: |
cd build
cmake --build . --target coverage
cmake --build . --target coverage -j $(nproc)
shell: bash

- name: Zip Coverage Files
Expand Down
Loading