From: Jérémie Astor Date: Fri, 21 Feb 2020 19:15:15 +0000 (+0100) Subject: coverage test X-Git-Tag: nightly~1808 X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=12756f0169c4d06b0abdc69be662d685f490e25e;p=gwion.git coverage test --- diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 228947db..be907d02 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -1,32 +1,96 @@ -name: Coverage + +name: Coverage Report on: push: branches: - '**' - '!gh-pages' + pull_request: + branches: + - '**' + - '!gh-pages' jobs: build: - name: ${{ matrix.cc }} ${{ matrix.double && 'double' || 'float'}} runs-on: ubuntu-latest if: "!contains(github.event.head_commit.message, '[skip ci]')" - strategy: - matrix: - cc: [gcc, clang] - double: [0, 1] steps: - - name: Build Gwion - uses: fennecdjay/gwion-action@v4 + - uses: fennecdjay/gwion-action@v4 with: - USE: ${{ matrix.double }} - RUN: true + dir: . + ref: ${ github.head } env: - CC: ${{ matrix.cc }} USE_COVERAGE: 1 - CFLAGS: -fsanitize=address -fno-omit-frame-pointer - LDFLAGS: -fsanitize=address -fno-omit-frame-pointer - VALGRIND: NO_VALGRIND - USE_MEMCHECK: 0 - SEVERITY: 3 + + - uses: actions/setup-python@v1 + with: + python-version: '3.x' + + - name: Install gcovr + run: | + pip install git+https://github.com/gcovr/gcovr.git + + - name: Clone report repo + run: git clone https://github.com/fennecdjay/gwion-coverage-report + + - name: Generate Report + run: | + printf '# Gwion coverage\n```\n' > gwion-coverage-report/README.md + gcovr -s --filter '.*\.c$' src >> gwion-coverage-report/README.md + printf '```\n' >> gwion-coverage-report/README.md + COV_TXT=$(gcovr -s --html-details index.html --html-title "Gwion coverage report" --filter '.*\.c$' src | grep lines | cut -d" " -f2) + COV_NUM=${COV_TXT: : -1} + echo $COV_NUM > gwion-coverage-report/coverage_num.txt + sed -i 's//