@@ -19,8 +19,18 @@ jobs:
|
|||||||
git remote add origin https://${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}@git.rivercry.com/${{ github.repository }}.git
|
git remote add origin https://${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}@git.rivercry.com/${{ github.repository }}.git
|
||||||
git fetch --depth 1 origin ${{ github.sha }}
|
git fetch --depth 1 origin ${{ github.sha }}
|
||||||
git checkout FETCH_HEAD
|
git checkout FETCH_HEAD
|
||||||
|
- name: Toolchain Info
|
||||||
|
run: |
|
||||||
|
echo "CC=$CC"
|
||||||
|
echo "CXX=$CXX"
|
||||||
|
command -v gcc || true
|
||||||
|
command -v g++ || true
|
||||||
|
command -v gcov || true
|
||||||
|
gcc --version || true
|
||||||
|
g++ --version || true
|
||||||
|
gcov --version || true
|
||||||
- name: Configure
|
- name: Configure
|
||||||
run: cmake -S . -B build -DCMAKE_BUILD_TYPE=Debug -DENABLE_COVERAGE=ON
|
run: cmake -S . -B build -DCMAKE_BUILD_TYPE=Debug -DENABLE_COVERAGE=ON -DCMAKE_C_COMPILER=/usr/bin/gcc -DCMAKE_CXX_COMPILER=/usr/bin/g++
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: cmake --build build --config Debug -j "$(nproc)"
|
run: cmake --build build --config Debug -j "$(nproc)"
|
||||||
@@ -32,11 +42,9 @@ jobs:
|
|||||||
|
|
||||||
- name: Coverage
|
- name: Coverage
|
||||||
run: |
|
run: |
|
||||||
GCOV_TOOL_DIR="$(dirname "$(g++ -print-file-name=libgcov.a)")"
|
GCOV_TOOL="$(/usr/bin/g++ -print-prog-name=gcov)"
|
||||||
GCOV_TOOL="$GCOV_TOOL_DIR/gcov"
|
echo "Using gcov: $GCOV_TOOL"
|
||||||
if [ ! -x "$GCOV_TOOL" ]; then
|
"$GCOV_TOOL" --version
|
||||||
GCOV_TOOL="$(command -v gcov)"
|
|
||||||
fi
|
|
||||||
lcov --gcov-tool "$GCOV_TOOL" --capture --directory build --output-file build/coverage.info
|
lcov --gcov-tool "$GCOV_TOOL" --capture --directory build --output-file build/coverage.info
|
||||||
lcov --remove build/coverage.info "/usr/*" "*/build/*" "*/_deps/*" --output-file build/coverage.info
|
lcov --remove build/coverage.info "/usr/*" "*/build/*" "*/_deps/*" --output-file build/coverage.info
|
||||||
lcov --summary build/coverage.info
|
lcov --summary build/coverage.info
|
||||||
|
|||||||
Reference in New Issue
Block a user