From e85569800c50bd78be1a9938778436e7599689a8 Mon Sep 17 00:00:00 2001 From: Giovanni Petrantoni <7008900+sinkingsugar@users.noreply.github.com> Date: Wed, 11 Nov 2020 23:22:39 +0900 Subject: [PATCH] Codecov extras (#430) * try fix codecov html artifacts path * wip * wip * wip * wip * fix options matrix --- .github/workflows/codecov.yml | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml index 817ce12..f2d2221 100644 --- a/.github/workflows/codecov.yml +++ b/.github/workflows/codecov.yml @@ -31,17 +31,20 @@ jobs: env MAKE="make -j${NPROC}" bash build_nim.sh Nim csources dist/nimble NimBinaries export PATH="$PATH:$PWD/Nim/bin" nimble install -y --depsOnly - export NIM_OPTIONS="--opt:speed -d:debug --verbosity:0 --hints:off --lineDir:on -d:chronicles_log_level=INFO --warning[CaseTransition]:off --warning[ObservableStores]:off --warning[LockLevel]:off --nimcache:nimcache --passC:-fprofile-arcs --passC:-ftest-coverage --passL:-fprofile-arcs --passL:-ftest-coverage ${{ matrix.options }}" + export NIM_OPTIONS="--opt:speed -d:debug --verbosity:0 --hints:off --lineDir:on -d:chronicles_log_level=INFO --warning[CaseTransition]:off --warning[ObservableStores]:off --warning[LockLevel]:off --nimcache:nimcache --passC:-fprofile-arcs --passC:-ftest-coverage --passL:-fprofile-arcs --passL:-ftest-coverage ${{ matrix.nim-options }}" nim c $NIM_OPTIONS -r ${{ matrix.test-program }} cd nimcache; rm *.c; cd .. lcov --capture --directory nimcache --output-file coverage/coverage.info lcov --extract coverage/coverage.info `pwd`/libp2p/* `pwd`/libp2p/**/* `pwd`/libp2p/**/**/* --output-file coverage/coverage.f.info - genhtml coverage/coverage.f.info --output-directory coverage/output-$GITHUB_RUN_ID + export COV_UUID=`cksum <<< "${{ matrix.test-program }} $NIM_OPTIONS" | cut -f 1 -d ' '` + genhtml coverage/coverage.f.info --output-directory coverage/$COV_UUID-output + echo ${{ matrix.test-program }} > coverage/$COV_UUID-nim_options.txt + echo $NIM_OPTIONS >> coverage/$COV_UUID-nim_options.txt bash <(curl -s https://codecov.io/bash) -f coverage/coverage.f.info || echo "Codecov did not collect coverage reports" - uses: actions/upload-artifact@master with: name: coverage - path: coverage/output-${{ env.GITHUB_RUN_ID }} + path: coverage Tests: runs-on: ubuntu-20.04 @@ -64,17 +67,20 @@ jobs: env MAKE="make -j${NPROC}" bash build_nim.sh Nim csources dist/nimble NimBinaries export PATH="$PATH:$PWD/Nim/bin" nimble install -y --depsOnly - export NIM_OPTIONS="--opt:speed -d:debug --verbosity:0 --hints:off --lineDir:on -d:chronicles_log_level=INFO --warning[CaseTransition]:off --warning[ObservableStores]:off --warning[LockLevel]:off --nimcache:nimcache --passC:-fprofile-arcs --passC:-ftest-coverage --passL:-fprofile-arcs --passL:-ftest-coverage ${{ matrix.options }}" + export NIM_OPTIONS="--opt:speed -d:debug --verbosity:0 --hints:off --lineDir:on -d:chronicles_log_level=INFO --warning[CaseTransition]:off --warning[ObservableStores]:off --warning[LockLevel]:off --nimcache:nimcache --passC:-fprofile-arcs --passC:-ftest-coverage --passL:-fprofile-arcs --passL:-ftest-coverage ${{ matrix.nim-options }}" nim c $NIM_OPTIONS -r ${{ matrix.test-program }} cd nimcache; rm *.c; cd .. lcov --capture --directory nimcache --output-file coverage/coverage.info lcov --extract coverage/coverage.info `pwd`/libp2p/* `pwd`/libp2p/**/* `pwd`/libp2p/**/**/* --output-file coverage/coverage.f.info - genhtml coverage/coverage.f.info --output-directory coverage/output-$GITHUB_RUN_ID + export COV_UUID=`cksum <<< "${{ matrix.test-program }} $NIM_OPTIONS" | cut -f 1 -d ' '` + genhtml coverage/coverage.f.info --output-directory coverage/$COV_UUID-output + echo ${{ matrix.test-program }} > coverage/$COV_UUID-nim_options.txt + echo $NIM_OPTIONS >> coverage/$COV_UUID-nim_options.txt bash <(curl -s https://codecov.io/bash) -f coverage/coverage.f.info || echo "Codecov did not collect coverage reports" - uses: actions/upload-artifact@master with: name: coverage - path: coverage/output-${{ env.GITHUB_RUN_ID }} + path: coverage Filter: runs-on: ubuntu-20.04 @@ -100,17 +106,20 @@ jobs: env MAKE="make -j${NPROC}" bash build_nim.sh Nim csources dist/nimble NimBinaries export PATH="$PATH:$PWD/Nim/bin" nimble install -y --depsOnly - export NIM_OPTIONS="--opt:speed -d:debug --verbosity:0 --hints:off --lineDir:on -d:chronicles_log_level=INFO --warning[CaseTransition]:off --warning[ObservableStores]:off --warning[LockLevel]:off --nimcache:nimcache --passC:-fprofile-arcs --passC:-ftest-coverage --passL:-fprofile-arcs --passL:-ftest-coverage ${{ matrix.options }}" + export NIM_OPTIONS="--opt:speed -d:debug --verbosity:0 --hints:off --lineDir:on -d:chronicles_log_level=INFO --warning[CaseTransition]:off --warning[ObservableStores]:off --warning[LockLevel]:off --nimcache:nimcache --passC:-fprofile-arcs --passC:-ftest-coverage --passL:-fprofile-arcs --passL:-ftest-coverage ${{ matrix.nim-options }}" nim c $NIM_OPTIONS -r ${{ matrix.test-program }} cd nimcache; rm *.c; cd .. lcov --capture --directory nimcache --output-file coverage/coverage.info lcov --extract coverage/coverage.info `pwd`/libp2p/* `pwd`/libp2p/**/* `pwd`/libp2p/**/**/* --output-file coverage/coverage.f.info - genhtml coverage/coverage.f.info --output-directory coverage/output-$GITHUB_RUN_ID + export COV_UUID=`cksum <<< "${{ matrix.test-program }} $NIM_OPTIONS" | cut -f 1 -d ' '` + genhtml coverage/coverage.f.info --output-directory coverage/$COV_UUID-output + echo ${{ matrix.test-program }} > coverage/$COV_UUID-nim_options.txt + echo $NIM_OPTIONS >> coverage/$COV_UUID-nim_options.txt bash <(curl -s https://codecov.io/bash) -f coverage/coverage.f.info || echo "Codecov did not collect coverage reports" - uses: actions/upload-artifact@master with: name: coverage - path: coverage/output-${{ env.GITHUB_RUN_ID }} + path: coverage