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

Switch to using Codecov GitHub Action. #1158

Merged
merged 5 commits into from
Feb 23, 2022
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
26 changes: 26 additions & 0 deletions .codecov.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
codecov:
max_report_age: off
notify:
wait_for_ci: false
require_ci_to_pass: false
comment:
require_base: false
require_head: false
coverage:
status:
project:
default:
threshold: 0.07
fixes:
- '/home/actions-runner/_work/zlib-ng/zlib-ng::'
- '/home/actions-runner/_work/zlib-ng/zlib-ng/build/::'
ignore:
- usr/include/.*
- /usr/include/.*
- /build/usr/include/.*
- usr/lib/.*
- /usr/lib/.*
- /build/usr/lib/.*
- usr/lib64/.*
- /usr/lib64/.*
- /build/usr/lib64/.*
34 changes: 20 additions & 14 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -432,28 +432,34 @@ jobs:
TSAN_OPTIONS: ${{ matrix.tsan-options || 'verbosity=0' }}:abort_on_error=1
LSAN_OPTIONS: ${{ matrix.lsan-options || 'verbosity=0' }}:abort_on_error=1

- name: Upload coverage report
if: matrix.codecov && ( env.CODECOV_TOKEN_SECRET != '' || github.repository == 'zlib-ng/zlib-ng' )
- name: Generate coverage report
if: matrix.codecov
shell: bash
run: |
python -u -m pip install --user codecov
bash tools/codecov-upload.sh
python3 -u -m pip install --user gcovr
python3 -m gcovr --exclude-unreachable-branches --gcov-executable "${{ matrix.gcov-exec || 'gcov' }}" --root ${{ matrix.build-src-dir || '.' }} --xml --output coverage.xml --verbose
nmoinvaz marked this conversation as resolved.
Show resolved Hide resolved

- name: Upload coverage report
uses: codecov/codecov-action@v2
if: matrix.codecov && (env.CODECOV_TOKEN != '' || github.repository == 'zlib-ng/zlib-ng')
with:
token: ${{ secrets.CODECOV_TOKEN || 'e4fdf847-f541-4ab1-9d50-3d27e5913906' }}
flags: ${{ matrix.codecov }}
name: ${{ matrix.name }}
directory: ${{ matrix.build-src-dir || '.' }}
verbose: true
fail_ci_if_error: true
env:
# Codecov does not yet support GitHub Actions
CODECOV_TOKEN_SECRET: "${{secrets.CODECOV_TOKEN}}"
CODECOV_TOKEN: "${{ secrets.CODECOV_TOKEN || 'e4fdf847-f541-4ab1-9d50-3d27e5913906' }}"
CODECOV_FLAGS: "${{ matrix.codecov }}"
CODECOV_NAME: "${{ matrix.name }}"
CODECOV_EXEC: "${{ matrix.gcov-exec || 'gcov' }}"
CODECOV_DIR: "${{ matrix.build-dir || '.' }}"
CODECOV_TOKEN: "${{secrets.CODECOV_TOKEN}}"

- name: Upload build errors
uses: actions/upload-artifact@v2
if: failure()
with:
name: ${{ matrix.name }} (cmake)
path: |
${{ matrix.build-dir || '.' }}/CMakeFiles/CMakeOutput.log
${{ matrix.build-dir || '.' }}/CMakeFiles/CMakeError.log
${{ matrix.build-dir || '.' }}/Testing/Temporary/*
**/CMakeFiles/CMakeOutput.log
**/CMakeFiles/CMakeError.log
**/Testing/Temporary/*
coverage.xml
retention-days: 30
32 changes: 16 additions & 16 deletions .github/workflows/pigz.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,6 @@ jobs:
sudo apt-get update
sudo apt-get install -y ${{ matrix.packages }}

- name: Install codecov.io tools
if: matrix.codecov
run: |
python -u -m pip install codecov

- name: Generate project files
run: |
cd test/pigz
Expand All @@ -90,19 +85,23 @@ jobs:
cd test/pigz
ctest --verbose -C Release --output-on-failure --max-width 120 -j ${{ matrix.parallels-jobs || '2' }}

- name: Upload coverage report
if: matrix.codecov && ( env.CODECOV_TOKEN_SECRET != '' || github.repository == 'zlib-ng/zlib-ng' )
shell: bash
- name: Generate coverage report
if: matrix.codecov
run: |
bash tools/codecov-upload.sh
python3 -u -m pip install --user gcovr
python3 -m gcovr --exclude-unreachable-branches --gcov-executable "${{ matrix.gcov-exec || 'gcov' }}" --root . --xml --output coverage.xml --verbose
nmoinvaz marked this conversation as resolved.
Show resolved Hide resolved

- name: Upload coverage report
uses: codecov/codecov-action@v2
if: matrix.codecov && (env.CODECOV_TOKEN != '' || github.repository == 'zlib-ng/zlib-ng')
with:
token: ${{ secrets.CODECOV_TOKEN || 'e4fdf847-f541-4ab1-9d50-3d27e5913906' }}
flags: ${{ matrix.codecov }}
name: ${{ matrix.name }}
verbose: true
fail_ci_if_error: true
env:
# Codecov does not yet support GitHub Actions
CODECOV_TOKEN_SECRET: "${{secrets.CODECOV_TOKEN}}"
CODECOV_TOKEN: "${{ secrets.CODECOV_TOKEN || 'e4fdf847-f541-4ab1-9d50-3d27e5913906' }}"
CODECOV_FLAGS: "${{ matrix.codecov }}"
CODECOV_NAME: "${{ matrix.name }}"
CODECOV_EXEC: "${{ matrix.gcov-exec || 'gcov' }}"
CODECOV_DIR: "."
CODECOV_TOKEN: ${{secrets.CODECOV_TOKEN}}

- name: Upload build errors
uses: actions/upload-artifact@v2
Expand All @@ -113,4 +112,5 @@ jobs:
**/CMakeFiles/CMakeOutput.log
**/CMakeFiles/CMakeError.log
**/Testing/Temporary/*
coverage.xml
retention-days: 30
3 changes: 3 additions & 0 deletions arch/s390/self-hosted-builder/actions-runner.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,12 @@ RUN apt-get update && apt-get -y install \
gcc \
git \
jq \
libxml2-dev \
libxslt-dev \
ninja-build \
python-is-python3 \
python3 \
python3-dev \
python3-pip

# amd64 dependencies.
Expand Down
9 changes: 0 additions & 9 deletions tools/codecov-upload.sh

This file was deleted.