2021-02-10 07:27:49 +01:00
|
|
|
#!/bin/sh
|
|
|
|
|
2020-11-09 12:20:52 +01:00
|
|
|
cd "$CI_CONT_SRCDIR"
|
2019-08-15 14:28:17 +02:00
|
|
|
|
|
|
|
export VIR_TEST_DEBUG=1
|
|
|
|
|
2020-11-09 12:20:52 +01:00
|
|
|
# $MESON_OPTS is an env that can optionally be set in the container,
|
2019-08-15 14:28:17 +02:00
|
|
|
# populated at build time from the Dockerfile. A typical use case would
|
2020-11-09 12:20:52 +01:00
|
|
|
# be to pass options to trigger cross-compilation
|
2023-02-01 15:22:59 +01:00
|
|
|
#
|
|
|
|
# $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
|
2023-08-24 17:41:39 +02:00
|
|
|
# `$ helper build --meson-args='-Dopt1 -Dopt2'` when run in a local
|
2023-02-01 15:22:59 +01:00
|
|
|
# containerized environment
|
2023-08-24 17:35:53 +02:00
|
|
|
#
|
|
|
|
# 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
|
2019-08-15 14:28:17 +02:00
|
|
|
|
2023-08-24 17:35:53 +02:00
|
|
|
meson setup build --werror -Dsystem=true $MESON_OPTS $MESON_ARGS || \
|
2020-11-09 12:20:52 +01:00
|
|
|
(cat build/meson-logs/meson-log.txt && exit 1)
|
2019-08-15 14:28:17 +02:00
|
|
|
|
2023-01-31 18:06:53 +01:00
|
|
|
ninja -C build $NINJA_ARGS
|