mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-07-11 12:25:52 +00:00
These are common variables we wish to use in containerized environments both in GitLab and locally. Having these defined in a single place rather than twice is highly preferable. Signed-off-by: Erik Skultety <eskultet@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
34 lines
1.1 KiB
Bash
34 lines
1.1 KiB
Bash
#!/bin/sh
|
|
|
|
cd "$CI_CONT_SRCDIR"
|
|
|
|
export CCACHE_BASEDIR="$(pwd)"
|
|
export CCACHE_DIR="$CCACHE_BASEDIR/ccache"
|
|
export CCACHE_MAXSIZE="500M"
|
|
export PATH="$CCACHE_WRAPPERSDIR:$PATH"
|
|
|
|
# Enable these conditionally since their best use case is during
|
|
# non-interactive workloads without having a Shell
|
|
if ! [ -t 1 ]; then
|
|
export VIR_TEST_VERBOSE="1"
|
|
export VIR_TEST_DEBUG="1"
|
|
fi
|
|
|
|
# $MESON_OPTS is an env that can optionally be set in the container,
|
|
# populated at build time from the Dockerfile. A typical use case would
|
|
# be to pass options to trigger cross-compilation
|
|
#
|
|
# $MESON_ARGS correspond to meson's setup args, i.e. configure args. It's
|
|
# populated either from a GitLab's job configuration or from command line as
|
|
# `$ helper build --meson-args='-Dopt1 -Dopt2'` when run in a local
|
|
# containerized environment
|
|
#
|
|
# The contents of $MESON_ARGS (defined locally) should take precedence over
|
|
# those of $MESON_OPTS (defined when the container was built), so they're
|
|
# passed to meson after them
|
|
|
|
meson setup build --werror -Dsystem=true $MESON_OPTS $MESON_ARGS || \
|
|
(cat build/meson-logs/meson-log.txt && exit 1)
|
|
|
|
ninja -C build $NINJA_ARGS
|