2021-05-19 20:55:01 +02:00
|
|
|
.native_build_job_template:
|
2022-05-27 17:36:01 +02:00
|
|
|
extends: .base_job_template
|
2021-05-19 20:55:01 +02:00
|
|
|
stage: build
|
2023-06-08 18:40:14 +02:00
|
|
|
image: $CI_REGISTRY_IMAGE/qemu/$IMAGE:$QEMU_CI_CONTAINER_TAG
|
2023-08-29 18:15:17 +02:00
|
|
|
cache:
|
|
|
|
paths:
|
|
|
|
- ccache
|
|
|
|
key: "$CI_JOB_NAME"
|
|
|
|
when: always
|
2021-05-19 20:55:01 +02:00
|
|
|
before_script:
|
|
|
|
- JOBS=$(expr $(nproc) + 1)
|
|
|
|
script:
|
2023-08-29 18:15:17 +02:00
|
|
|
- export CCACHE_BASEDIR="$(pwd)"
|
|
|
|
- export CCACHE_DIR="$CCACHE_BASEDIR/ccache"
|
|
|
|
- export CCACHE_MAXSIZE="500M"
|
|
|
|
- export PATH="$CCACHE_WRAPPERSDIR:$PATH"
|
2021-05-19 20:55:01 +02:00
|
|
|
- mkdir build
|
|
|
|
- cd build
|
2023-08-29 18:15:17 +02:00
|
|
|
- ccache --zero-stats
|
2023-02-07 21:14:47 +01:00
|
|
|
- ../configure --enable-werror --disable-docs --enable-fdt=system
|
configure: use 'mkvenv ensure meson' to bootstrap meson
This commit changes how we detect and install meson. It notably removes
'--meson='.
Currently, configure creates a lightweight Python virtual environment
unconditionally using the user's configured $python that inherits system
packages. Temporarily, we forced the use of meson source present via git
submodule or in the release tarball.
With this patch, we restore the ability to use a system-provided meson:
If Meson is installed in the build venv and meets our minimum version
requirements, we will use that Meson. This includes a system provided
meson, which would be visible via system-site packages inside the venv.
In the event that Meson is installed but *not for the chosen Python
interpreter*, not found, or of insufficient version, we will attempt to
install Meson from vendored source into the newly created Python virtual
environment. This vendored installation replaces both the git submodule
and tarball source mechanisms for sourcing meson.
As a result of this patch, the Python interpreter we use for both our
own build scripts *and* Meson extensions are always known to be the
exact same Python. As a further benefit, there will also be a symlink
available in the build directory that points to the correct, configured
python and can be used by e.g. manual tests to invoke the correct,
configured Python unambiguously.
Signed-off-by: John Snow <jsnow@redhat.com>
Message-Id: <20230511035435.734312-18-jsnow@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2023-05-11 05:54:25 +02:00
|
|
|
${TARGETS:+--target-list="$TARGETS"}
|
2023-02-07 21:14:46 +01:00
|
|
|
$CONFIGURE_ARGS ||
|
|
|
|
{ cat config.log meson-logs/meson-log.txt && exit 1; }
|
2021-05-19 20:55:01 +02:00
|
|
|
- if test -n "$LD_JOBS";
|
|
|
|
then
|
configure: use 'mkvenv ensure meson' to bootstrap meson
This commit changes how we detect and install meson. It notably removes
'--meson='.
Currently, configure creates a lightweight Python virtual environment
unconditionally using the user's configured $python that inherits system
packages. Temporarily, we forced the use of meson source present via git
submodule or in the release tarball.
With this patch, we restore the ability to use a system-provided meson:
If Meson is installed in the build venv and meets our minimum version
requirements, we will use that Meson. This includes a system provided
meson, which would be visible via system-site packages inside the venv.
In the event that Meson is installed but *not for the chosen Python
interpreter*, not found, or of insufficient version, we will attempt to
install Meson from vendored source into the newly created Python virtual
environment. This vendored installation replaces both the git submodule
and tarball source mechanisms for sourcing meson.
As a result of this patch, the Python interpreter we use for both our
own build scripts *and* Meson extensions are always known to be the
exact same Python. As a further benefit, there will also be a symlink
available in the build directory that points to the correct, configured
python and can be used by e.g. manual tests to invoke the correct,
configured Python unambiguously.
Signed-off-by: John Snow <jsnow@redhat.com>
Message-Id: <20230511035435.734312-18-jsnow@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2023-05-11 05:54:25 +02:00
|
|
|
pyvenv/bin/meson configure . -Dbackend_max_links="$LD_JOBS" ;
|
2021-05-19 20:55:01 +02:00
|
|
|
fi || exit 1;
|
|
|
|
- make -j"$JOBS"
|
|
|
|
- if test -n "$MAKE_CHECK_ARGS";
|
|
|
|
then
|
|
|
|
make -j"$JOBS" $MAKE_CHECK_ARGS ;
|
|
|
|
fi
|
2023-08-29 18:15:17 +02:00
|
|
|
- ccache --show-stats
|
2021-05-19 20:55:01 +02:00
|
|
|
|
2023-02-28 20:06:51 +01:00
|
|
|
# We jump some hoops in common_test_job_template to avoid
|
|
|
|
# rebuilding all the object files we skip in the artifacts
|
|
|
|
.native_build_artifact_template:
|
|
|
|
artifacts:
|
2023-06-30 20:03:46 +02:00
|
|
|
when: on_success
|
2023-02-28 20:06:51 +01:00
|
|
|
expire_in: 2 days
|
|
|
|
paths:
|
|
|
|
- build
|
|
|
|
- .git-submodule-status
|
|
|
|
exclude:
|
|
|
|
- build/**/*.p
|
|
|
|
- build/**/*.a.p
|
|
|
|
- build/**/*.fa.p
|
|
|
|
- build/**/*.c.o
|
|
|
|
- build/**/*.c.o.d
|
|
|
|
- build/**/*.fa
|
|
|
|
|
2022-05-09 14:41:34 +02:00
|
|
|
.common_test_job_template:
|
2022-05-27 17:36:01 +02:00
|
|
|
extends: .base_job_template
|
2021-05-19 20:55:01 +02:00
|
|
|
stage: test
|
2023-06-08 18:40:14 +02:00
|
|
|
image: $CI_REGISTRY_IMAGE/qemu/$IMAGE:$QEMU_CI_CONTAINER_TAG
|
2021-05-19 20:55:01 +02:00
|
|
|
script:
|
2023-05-19 13:27:10 +02:00
|
|
|
- scripts/git-submodule.sh update roms/SLOF
|
meson: subprojects: replace submodules with wrap files
Compared to submodules, .wrap files have several advantages:
* option parsing and downloading is delegated to meson
* the commit is stored in a text file instead of a magic entry in the
git tree object
* we could stop shipping external dependencies that are only used as a
fallback, but not break compilation on platforms that lack them.
For example it may make sense to download dtc at build time, controlled
by --enable-download, even when building from a tarball. Right now,
this patch does the opposite: make-release treats dtc like libvfio-user
(which is not stable API and therefore hasn't found its way into any
distros) and keycodemap (which is a copylib, for better or worse).
dependency() can fall back to a wrap automatically. However, this
is only possible for libraries that come with a .pc file, and this
is not very common for libfdt even though the upstream project in
principle provides it; it also removes the control that we provide with
--enable-fdt={system,internal}. Therefore, the logic to pick system
vs. internal libfdt is left untouched.
--enable-fdt=git is removed; it was already a synonym for
--enable-fdt=internal.
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2023-05-18 16:50:00 +02:00
|
|
|
- meson subprojects download $(cd build/subprojects && echo *)
|
2021-05-19 20:55:01 +02:00
|
|
|
- cd build
|
|
|
|
- find . -type f -exec touch {} +
|
|
|
|
# Avoid recompiling by hiding ninja with NINJA=":"
|
|
|
|
- make NINJA=":" $MAKE_CHECK_ARGS
|
|
|
|
|
2022-05-09 14:41:34 +02:00
|
|
|
.native_test_job_template:
|
|
|
|
extends: .common_test_job_template
|
|
|
|
artifacts:
|
|
|
|
name: "$CI_JOB_NAME-$CI_COMMIT_REF_SLUG"
|
2023-06-30 20:03:46 +02:00
|
|
|
when: always
|
2022-05-09 14:41:34 +02:00
|
|
|
expire_in: 7 days
|
|
|
|
paths:
|
|
|
|
- build/meson-logs/testlog.txt
|
2022-05-27 17:35:33 +02:00
|
|
|
reports:
|
|
|
|
junit: build/meson-logs/testlog.junit.xml
|
2022-05-09 14:41:34 +02:00
|
|
|
|
2021-11-05 16:53:54 +01:00
|
|
|
.avocado_test_job_template:
|
2022-05-09 14:41:34 +02:00
|
|
|
extends: .common_test_job_template
|
2021-05-19 20:55:01 +02:00
|
|
|
cache:
|
|
|
|
key: "${CI_JOB_NAME}-cache"
|
|
|
|
paths:
|
|
|
|
- ${CI_PROJECT_DIR}/avocado-cache
|
|
|
|
policy: pull-push
|
|
|
|
artifacts:
|
|
|
|
name: "$CI_JOB_NAME-$CI_COMMIT_REF_SLUG"
|
2023-06-30 20:03:46 +02:00
|
|
|
when: always
|
2021-05-25 06:46:56 +02:00
|
|
|
expire_in: 7 days
|
2021-05-19 20:55:01 +02:00
|
|
|
paths:
|
|
|
|
- build/tests/results/latest/results.xml
|
|
|
|
- build/tests/results/latest/test-results
|
|
|
|
reports:
|
|
|
|
junit: build/tests/results/latest/results.xml
|
|
|
|
before_script:
|
|
|
|
- mkdir -p ~/.config/avocado
|
|
|
|
- echo "[datadir.paths]" > ~/.config/avocado/avocado.conf
|
|
|
|
- echo "cache_dirs = ['${CI_PROJECT_DIR}/avocado-cache']"
|
|
|
|
>> ~/.config/avocado/avocado.conf
|
|
|
|
- echo -e '[job.output.testlogs]\nstatuses = ["FAIL", "INTERRUPT"]'
|
|
|
|
>> ~/.config/avocado/avocado.conf
|
|
|
|
- if [ -d ${CI_PROJECT_DIR}/avocado-cache ]; then
|
|
|
|
du -chs ${CI_PROJECT_DIR}/avocado-cache ;
|
|
|
|
fi
|
|
|
|
- export AVOCADO_ALLOW_UNTRUSTED_CODE=1
|
|
|
|
after_script:
|
|
|
|
- cd build
|
|
|
|
- du -chs ${CI_PROJECT_DIR}/avocado-cache
|
2022-05-27 17:36:01 +02:00
|
|
|
variables:
|
|
|
|
QEMU_JOB_AVOCADO: 1
|