From 6f95b3181761f86d950c55c6a0edff7258d37236 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Astor?= Date: Fri, 21 Feb 2020 20:06:51 +0100 Subject: [PATCH] coverage test --- .github/workflows/coverage.yml | 105 ++++----------------------------- 1 file changed, 13 insertions(+), 92 deletions(-) diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 48d49358..d815ba27 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -1,111 +1,32 @@ - -name: Coverage Report +name: Linux 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: - - uses: actions/checkout@v1 - - - uses: actions/setup-python@v1 + - name: Build Gwion + uses: fennecdjay/gwion-action@v4 with: - python-version: '3.x' - - - name: submodules - run: git submodule update --init util ast - - - name: make - run: make + USE: ${{ matrix.double }} + RUN: true env: + CC: ${{ matrix.cc }} USE_COVERAGE: 1 - - - name: Tests - env: + CFLAGS: -fsanitize=address -fno-omit-frame-pointer + LDFLAGS: -fsanitize=address -fno-omit-frame-pointer VALGRIND: NO_VALGRIND USE_MEMCHECK: 0 SEVERITY: 3 - run: export GWION_TEST_DIR=${{ runner.tmp }}/tmp/test; mkdir $GWION_TEST_DIR && make test - - - 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 - rm -f gwion-coverage-report/*.html - - - 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//