diff options
author | Benjamin Tissoires <benjamin.tissoires@gmail.com> | 2021-07-30 11:30:32 +0200 |
---|---|---|
committer | Benjamin Tissoires <benjamin.tissoires@gmail.com> | 2022-09-02 08:39:42 +0200 |
commit | 1ccbeabb0b5715ae71d35bebf5a29adeda5fd748 (patch) | |
tree | 4b25bc839bfe2ca079c0ff867b71f04890dc4b5e | |
parent | fb4f4131a112201c86c510179cfc939fcfa8aece (diff) | |
download | libinput-1ccbeabb0b5715ae71d35bebf5a29adeda5fd748.tar.gz |
CI: rely on b2c to start qemu tests
This allows us to not have to create a specific image, and also
should be more reliable because we don't have to boot a full distribution
each time we just start our test suite.
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
-rw-r--r-- | .gitlab-ci.yml | 44 | ||||
-rw-r--r-- | .gitlab-ci/ci.template | 52 | ||||
-rw-r--r-- | .gitlab-ci/config.yml | 7 |
3 files changed, 55 insertions, 48 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 7a7770a8..0fd2475b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -34,7 +34,7 @@ # <distribution>:<version>@activity: # e.g. fedora:31@build-default -.templates_sha: &template_sha 0c312d9c7255f46e741d43bcd1930f09cd12efe7 +.templates_sha: &template_sha 25459a8d343961918a7398e4b3c147e450926569 include: - project: 'freedesktop/ci-templates' @@ -94,7 +94,6 @@ variables: ARCH_TAG: '2022-06-10.0' ALPINE_TAG: '2022-06-10.0' FREEBSD_TAG: '2022-06-10.0' - FEDORA_QEMU_TAG: 'fedora-qemu-vm-2022-06-10.0' FDO_UPSTREAM_REPO: libinput/libinput @@ -197,20 +196,6 @@ check-commit: # Note: images are rebuilt weekly with a scheduled pipeline with FDO_FORCE_REBUILD set # # -fedora:36@qemu-prep: - extends: - - .fdo.qemu-build@fedora - - .policy - stage: prep - tags: - - kvm - variables: - GIT_STRATEGY: none - FDO_DISTRIBUTION_VERSION: "36" - FDO_DISTRIBUTION_TAG: $FEDORA_QEMU_TAG - FDO_DISTRIBUTION_PACKAGES: $FEDORA_PACKAGES - - fedora:35@container-prep: extends: - .fdo.container-build@fedora @@ -407,6 +392,27 @@ freebsd:13.0@container-clean: script: - .gitlab-ci/meson-build.sh + +# Run meson and meson test in the container image through qemu +.build-in-b2c@template: + extends: + - .policy + - .fdo.b2c-image@fedora + - .default_artifacts + tags: + - kvm + variables: + MESON_BUILDDIR: build_dir + B2C_KERNEL: https://gitlab.freedesktop.org/api/v4/projects/libevdev%2Fhid-tools/packages/generic/kernel-x86_64/v5.19/bzImage + B2C_VERSION: v0.9.8 + B2C_IMAGE: $FDO_DISTRIBUTION_IMAGE + B2C_COMMAND: .gitlab-ci/meson-build.sh + script: + # pull b2c + - curl -L -o /app/boot2container https://gitlab.freedesktop.org/mupuf/boot2container/-/raw/v0.9.8/vm2c.py + - chmod +x /app/boot2container + - /app/boot2container + # # Fedora # @@ -471,7 +477,7 @@ freebsd:13.0@container-clean: # Set one or the other, not both. .test-suite-vm: extends: - - .build-in-qemu@template + - .build-in-b2c@template stage: test-suite variables: # remove the global --no-suite=hardware @@ -487,9 +493,9 @@ freebsd:13.0@container-clean: - .test-suite-vm variables: FDO_DISTRIBUTION_VERSION: 36 - FDO_DISTRIBUTION_TAG: $FEDORA_QEMU_TAG + FDO_DISTRIBUTION_TAG: $FEDORA_TAG needs: - - "fedora:36@qemu-prep" + - "fedora:36@container-prep" vm-touchpad: diff --git a/.gitlab-ci/ci.template b/.gitlab-ci/ci.template index d7522638..1542b663 100644 --- a/.gitlab-ci/ci.template +++ b/.gitlab-ci/ci.template @@ -36,7 +36,7 @@ # <distribution>:<version>@activity: # e.g. fedora:31@build-default -.templates_sha: &template_sha 0c312d9c7255f46e741d43bcd1930f09cd12efe7 +.templates_sha: &template_sha 25459a8d343961918a7398e4b3c147e450926569 include: - project: 'freedesktop/ci-templates' @@ -82,11 +82,6 @@ variables: {% for distro in distributions %} {{"%-13s"| format(distro.name.upper() + '_TAG:')}}'{{distro.tag}}' {% endfor %} -{% for distro in distributions %} -{% if distro.want_qemu %} - {{"%-20s"| format(distro.name.upper() + '_QEMU_TAG:')}} '{{distro.name}}-qemu-vm-{{distro.tag}}' -{% endif %} -{% endfor %} FDO_UPSTREAM_REPO: libinput/libinput @@ -189,24 +184,6 @@ check-commit: # Note: images are rebuilt weekly with a scheduled pipeline with FDO_FORCE_REBUILD set # # -{# qemu builds are only done for the latest version of any distribution #} -{% for distro in distributions if distro.want_qemu %} -{% set version = "{}".format(distro.versions|last()) %} -{{distro.name}}:{{version}}@qemu-prep: - extends: - - .fdo.qemu-build@{{distro.name}} - - .policy - stage: prep - tags: - - kvm - variables: - GIT_STRATEGY: none - FDO_DISTRIBUTION_VERSION: "{{version}}" - FDO_DISTRIBUTION_TAG: ${{distro.name.upper()}}_QEMU_TAG - FDO_DISTRIBUTION_PACKAGES: ${{distro.name.upper()}}_PACKAGES - -{% endfor %} - {% for distro in distributions %} {% for version in distro.versions %} {{distro.name}}:{{version}}@container-prep: @@ -291,6 +268,27 @@ check-commit: script: - .gitlab-ci/meson-build.sh + +# Run meson and meson test in the container image through qemu +.build-in-b2c@template: + extends: + - .policy + - .fdo.b2c-image@fedora + - .default_artifacts + tags: + - kvm + variables: + MESON_BUILDDIR: build_dir + B2C_KERNEL: {{ b2c.kernel }} + B2C_VERSION: {{ b2c.version }} + B2C_IMAGE: $FDO_DISTRIBUTION_IMAGE + B2C_COMMAND: .gitlab-ci/meson-build.sh + script: + # pull b2c + - curl -L -o /app/boot2container https://gitlab.freedesktop.org/mupuf/boot2container/-/raw/{{b2c.version}}/vm2c.py + - chmod +x /app/boot2container + - /app/boot2container + # # Fedora # @@ -355,7 +353,7 @@ check-commit: # Set one or the other, not both. .test-suite-vm: extends: - - .build-in-qemu@template + - .build-in-b2c@template stage: test-suite variables: # remove the global --no-suite=hardware @@ -374,9 +372,9 @@ check-commit: - .test-suite-vm variables: FDO_DISTRIBUTION_VERSION: {{version}} - FDO_DISTRIBUTION_TAG: ${{distro.name.upper()}}_QEMU_TAG + FDO_DISTRIBUTION_TAG: ${{distro.name.upper()}}_TAG needs: - - "{{distro.name}}:{{version}}@qemu-prep" + - "{{distro.name}}:{{version}}@container-prep" {% for suite in test_suites %} diff --git a/.gitlab-ci/config.yml b/.gitlab-ci/config.yml index 4d5b2851..d86f9f55 100644 --- a/.gitlab-ci/config.yml +++ b/.gitlab-ci/config.yml @@ -10,8 +10,7 @@ distributions: tag: *default_tag versions: - '35' - - '36' # last is picked for qemu - want_qemu: true + - '36' use_for_custom_build_tests: true use_for_qemu_tests: true packages: @@ -195,3 +194,7 @@ test_suites: - name: pointer suites: - pointer + +b2c: + version: v0.9.8 + kernel: https://gitlab.freedesktop.org/api/v4/projects/libevdev%2Fhid-tools/packages/generic/kernel-x86_64/v5.19/bzImage |