patch 8.2.4351: no coverage is measured on MS-Windows CI

Problem:    No coverage is measured on MS-Windows CI.
Solution:   Enable coverage on MS-Windows. (Ozaki Kiichi, closes #9750)
This commit is contained in:
ichizok
2022-02-12 10:13:13 +00:00
committed by Bram Moolenaar
parent 29c70f612f
commit 41ee5b1913
2 changed files with 40 additions and 6 deletions

View File

@ -225,7 +225,7 @@ jobs:
do_test make ${SHADOWOPT} ${TEST}
# - name: Coveralls
# if: matrix.coverage && success() && github.event_name != 'pull_request'
# if: matrix.coverage && github.event_name != 'pull_request'
# env:
# COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
# COVERALLS_PARALLEL: true
@ -238,21 +238,21 @@ jobs:
# ~/.local/bin/coveralls -b "${SRCDIR}" -x .xs -e "${SRCDIR}"/if_perl.c -e "${SRCDIR}"/xxd -e "${SRCDIR}"/libvterm --encodings utf-8
- name: Generate gcov files
if: matrix.coverage && success()
if: matrix.coverage
run: |
cd "${SRCDIR}"
find . -type f -name '*.gcno' -exec gcov -pb {} + || true
- name: Codecov
if: matrix.coverage && success()
if: matrix.coverage
uses: codecov/codecov-action@v2
with:
flags: ${{ matrix.features }}-${{ matrix.compiler }}-${{ matrix.extra }}
flags: linux,${{ matrix.features }}-${{ matrix.compiler }}-${{ matrix.extra }}
- name: ASan logs
if: contains(matrix.extra, 'asan') && !cancelled()
run: |
for f in $(grep -lR '#[[:digit:]]* *0x[[:digit:]a-fA-F]*' "${LOG_DIR}"); do
for f in $(grep -lR '#[[:digit:]]* *0x[[:xdigit:]]*' "${LOG_DIR}"); do
asan_symbolize -l "$f"
false # in order to fail a job
done
@ -410,6 +410,9 @@ jobs:
python3_dir=$(cat "/proc/${{ matrix.cygreg }}/HKEY_LOCAL_MACHINE/SOFTWARE/Python/PythonCore/${PYTHON3_VER_DOT}${{ matrix.pyreg }}/InstallPath/@")
echo "PYTHON_DIR=$python_dir" >> $GITHUB_ENV
echo "PYTHON3_DIR=$python3_dir" >> $GITHUB_ENV
if ${{ matrix.toolchain == 'mingw' && matrix.arch == 'x64' && matrix.features == 'HUGE' }}; then
echo "COVERAGE=yes" >> $GITHUB_ENV
fi
- uses: msys2/setup-msys2@v2
if: matrix.toolchain == 'mingw'
@ -501,7 +504,7 @@ jobs:
DYNAMIC_LUA=yes LUA=${LUA_DIR} \
DYNAMIC_PYTHON=yes PYTHON=${PYTHON_DIR} \
DYNAMIC_PYTHON3=yes PYTHON3=${PYTHON3_DIR} \
STATIC_STDCPLUS=yes
STATIC_STDCPLUS=yes COVERAGE=${COVERAGE}
else
mingw32-make -f Make_ming.mak -j2 \
FEATURES=${{ matrix.features }} \
@ -522,6 +525,12 @@ jobs:
# name: vim${{ matrix.bits }}-${{ matrix.toolchain }}
# path: ./artifacts
- name: Copy gcov data files to src2
if: env.COVERAGE
shell: msys2 {0}
run: |
find src -name '*.gcno' | tar -c -T - | tar -x -C src2 --strip-components 1
- name: Test
shell: cmd
timeout-minutes: 20
@ -562,3 +571,26 @@ jobs:
exit 1
)
echo ::endgroup::
- name: Generate gcov files
if: env.COVERAGE
shell: msys2 {0}
run: |
cd src
find . -type f -name '*.gcno' -exec gcov -pb {} + || true
cd ../src2
find . -type f -name '*.gcno' -exec gcov -pb {} + || true
- name: Codecov (gvim)
if: env.COVERAGE
uses: codecov/codecov-action@v2
with:
directory: src
flags: windows,${{ matrix.toolchain }}-${{ matrix.arch }}-${{ matrix.features }}-gui
- name: Codecov (vim)
if: env.COVERAGE
uses: codecov/codecov-action@v2
with:
directory: src2
flags: windows,${{ matrix.toolchain }}-${{ matrix.arch }}-${{ matrix.features }}

View File

@ -746,6 +746,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
4351,
/**/
4350,
/**/