Skip to content

Commit

Permalink
Switch to using Codecov GitHub Action.
Browse files Browse the repository at this point in the history
  • Loading branch information
nmoinvaz committed Feb 6, 2022
1 parent 66c6a63 commit 5a2e2f7
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 23 deletions.
35 changes: 21 additions & 14 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -432,28 +432,35 @@ 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' )
shell: bash
- name: Generate coverage report
if: matrix.codecov && (env.CODECOV_TOKEN_SECRET != '' || github.repository == 'zlib-ng/zlib-ng')
run: |
python -u -m pip install --user codecov
bash tools/codecov-upload.sh
python3 -u -m pip install --user gcovr
python3 -m gcovr --gcov-executable "${{ matrix.gcov-exec || 'gcov' }}" --root "${{ matrix.build-src-dir || '.' }}" --xml --output coverage.xml --verbose
env:
CODECOV_TOKEN_SECRET: "${{secrets.CODECOV_TOKEN}}"

- name: Upload coverage report
uses: codecov/codecov-action@v2
if: matrix.codecov && (env.CODECOV_TOKEN_SECRET != '' || 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 || '.' }}"

- 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
9 changes: 0 additions & 9 deletions tools/codecov-upload.sh

This file was deleted.

0 comments on commit 5a2e2f7

Please sign in to comment.