mirror of https://github.com/vacp2p/nim-libp2p.git
Codecov extras (#430)
* try fix codecov html artifacts path * wip * wip * wip * wip * fix options matrix
This commit is contained in:
parent
96ed9fbe85
commit
e85569800c
|
@ -31,17 +31,20 @@ jobs:
|
||||||
env MAKE="make -j${NPROC}" bash build_nim.sh Nim csources dist/nimble NimBinaries
|
env MAKE="make -j${NPROC}" bash build_nim.sh Nim csources dist/nimble NimBinaries
|
||||||
export PATH="$PATH:$PWD/Nim/bin"
|
export PATH="$PATH:$PWD/Nim/bin"
|
||||||
nimble install -y --depsOnly
|
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 }}
|
nim c $NIM_OPTIONS -r ${{ matrix.test-program }}
|
||||||
cd nimcache; rm *.c; cd ..
|
cd nimcache; rm *.c; cd ..
|
||||||
lcov --capture --directory nimcache --output-file coverage/coverage.info
|
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
|
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"
|
bash <(curl -s https://codecov.io/bash) -f coverage/coverage.f.info || echo "Codecov did not collect coverage reports"
|
||||||
- uses: actions/upload-artifact@master
|
- uses: actions/upload-artifact@master
|
||||||
with:
|
with:
|
||||||
name: coverage
|
name: coverage
|
||||||
path: coverage/output-${{ env.GITHUB_RUN_ID }}
|
path: coverage
|
||||||
|
|
||||||
Tests:
|
Tests:
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
|
@ -64,17 +67,20 @@ jobs:
|
||||||
env MAKE="make -j${NPROC}" bash build_nim.sh Nim csources dist/nimble NimBinaries
|
env MAKE="make -j${NPROC}" bash build_nim.sh Nim csources dist/nimble NimBinaries
|
||||||
export PATH="$PATH:$PWD/Nim/bin"
|
export PATH="$PATH:$PWD/Nim/bin"
|
||||||
nimble install -y --depsOnly
|
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 }}
|
nim c $NIM_OPTIONS -r ${{ matrix.test-program }}
|
||||||
cd nimcache; rm *.c; cd ..
|
cd nimcache; rm *.c; cd ..
|
||||||
lcov --capture --directory nimcache --output-file coverage/coverage.info
|
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
|
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"
|
bash <(curl -s https://codecov.io/bash) -f coverage/coverage.f.info || echo "Codecov did not collect coverage reports"
|
||||||
- uses: actions/upload-artifact@master
|
- uses: actions/upload-artifact@master
|
||||||
with:
|
with:
|
||||||
name: coverage
|
name: coverage
|
||||||
path: coverage/output-${{ env.GITHUB_RUN_ID }}
|
path: coverage
|
||||||
|
|
||||||
Filter:
|
Filter:
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
|
@ -100,17 +106,20 @@ jobs:
|
||||||
env MAKE="make -j${NPROC}" bash build_nim.sh Nim csources dist/nimble NimBinaries
|
env MAKE="make -j${NPROC}" bash build_nim.sh Nim csources dist/nimble NimBinaries
|
||||||
export PATH="$PATH:$PWD/Nim/bin"
|
export PATH="$PATH:$PWD/Nim/bin"
|
||||||
nimble install -y --depsOnly
|
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 }}
|
nim c $NIM_OPTIONS -r ${{ matrix.test-program }}
|
||||||
cd nimcache; rm *.c; cd ..
|
cd nimcache; rm *.c; cd ..
|
||||||
lcov --capture --directory nimcache --output-file coverage/coverage.info
|
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
|
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"
|
bash <(curl -s https://codecov.io/bash) -f coverage/coverage.f.info || echo "Codecov did not collect coverage reports"
|
||||||
- uses: actions/upload-artifact@master
|
- uses: actions/upload-artifact@master
|
||||||
with:
|
with:
|
||||||
name: coverage
|
name: coverage
|
||||||
path: coverage/output-${{ env.GITHUB_RUN_ID }}
|
path: coverage
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue