-
Notifications
You must be signed in to change notification settings - Fork 144
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CI: move coverage to its own workflow
- Loading branch information
1 parent
d19e9d0
commit 2f9734b
Showing
2 changed files
with
42 additions
and
34 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
name: Coverage | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
branches: [ master ] | ||
|
||
jobs: | ||
linux-coverage: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- name: Install dependencies | ||
run: | | ||
sudo add-apt-repository ppa:ubuntu-toolchain-r/test | ||
sudo apt-get update | ||
sudo apt-get install -y g++-14 | ||
wget https://github.com/linux-test-project/lcov/releases/download/v2.3/lcov-2.3.tar.gz | ||
tar -xvf lcov-2.3.tar.gz | ||
cd lcov-2.3 | ||
sudo make install | ||
sudo cpan App::cpanminus | ||
sudo cpanm --notest Capture::Tiny DateTime | ||
- name: Configure | ||
run: cmake --preset=ci-coverage | ||
- name: Build | ||
run: cmake --build build/ci-coverage -j8 | ||
- name: Run tests | ||
run: ctest --test-dir build/ci-coverage --output-on-failure --no-tests=error -j8 | ||
- name: Process coverage info | ||
run: cmake --build build/ci-coverage -t coverage | ||
- name: Submit to codecov.io | ||
uses: codecov/codecov-action@v5 | ||
with: | ||
files: build/ci-coverage/coverage.info | ||
plugins: noop | ||
disable_search: true | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
verbose: true |