diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2021-07-26 11:13:17 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2021-07-28 12:50:11 +1000 |
commit | 833e49ce017f976c8bd6177c8c948d876f7d5113 (patch) | |
tree | 0efe82065d2cddd3da69a0e40debb0b1d3334cb5 /.gitlab-ci.yml | |
parent | 21824bc6ff9a9601d1e2f58b71b0e03c31408cec (diff) | |
download | libinput-833e49ce017f976c8bd6177c8c948d876f7d5113.tar.gz |
gitlab CI: use the ci-templates FreeBSD templates
Replace our cross-compilation for FreeBSD with a proper template.
FreeBSD doesn't do normal containers so we need a bunch of if/else to
skip the container builds.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to '.gitlab-ci.yml')
-rw-r--r-- | .gitlab-ci.yml | 123 |
1 files changed, 38 insertions, 85 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 39d07a72..f5eb7447 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -53,6 +53,10 @@ include: - project: 'freedesktop/ci-templates' ref: *template_sha file: '/templates/fedora.yml' + # Freebsd container builder template + - project: 'freedesktop/ci-templates' + ref: *template_sha + file: '/templates/freebsd.yml' # Ubuntu container builder template - project: 'freedesktop/ci-templates' ref: *template_sha @@ -88,23 +92,22 @@ variables: UBUNTU_PACKAGES: 'git gcc g++ pkg-config meson check libudev-dev libevdev-dev doxygen graphviz python3-sphinx python3-recommonmark python3-sphinx-rtd-theme python3-pytest-xdist libwacom-dev libcairo2-dev libgtk-3-dev libglib2.0-dev libmtdev-dev' ARCH_PACKAGES: 'git gcc pkgconfig meson check libsystemd libevdev doxygen graphviz python-sphinx python-recommonmark python-sphinx_rtd_theme python-pytest-xdist libwacom gtk3 mtdev diffutils' ALPINE_PACKAGES: 'git gcc build-base pkgconfig meson check-dev eudev-dev libevdev-dev libwacom-dev cairo-dev gtk+3.0-dev mtdev-dev bash' - FREEBSD_PACKAGES: 'libepoll-shim libudev-devd libevdev libwacom gtk3 libmtdev' - FREEBSD_BUILD_PKGS: 'meson' + FREEBSD_PACKAGES: 'git pkgconf meson libepoll-shim libudev-devd libevdev libwacom gtk3 libmtdev bash' ############################ end of package lists ############################# # these tags should be updated each time the list of packages is updated # changing these will force rebuilding the associated image # Note: these tags have no meaning and are not tied to a particular # libinput version - FEDORA_TAG: '2021-07-28.0' - DEBIAN_TAG: '2021-07-28.0' - UBUNTU_TAG: '2021-07-28.0' - ARCH_TAG: '2021-07-28.0' - ALPINE_TAG: '2021-07-28.0' - FREEBSD_TAG: '2021-07-28.0' - FEDORA_QEMU_TAG: 'fedora-qemu-vm-2021-07-28.0' - - FREEBSD_CONTAINER_IMAGE: $CI_REGISTRY_IMAGE/freebsd/11.2:$FREEBSD_TAG + FEDORA_TAG: '2021-07-28.1' + DEBIAN_TAG: '2021-07-28.1' + UBUNTU_TAG: '2021-07-28.1' + ARCH_TAG: '2021-07-28.1' + ALPINE_TAG: '2021-07-28.1' + FREEBSD_TAG: '2021-07-28.1' + FEDORA_QEMU_TAG: 'fedora-qemu-vm-2021-07-28.1' + FREEBSD_QEMU_TAG: 'freebsd-qemu-vm-2021-07-28.1' + FDO_UPSTREAM_REPO: libinput/libinput MESON_BUILDDIR: "build dir" @@ -192,10 +195,24 @@ fedora:34@qemu-prep: - kvm variables: GIT_STRATEGY: none - FDO_DISTRIBUTION_VERSION: 34 + FDO_DISTRIBUTION_VERSION: "34" FDO_DISTRIBUTION_TAG: $FEDORA_QEMU_TAG FDO_DISTRIBUTION_PACKAGES: $FEDORA_PACKAGES +freebsd:13.0@qemu-prep: + extends: + - .fdo.qemu-build@freebsd + - .policy + stage: prep + tags: + - kvm + variables: + GIT_STRATEGY: none + FDO_DISTRIBUTION_VERSION: "13.0" + FDO_DISTRIBUTION_TAG: $FREEBSD_QEMU_TAG + FDO_DISTRIBUTION_PACKAGES: $FREEBSD_PACKAGES + + fedora:33@container-prep: extends: - .fdo.container-build@fedora @@ -275,57 +292,6 @@ alpine:latest@container-prep: -# Note that we want to use the latest buildah image, and for that -# we use one of the .fdo.container-build@distribution by replacing the -# `script`. -.freebsd@container-prep: - extends: - - .policy - - .fdo.container-build@fedora - stage: prep - script: - # log in to the registry - - podman login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY - - # get the full container image name - - export IMAGE=freebsd/$FREEBSD_VERSION:$FREEBSD_TAG - - - if [[ x"$FDO_FORCE_REBUILD" != x ]] ; then touch .rebuild; fi - - # pull the latest upstream image if it exists - - test -e .rebuild || skopeo copy --dest-creds $CI_REGISTRY_USER:$CI_REGISTRY_PASSWORD - docker://$CI_REGISTRY/$FDO_UPSTREAM_REPO/$IMAGE - docker://$CI_REGISTRY_IMAGE/$IMAGE && exit 0 || true ; - - # check if our image is already in the current registry - - test -e .rebuild || skopeo inspect docker://$CI_REGISTRY_IMAGE/$IMAGE > /dev/null && exit 0 || true ; - - - export BUILDAH_RUN="buildah run --isolation chroot" - - export BUILDAH_COMMIT="buildah commit --format docker" - - buildcntr=$(buildah from --quiet myfreeweb/freebsd-cross:latest) - - $BUILDAH_RUN $buildcntr apk add --no-cache $FREEBSD_BUILD_PKGS - - $BUILDAH_RUN $buildcntr pkg -r /freebsd update -f - - $BUILDAH_RUN $buildcntr pkg -r /freebsd install -y $FREEBSD_PACKAGES - - buildah config --workingdir /app $buildcntr - # tag the current container - - $BUILDAH_COMMIT $buildcntr $FREEBSD_CONTAINER_IMAGE - # clean up the working container - - buildah rm $buildcntr - - # push the container image to the libinput registry - - podman push --quiet $FREEBSD_CONTAINER_IMAGE - - skopeo copy --dest-creds $CI_REGISTRY_USER:$CI_REGISTRY_PASSWORD - docker://$FREEBSD_CONTAINER_IMAGE - docker://$CI_REGISTRY_IMAGE/freebsd/$FREEBSD_VERSION:$CI_JOB_ID - -freebsd:11.2@container-prep: - extends: - - .freebsd@container-prep - variables: - GIT_STRATEGY: none - FREEBSD_VERSION: "11.2" - - ################################################################# # # # container clean stage # @@ -421,13 +387,6 @@ alpine:latest@container-clean: FDO_DISTRIBUTION_TAG: $ALPINE_TAG -freebsd:11.2@container-clean: - extends: - - .container-clean - variables: - GIT_STRATEGY: none - CURRENT_CONTAINER_IMAGE: $FREEBSD_CONTAINER_IMAGE - ################################################################# # # # build stage # @@ -1014,25 +973,19 @@ alpine:latest@default-build: - "alpine:latest@container-prep" - -# -# FreeBSD -# -.freebsd@template: +freebsd:13.0@default-build: stage: distro extends: - - .build@template - image: $FREEBSD_CONTAINER_IMAGE + - .build-in-qemu@template + - .fdo.distribution-image@freebsd variables: - MESON_ARGS: '--cross-file freebsd -Ddocumentation=false -Dtests=false -Depoll-dir=/freebsd/usr/local/' - # Can't run FreeBSD tests on Linux machine, so MESON_TEST_ARGS shouldn't be "test" - MESON_TEST_ARGS: '' - -freebsd:11.2@default-build: - extends: - - .freebsd@template + FDO_DISTRIBUTION_VERSION: '13.0' + FDO_DISTRIBUTION_TAG: $FREEBSD_QEMU_TAG + MESON_ARGS: '-Dtests=false -Ddocumentation=false' # doxygen drags down too many deps + MESON_TEST_ARGS: '' # test suite doesn't work on BSD yet needs: - - "freebsd:11.2@container-prep" + - "freebsd:13.0@qemu-prep" + ################################################################# # # |