2018-02-22 19:37:16 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
export PATH="/c/msys64/$MSYSTEM/bin:$PATH"
|
|
|
|
if [[ "$MSYSTEM" == "MINGW32" ]]; then
|
|
|
|
export MSYS2_ARCH="i686"
|
|
|
|
else
|
|
|
|
export MSYS2_ARCH="x86_64"
|
|
|
|
fi
|
|
|
|
|
|
|
|
pacman --noconfirm -Suy
|
|
|
|
|
|
|
|
pacman --noconfirm -S --needed \
|
|
|
|
base-devel \
|
|
|
|
mingw-w64-$MSYS2_ARCH-ccache \
|
|
|
|
mingw-w64-$MSYS2_ARCH-gettext \
|
|
|
|
mingw-w64-$MSYS2_ARCH-libffi \
|
|
|
|
mingw-w64-$MSYS2_ARCH-meson \
|
|
|
|
mingw-w64-$MSYS2_ARCH-pcre \
|
|
|
|
mingw-w64-$MSYS2_ARCH-python3 \
|
2018-05-01 08:55:29 +02:00
|
|
|
mingw-w64-$MSYS2_ARCH-python3-pip \
|
2018-02-22 19:37:16 +01:00
|
|
|
mingw-w64-$MSYS2_ARCH-toolchain \
|
2018-08-01 18:54:01 +02:00
|
|
|
mingw-w64-$MSYS2_ARCH-zlib \
|
|
|
|
mingw-w64-$MSYS2_ARCH-libelf
|
2018-02-22 19:37:16 +01:00
|
|
|
|
2018-07-06 09:33:22 +02:00
|
|
|
curl -O -J -L "https://github.com/linux-test-project/lcov/releases/download/v1.13/lcov-1.13.tar.gz"
|
|
|
|
echo "44972c878482cc06a05fe78eaa3645cbfcbad6634615c3309858b207965d8a23 lcov-1.13.tar.gz" | sha256sum -c
|
|
|
|
tar -xzf lcov-1.13.tar.gz
|
|
|
|
LCOV="$(pwd)/lcov-1.13/bin/lcov"
|
|
|
|
|
|
|
|
mkdir -p _coverage
|
2018-02-22 19:37:16 +01:00
|
|
|
mkdir -p _ccache
|
|
|
|
export CCACHE_BASEDIR="$(pwd)"
|
|
|
|
export CCACHE_DIR="${CCACHE_BASEDIR}/_ccache"
|
2018-09-24 16:19:18 +02:00
|
|
|
pip3 install --upgrade --user meson==0.48.0
|
2018-05-01 08:55:29 +02:00
|
|
|
export PATH="$HOME/.local/bin:$PATH"
|
2018-04-27 17:04:52 +02:00
|
|
|
export CFLAGS="-coverage -ftest-coverage -fprofile-arcs"
|
2018-07-06 09:33:22 +02:00
|
|
|
DIR="$(pwd)"
|
2018-02-22 19:37:16 +01:00
|
|
|
|
2018-04-25 16:07:59 +02:00
|
|
|
meson --werror --buildtype debug _build
|
2018-02-22 19:37:16 +01:00
|
|
|
cd _build
|
|
|
|
ninja
|
|
|
|
|
2018-07-06 09:33:22 +02:00
|
|
|
"${LCOV}" \
|
|
|
|
--quiet \
|
2018-10-17 18:12:40 +02:00
|
|
|
--config-file "${DIR}"/.gitlab-ci/lcovrc \
|
2018-07-06 09:33:22 +02:00
|
|
|
--directory "${DIR}/_build" \
|
|
|
|
--capture \
|
|
|
|
--initial \
|
|
|
|
--output-file "${DIR}/_coverage/${CI_JOB_NAME}-baseline.lcov"
|
|
|
|
|
2018-02-22 19:37:16 +01:00
|
|
|
# FIXME: fix the test suite
|
2019-01-09 11:47:24 +01:00
|
|
|
meson test --timeout-multiplier ${MESON_TEST_TIMEOUT_MULTIPLIER} --no-suite flaky || true
|
2018-04-27 17:04:52 +02:00
|
|
|
|
2019-04-06 16:22:04 +02:00
|
|
|
python3 "${DIR}"/.gitlab-ci/meson-junit-report.py \
|
|
|
|
--project-name glib \
|
|
|
|
--job-id "${CI_JOB_NAME}" \
|
|
|
|
--output "${DIR}/_build/${CI_JOB_NAME}-report.xml" \
|
|
|
|
"${DIR}/_build/meson-logs/testlog.json"
|
|
|
|
|
2018-07-06 09:33:22 +02:00
|
|
|
"${LCOV}" \
|
|
|
|
--quiet \
|
2018-10-17 18:12:40 +02:00
|
|
|
--config-file "${DIR}"/.gitlab-ci/lcovrc \
|
2018-07-06 09:33:22 +02:00
|
|
|
--directory "${DIR}/_build" \
|
2018-04-27 17:04:52 +02:00
|
|
|
--capture \
|
2018-07-06 09:33:22 +02:00
|
|
|
--output-file "${DIR}/_coverage/${CI_JOB_NAME}.lcov"
|