2018-02-22 19:37:16 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
2022-10-29 02:29:38 +02:00
|
|
|
set -ex
|
2018-02-22 19:37:16 +01:00
|
|
|
|
|
|
|
export PATH="/c/msys64/$MSYSTEM/bin:$PATH"
|
|
|
|
|
|
|
|
pacman --noconfirm -Suy
|
|
|
|
|
|
|
|
pacman --noconfirm -S --needed \
|
|
|
|
base-devel \
|
2020-09-30 11:36:49 +02:00
|
|
|
lcov \
|
2022-10-29 02:29:38 +02:00
|
|
|
"${MINGW_PACKAGE_PREFIX}"-ccache \
|
|
|
|
"${MINGW_PACKAGE_PREFIX}"-gettext \
|
|
|
|
"${MINGW_PACKAGE_PREFIX}"-libffi \
|
|
|
|
"${MINGW_PACKAGE_PREFIX}"-meson \
|
|
|
|
"${MINGW_PACKAGE_PREFIX}"-pcre2 \
|
|
|
|
"${MINGW_PACKAGE_PREFIX}"-python3 \
|
|
|
|
"${MINGW_PACKAGE_PREFIX}"-python-pip \
|
|
|
|
"${MINGW_PACKAGE_PREFIX}"-toolchain \
|
|
|
|
"${MINGW_PACKAGE_PREFIX}"-zlib \
|
|
|
|
"${MINGW_PACKAGE_PREFIX}"-libelf
|
2018-02-22 19:37:16 +01:00
|
|
|
|
2018-07-06 09:33:22 +02:00
|
|
|
mkdir -p _coverage
|
2018-02-22 19:37:16 +01:00
|
|
|
mkdir -p _ccache
|
2020-02-25 12:46:11 +01:00
|
|
|
CCACHE_BASEDIR="$(pwd)"
|
|
|
|
CCACHE_DIR="${CCACHE_BASEDIR}/_ccache"
|
|
|
|
export CCACHE_BASEDIR CCACHE_DIR
|
|
|
|
|
2022-11-24 13:10:07 +01:00
|
|
|
pip3 install --upgrade --user meson==0.60.3
|
2020-02-25 12:46:11 +01:00
|
|
|
|
2020-05-06 21:54:35 +02:00
|
|
|
PATH="$(cygpath "$USERPROFILE")/.local/bin:$HOME/.local/bin:$PATH"
|
2018-07-06 09:33:22 +02:00
|
|
|
DIR="$(pwd)"
|
2020-02-25 12:46:11 +01:00
|
|
|
export PATH CFLAGS
|
2018-02-22 19:37:16 +01:00
|
|
|
|
2022-10-29 04:14:29 +02:00
|
|
|
if [[ "$MSYSTEM" == "CLANG64" ]]; then
|
|
|
|
# FIXME: fix the clang build warnings
|
|
|
|
# shellcheck disable=SC2086
|
|
|
|
meson ${MESON_COMMON_OPTIONS} _build
|
|
|
|
else
|
|
|
|
# shellcheck disable=SC2086
|
|
|
|
meson ${MESON_COMMON_OPTIONS} --werror _build
|
|
|
|
fi
|
|
|
|
|
2018-02-22 19:37:16 +01:00
|
|
|
cd _build
|
|
|
|
ninja
|
|
|
|
|
2022-10-29 04:12:21 +02:00
|
|
|
if [[ "$CFLAGS" == *"-coverage"* ]]; then
|
|
|
|
lcov \
|
|
|
|
--quiet \
|
|
|
|
--config-file "${DIR}"/.lcovrc \
|
|
|
|
--directory "${DIR}/_build" \
|
|
|
|
--capture \
|
|
|
|
--initial \
|
|
|
|
--output-file "${DIR}/_coverage/${CI_JOB_NAME}-baseline.lcov"
|
|
|
|
fi
|
2018-07-06 09:33:22 +02:00
|
|
|
|
2022-10-19 21:34:48 +02:00
|
|
|
meson test --timeout-multiplier "${MESON_TEST_TIMEOUT_MULTIPLIER}"
|
2022-10-19 20:08:15 +02:00
|
|
|
meson test --timeout-multiplier "${MESON_TEST_TIMEOUT_MULTIPLIER}" \
|
|
|
|
--setup=unstable_tests --suite=failing --suite=flaky || true
|
2018-04-27 17:04:52 +02:00
|
|
|
|
2022-10-29 04:12:21 +02:00
|
|
|
if [[ "$CFLAGS" == *"-coverage"* ]]; then
|
|
|
|
lcov \
|
|
|
|
--quiet \
|
|
|
|
--config-file "${DIR}"/.lcovrc \
|
|
|
|
--directory "${DIR}/_build" \
|
|
|
|
--capture \
|
|
|
|
--output-file "${DIR}/_coverage/${CI_JOB_NAME}.lcov"
|
|
|
|
fi
|