gitlab CI: update to the distribution-independent CI-templates

These templates get rid of the various distribution-specific naming and
instead default to the namespaced FDO_DISTRIBUTION_<foo> for whatever value we
need. So FEDORA_RPMS, DEBIAN_DEBS etc. becomes FDO_DISTRIBUTION_PACKAGES for
example.

By necessity this is one large commit. gitlab does not allow nested variable
expansion, so the previous approach of global variables didn't work.
Specifically, we'd end up with a template in this form:

variables:
  FEDORA_TAG: 12345

.base_template:
  variables:
     DISTRO_IMAGE: $DISTRO_TAG

.fedora:
  variables:
     $DISTRO_TAG: $FEDORA_TAG

But the actual DISTRO_IMAGE variable would be the literal string $FEDORA_TAG,
not the value of that variable. So all of it needed to be reworked.

Specifically:
- the packages to install moved to the config yaml file
- the distribution tag is now in the config yaml file
- all distributions now share the same tag (because lazyness)
- there are .fedora:30, .debian:stable, etc. templates now with the variables
  defined as needed, jobs will extends those templates as they need those
  distributions
- qemu-prep jobs are now generated too (based on the config yaml file)

Overall, it ends up cleaner despite the mess in this patch.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
Peter Hutterer 2020-02-24 08:12:35 +10:00
parent bf72012921
commit 6441b639aa
3 changed files with 431 additions and 330 deletions

View file

@ -4,7 +4,7 @@
# # # #
######################################## ########################################
.templates_sha: &template_sha 8410d3382c4ba5e83da76a027cb332169f2a95ad # see https://docs.gitlab.com/ee/ci/yaml/#includefile .templates_sha: &template_sha df52af2195b052325daf5d715c88be90f8ec7d86 # see https://docs.gitlab.com/ee/ci/yaml/#includefile
include: include:
# Alpine container builder template # Alpine container builder template
@ -42,42 +42,10 @@ stages:
- container_clean # clean up unused container images - container_clean # clean up unused container images
variables: variables:
############################################################################### # The upstrem repository we will check for images
# This is the list of packages required to build libevdev with the default # FDO_UPSTREAM_REPO: libevdev/libevdev
# configuration. # # The image that has buildah installed
# #
# Run dnf install/apt-get install/.. with the list of packages for your #
# distribution #
###############################################################################
FEDORA_RPMS: 'git gcc gcc-c++ meson automake autoconf libtool make pkgconfig python3 check-devel valgrind binutils doxygen xz clang-analyzer'
CENTOS_RPMS: 'git gcc gcc-c++ automake autoconf libtool make pkgconfig python3 check-devel valgrind binutils xz'
UBUNTU_DEBS: 'git gcc g++ meson automake autoconf libtool make pkg-config python3 check valgrind binutils doxygen xz-utils'
DEBIAN_DEBS: $UBUNTU_DEBS
ARCH_PKGS: 'git gcc meson automake autoconf libtool make pkgconfig python3 check valgrind binutils doxygen'
ALPINE_PKGS: 'git gcc g++ meson automake autoconf libtool make pkgconfig python3 check-dev valgrind binutils doxygen xz linux-headers'
############################ 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
# libevdev version
FEDORA_TAG: '2020-02-26.4'
CENTOS_TAG: '2020-02-26.4'
DEBIAN_TAG: '2020-02-26.4'
UBUNTU_TAG: '2020-02-26.4'
ARCH_TAG: '2020-02-26.4'
ALPINE_TAG: '2020-02-26.4'
QEMU_TAG: 'qemu-2020-02-26.4'
UPSTREAM_REPO: libevdev/libevdev
BUILDAH_IMAGE: $CI_REGISTRY/wayland/ci-templates/buildah:latest BUILDAH_IMAGE: $CI_REGISTRY/wayland/ci-templates/buildah:latest
FEDORA_CONTAINER_IMAGE: $CI_REGISTRY_IMAGE/fedora/$FEDORA_VERSION:$FEDORA_TAG
CENTOS_CONTAINER_IMAGE: $CI_REGISTRY_IMAGE/centos/$CENTOS_VERSION:$CENTOS_TAG
UBUNTU_CONTAINER_IMAGE: $CI_REGISTRY_IMAGE/ubuntu/$UBUNTU_VERSION:$UBUNTU_TAG
DEBIAN_CONTAINER_IMAGE: $CI_REGISTRY_IMAGE/debian/$DEBIAN_VERSION:$DEBIAN_TAG
ARCH_CONTAINER_IMAGE: $CI_REGISTRY_IMAGE/arch/rolling:$ARCH_TAG
ALPINE_CONTAINER_IMAGE: $CI_REGISTRY_IMAGE/alpine/latest:$ALPINE_TAG
QEMU_CONTAINER_IMAGE: $CI_REGISTRY_IMAGE/fedora/$FEDORA_VERSION:$QEMU_TAG
LIBEVDEV_SKIP_ROOT_TESTS: 1 LIBEVDEV_SKIP_ROOT_TESTS: 1
GIT_DEPTH: 1 GIT_DEPTH: 1
MESON_BUILDDIR: 'build dir' MESON_BUILDDIR: 'build dir'
@ -110,6 +78,86 @@ variables:
script: script:
- .gitlab-ci/meson-build.sh - .gitlab-ci/meson-build.sh
# Base image for a given distribution, provides
# - the image of that distribution
# - DISTRO_CONTAINER_IMAGE for any manipulation the job needs to be
.distribution_image:
image: $CI_REGISTRY_IMAGE/$DISTRIB_NAME/$FDO_DISTRIBUTION_VERSION:$FDO_DISTRIBUTION_TAG
variables:
DISTRO_CONTAINER_IMAGE: $CI_REGISTRY_IMAGE/$DISTRIB_NAME/$FDO_DISTRIBUTION_VERSION:$FDO_DISTRIBUTION_TAG
.fedora:30:
extends: .distribution_image
variables:
DISTRIB_NAME: 'fedora'
FDO_DISTRIBUTION_TAG: '2020-03-06.0'
FDO_DISTRIBUTION_VERSION: '30'
.fedora:31:
extends: .distribution_image
variables:
DISTRIB_NAME: 'fedora'
FDO_DISTRIBUTION_TAG: '2020-03-06.0'
FDO_DISTRIBUTION_VERSION: '31'
.ubuntu:19.10:
extends: .distribution_image
variables:
DISTRIB_NAME: 'ubuntu'
FDO_DISTRIBUTION_TAG: '2020-03-06.0'
FDO_DISTRIBUTION_VERSION: '19.10'
.ubuntu:19.04:
extends: .distribution_image
variables:
DISTRIB_NAME: 'ubuntu'
FDO_DISTRIBUTION_TAG: '2020-03-06.0'
FDO_DISTRIBUTION_VERSION: '19.04'
.debian:stable:
extends: .distribution_image
variables:
DISTRIB_NAME: 'debian'
FDO_DISTRIBUTION_TAG: '2020-03-06.0'
FDO_DISTRIBUTION_VERSION: 'stable'
.debian:sid:
extends: .distribution_image
variables:
DISTRIB_NAME: 'debian'
FDO_DISTRIBUTION_TAG: '2020-03-06.0'
FDO_DISTRIBUTION_VERSION: 'sid'
.centos:7:
extends: .distribution_image
variables:
DISTRIB_NAME: 'centos'
FDO_DISTRIBUTION_TAG: '2020-03-06.0'
FDO_DISTRIBUTION_VERSION: '7'
.centos:8:
extends: .distribution_image
variables:
DISTRIB_NAME: 'centos'
FDO_DISTRIBUTION_TAG: '2020-03-06.0'
FDO_DISTRIBUTION_VERSION: '8'
.arch:rolling:
extends: .distribution_image
variables:
DISTRIB_NAME: 'arch'
FDO_DISTRIBUTION_TAG: '2020-03-06.0'
FDO_DISTRIBUTION_VERSION: 'rolling'
.alpine:latest:
extends: .distribution_image
variables:
DISTRIB_NAME: 'alpine'
FDO_DISTRIBUTION_TAG: '2020-03-06.0'
FDO_DISTRIBUTION_VERSION: 'latest'
################################################################# #################################################################
# # # #
# prep stage # # prep stage #
@ -162,176 +210,172 @@ check-commit:
# log in to the registry # log in to the registry
- podman login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY - podman login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
# get the full container image name (DISTRIB_VERSION still has indirections) # get the full container image name (FDO_DISTRIBUTION_VERSION still has indirections)
- IMAGE=$(eval echo "$DISTRIB_NAME/$DISTRIB_VERSION:$TAG") - IMAGE=$(eval echo "$DISTRIB_NAME/$FDO_DISTRIBUTION_VERSION:$FDO_DISTRIBUTION_TAG")
- | - |
# force rebuild if schedule, reuse otherwise # force rebuild if schedule, reuse otherwise
if [[ $CI_PIPELINE_SOURCE != "schedule" ]] ; if [[ $CI_PIPELINE_SOURCE != "schedule" ]] ;
then then
# pull the latest upstream image if it exists # pull the latest upstream image if it exists
skopeo copy docker://$CI_REGISTRY/$UPSTREAM_REPO/$IMAGE \ skopeo copy docker://$CI_REGISTRY/$FDO_UPSTREAM_REPO/$IMAGE \
docker://$CI_REGISTRY_IMAGE/$IMAGE && exit 0 || true ; docker://$CI_REGISTRY_IMAGE/$IMAGE && exit 0 || true ;
# check if our image is already in the current registry # check if our image is already in the current registry
skopeo inspect docker://$CI_REGISTRY_IMAGE/$IMAGE > /dev/null && exit 0 || true ; skopeo inspect docker://$CI_REGISTRY_IMAGE/$IMAGE > /dev/null && exit 0 || true ;
fi fi
fedora:31@qemu-prep: .fedora:30@qemu-prep:
extends: extends:
- .fedora@qemu-build - .fedora:30
- .fdo.qemu-build@fedora
- .pull_upstream_or_rebuild - .pull_upstream_or_rebuild
stage: prep stage: prep
tags: tags:
- kvm - kvm
variables: variables:
GIT_STRATEGY: none GIT_STRATEGY: none
FEDORA_VERSION: 31 FDO_DISTRIBUTION_TAG: qemu-2020-03-06.0
FEDORA_TAG: $QEMU_TAG FDO_DISTRIBUTION_PACKAGES: 'git gcc gcc-c++ meson automake autoconf libtool make pkgconfig python3 check-devel valgrind binutils doxygen xz clang-analyzer'
DISTRIB_NAME: fedora
DISTRIB_VERSION: $FEDORA_VERSION
TAG: $QEMU_TAG
allow_failure: true allow_failure: true
.fedora:31@qemu-prep:
extends:
- .fedora:31
- .fdo.qemu-build@fedora
- .pull_upstream_or_rebuild
stage: prep
tags:
- kvm
variables:
GIT_STRATEGY: none
FDO_DISTRIBUTION_TAG: qemu-2020-03-06.0
FDO_DISTRIBUTION_PACKAGES: 'git gcc gcc-c++ meson automake autoconf libtool make pkgconfig python3 check-devel valgrind binutils doxygen xz clang-analyzer'
allow_failure: true
fedora:31@qemu-prep:
extends: .fedora:31@qemu-prep
### fedora 30 ### fedora 30
fedora:30@container-prep: fedora:30@container-prep:
extends: extends:
- .fedora@container-build - .fedora:30
- .fdo.container-build@fedora
- .pull_upstream_or_rebuild - .pull_upstream_or_rebuild
stage: prep stage: prep
variables: variables:
GIT_STRATEGY: none GIT_STRATEGY: none
FEDORA_VERSION: '30' FDO_DISTRIBUTION_PACKAGES: 'git gcc gcc-c++ meson automake autoconf libtool make pkgconfig python3 check-devel valgrind binutils doxygen xz clang-analyzer'
DISTRIB_NAME: fedora
DISTRIB_VERSION: $FEDORA_VERSION
TAG: $FEDORA_TAG
### fedora 31 ### fedora 31
fedora:31@container-prep: fedora:31@container-prep:
extends: extends:
- .fedora@container-build - .fedora:31
- .fdo.container-build@fedora
- .pull_upstream_or_rebuild - .pull_upstream_or_rebuild
stage: prep stage: prep
variables: variables:
GIT_STRATEGY: none GIT_STRATEGY: none
FEDORA_VERSION: '31' FDO_DISTRIBUTION_PACKAGES: 'git gcc gcc-c++ meson automake autoconf libtool make pkgconfig python3 check-devel valgrind binutils doxygen xz clang-analyzer'
DISTRIB_NAME: fedora
DISTRIB_VERSION: $FEDORA_VERSION
TAG: $FEDORA_TAG
### ubuntu 19.10 ### ubuntu 19.10
ubuntu:19.10@container-prep: ubuntu:19.10@container-prep:
extends: extends:
- .ubuntu@container-build - .ubuntu:19.10
- .fdo.container-build@ubuntu
- .pull_upstream_or_rebuild - .pull_upstream_or_rebuild
stage: prep stage: prep
variables: variables:
GIT_STRATEGY: none GIT_STRATEGY: none
UBUNTU_VERSION: '19.10' FDO_DISTRIBUTION_PACKAGES: 'git gcc g++ meson automake autoconf libtool make pkg-config python3 check valgrind binutils doxygen xz-utils'
DISTRIB_NAME: ubuntu
DISTRIB_VERSION: $UBUNTU_VERSION
TAG: $UBUNTU_TAG
### ubuntu 19.04 ### ubuntu 19.04
ubuntu:19.04@container-prep: ubuntu:19.04@container-prep:
extends: extends:
- .ubuntu@container-build - .ubuntu:19.04
- .fdo.container-build@ubuntu
- .pull_upstream_or_rebuild - .pull_upstream_or_rebuild
stage: prep stage: prep
variables: variables:
GIT_STRATEGY: none GIT_STRATEGY: none
UBUNTU_VERSION: '19.04' FDO_DISTRIBUTION_PACKAGES: 'git gcc g++ meson automake autoconf libtool make pkg-config python3 check valgrind binutils doxygen xz-utils'
DISTRIB_NAME: ubuntu
DISTRIB_VERSION: $UBUNTU_VERSION
TAG: $UBUNTU_TAG
### debian stable ### debian stable
debian:stable@container-prep: debian:stable@container-prep:
extends: extends:
- .debian@container-build - .debian:stable
- .fdo.container-build@debian
- .pull_upstream_or_rebuild - .pull_upstream_or_rebuild
stage: prep stage: prep
variables: variables:
GIT_STRATEGY: none GIT_STRATEGY: none
DEBIAN_VERSION: 'stable' FDO_DISTRIBUTION_PACKAGES: 'git gcc g++ meson automake autoconf libtool make pkg-config python3 check valgrind binutils doxygen xz-utils'
DISTRIB_NAME: debian
DISTRIB_VERSION: $DEBIAN_VERSION
TAG: $DEBIAN_TAG
### debian sid ### debian sid
debian:sid@container-prep: debian:sid@container-prep:
extends: extends:
- .debian@container-build - .debian:sid
- .fdo.container-build@debian
- .pull_upstream_or_rebuild - .pull_upstream_or_rebuild
stage: prep stage: prep
variables: variables:
GIT_STRATEGY: none GIT_STRATEGY: none
DEBIAN_VERSION: 'sid' FDO_DISTRIBUTION_PACKAGES: 'git gcc g++ meson automake autoconf libtool make pkg-config python3 check valgrind binutils doxygen xz-utils'
DISTRIB_NAME: debian
DISTRIB_VERSION: $DEBIAN_VERSION
TAG: $DEBIAN_TAG
### centos 7 ### centos 7
centos:7@container-prep: centos:7@container-prep:
extends: extends:
- .centos@container-build - .centos:7
- .fdo.container-build@centos
- .pull_upstream_or_rebuild - .pull_upstream_or_rebuild
stage: prep stage: prep
variables: variables:
GIT_STRATEGY: none GIT_STRATEGY: none
CENTOS_VERSION: '7' FDO_DISTRIBUTION_PACKAGES: 'git gcc gcc-c++ automake autoconf libtool make pkgconfig python3 check-devel valgrind binutils xz'
DISTRIB_NAME: centos
DISTRIB_VERSION: $CENTOS_VERSION
TAG: $CENTOS_TAG
### centos 8 ### centos 8
centos:8@container-prep: centos:8@container-prep:
extends: extends:
- .centos@container-build - .centos:8
- .fdo.container-build@centos
- .pull_upstream_or_rebuild - .pull_upstream_or_rebuild
stage: prep stage: prep
variables: variables:
GIT_STRATEGY: none GIT_STRATEGY: none
CENTOS_VERSION: '8' FDO_DISTRIBUTION_PACKAGES: 'git gcc gcc-c++ automake autoconf libtool make pkgconfig python3 check-devel valgrind binutils xz'
DISTRIB_NAME: centos
DISTRIB_VERSION: $CENTOS_VERSION
TAG: $CENTOS_TAG
### arch rolling ### arch rolling
arch:rolling@container-prep: arch:rolling@container-prep:
extends: extends:
- .arch@container-build - .arch:rolling
- .fdo.container-build@arch
- .pull_upstream_or_rebuild - .pull_upstream_or_rebuild
stage: prep stage: prep
variables: variables:
GIT_STRATEGY: none GIT_STRATEGY: none
ARCH_VERSION: 'rolling' FDO_DISTRIBUTION_PACKAGES: 'git gcc meson automake autoconf libtool make pkgconfig python3 check valgrind binutils doxygen'
DISTRIB_NAME: arch
DISTRIB_VERSION: $ARCH_VERSION
TAG: $ARCH_TAG
### alpine latest ### alpine latest
alpine:latest@container-prep: alpine:latest@container-prep:
extends: extends:
- .alpine@container-build - .alpine:latest
- .fdo.container-build@alpine
- .pull_upstream_or_rebuild - .pull_upstream_or_rebuild
stage: prep stage: prep
variables: variables:
GIT_STRATEGY: none GIT_STRATEGY: none
ALPINE_VERSION: 'latest' FDO_DISTRIBUTION_PACKAGES: 'git gcc g++ meson automake autoconf libtool make pkgconfig python3 check-dev valgrind binutils doxygen xz linux-headers'
DISTRIB_NAME: alpine
DISTRIB_VERSION: $ALPINE_VERSION
TAG: $ALPINE_TAG
################################################################# #################################################################
@ -350,8 +394,7 @@ alpine:latest@container-prep:
stage: container_clean stage: container_clean
image: $BUILDAH_IMAGE image: $BUILDAH_IMAGE
script: script:
# get the full container image name (CURRENT_CONTAINER_IMAGE still has indirections) - CONTAINER_IMAGE=$DISTRO_CONTAINER_IMAGE
- CONTAINER_IMAGE=$(eval echo "$CURRENT_CONTAINER_IMAGE")
- GITLAB=$(echo $CI_PROJECT_URL | cut -f3 -d/) - GITLAB=$(echo $CI_PROJECT_URL | cut -f3 -d/)
- REPOSITORY=$(echo $CONTAINER_IMAGE | cut -f2- -d/ | cut -f1 -d:) - REPOSITORY=$(echo $CONTAINER_IMAGE | cut -f2- -d/ | cut -f1 -d:)
- IMAGE_PATH=$(echo $CONTAINER_IMAGE | cut -f1 -d:) - IMAGE_PATH=$(echo $CONTAINER_IMAGE | cut -f1 -d:)
@ -416,85 +459,65 @@ alpine:latest@container-prep:
variables: variables:
GIT_STRATEGY: none GIT_STRATEGY: none
### fedora 30 ### fedora 30
fedora:30@container-clean: fedora:30@container-clean:
extends: .container-clean extends:
variables: - .fedora:30
FEDORA_VERSION: '30' - .container-clean
CURRENT_CONTAINER_IMAGE: $FEDORA_CONTAINER_IMAGE
### fedora 31 ### fedora 31
fedora:31@container-clean: fedora:31@container-clean:
extends: .container-clean extends:
variables: - .fedora:31
FEDORA_VERSION: '31' - .container-clean
CURRENT_CONTAINER_IMAGE: $FEDORA_CONTAINER_IMAGE
### ubuntu 19.10 ### ubuntu 19.10
ubuntu:19.10@container-clean: ubuntu:19.10@container-clean:
extends: .container-clean extends:
variables: - .ubuntu:19.10
UBUNTU_VERSION: '19.10' - .container-clean
CURRENT_CONTAINER_IMAGE: $UBUNTU_CONTAINER_IMAGE
### ubuntu 19.04 ### ubuntu 19.04
ubuntu:19.04@container-clean: ubuntu:19.04@container-clean:
extends: .container-clean extends:
variables: - .ubuntu:19.04
UBUNTU_VERSION: '19.04' - .container-clean
CURRENT_CONTAINER_IMAGE: $UBUNTU_CONTAINER_IMAGE
### debian stable ### debian stable
debian:stable@container-clean: debian:stable@container-clean:
extends: .container-clean extends:
variables: - .debian:stable
DEBIAN_VERSION: 'stable' - .container-clean
CURRENT_CONTAINER_IMAGE: $DEBIAN_CONTAINER_IMAGE
### debian sid ### debian sid
debian:sid@container-clean: debian:sid@container-clean:
extends: .container-clean extends:
variables: - .debian:sid
DEBIAN_VERSION: 'sid' - .container-clean
CURRENT_CONTAINER_IMAGE: $DEBIAN_CONTAINER_IMAGE
### centos 7 ### centos 7
centos:7@container-clean: centos:7@container-clean:
extends: .container-clean extends:
variables: - .centos:7
CENTOS_VERSION: '7' - .container-clean
CURRENT_CONTAINER_IMAGE: $CENTOS_CONTAINER_IMAGE
### centos 8 ### centos 8
centos:8@container-clean: centos:8@container-clean:
extends: .container-clean extends:
variables: - .centos:8
CENTOS_VERSION: '8' - .container-clean
CURRENT_CONTAINER_IMAGE: $CENTOS_CONTAINER_IMAGE
### arch rolling ### arch rolling
arch:rolling@container-clean: arch:rolling@container-clean:
extends: .container-clean extends:
variables: - .arch:rolling
ARCH_VERSION: 'rolling' - .container-clean
CURRENT_CONTAINER_IMAGE: $ARCH_CONTAINER_IMAGE
### alpine latest ### alpine latest
alpine:latest@container-clean: alpine:latest@container-clean:
extends: .container-clean extends:
variables: - .alpine:latest
ALPINE_VERSION: 'latest' - .container-clean
CURRENT_CONTAINER_IMAGE: $ALPINE_CONTAINER_IMAGE
################################################################# #################################################################
@ -521,160 +544,144 @@ alpine:latest@container-clean:
fedora:30@autotools-build: fedora:30@autotools-build:
extends: .autotools-build@template extends:
- .fedora:30
- .autotools-build@template
stage: autotools stage: autotools
image: $FEDORA_CONTAINER_IMAGE
variables:
FEDORA_VERSION: '30'
needs: ['fedora:30@container-prep'] needs: ['fedora:30@container-prep']
fedora:30@meson-build: fedora:30@meson-build:
extends: .meson-build@template extends:
- .fedora:30
- .meson-build@template
stage: meson stage: meson
image: $FEDORA_CONTAINER_IMAGE
variables:
FEDORA_VERSION: '30'
needs: ['fedora:30@container-prep'] needs: ['fedora:30@container-prep']
fedora:31@autotools-build: fedora:31@autotools-build:
extends: .autotools-build@template extends:
- .fedora:31
- .autotools-build@template
stage: autotools stage: autotools
image: $FEDORA_CONTAINER_IMAGE
variables:
FEDORA_VERSION: '31'
needs: ['fedora:31@container-prep'] needs: ['fedora:31@container-prep']
fedora:31@meson-build: fedora:31@meson-build:
extends: .meson-build@template extends:
- .fedora:31
- .meson-build@template
stage: meson stage: meson
image: $FEDORA_CONTAINER_IMAGE
variables:
FEDORA_VERSION: '31'
needs: ['fedora:31@container-prep'] needs: ['fedora:31@container-prep']
ubuntu:19.10@autotools-build: ubuntu:19.10@autotools-build:
extends: .autotools-build@template extends:
- .ubuntu:19.10
- .autotools-build@template
stage: autotools stage: autotools
image: $UBUNTU_CONTAINER_IMAGE
variables:
UBUNTU_VERSION: '19.10'
needs: ['ubuntu:19.10@container-prep'] needs: ['ubuntu:19.10@container-prep']
ubuntu:19.10@meson-build: ubuntu:19.10@meson-build:
extends: .meson-build@template extends:
- .ubuntu:19.10
- .meson-build@template
stage: meson stage: meson
image: $UBUNTU_CONTAINER_IMAGE
variables:
UBUNTU_VERSION: '19.10'
needs: ['ubuntu:19.10@container-prep'] needs: ['ubuntu:19.10@container-prep']
ubuntu:19.04@autotools-build: ubuntu:19.04@autotools-build:
extends: .autotools-build@template extends:
- .ubuntu:19.04
- .autotools-build@template
stage: autotools stage: autotools
image: $UBUNTU_CONTAINER_IMAGE
variables:
UBUNTU_VERSION: '19.04'
needs: ['ubuntu:19.04@container-prep'] needs: ['ubuntu:19.04@container-prep']
ubuntu:19.04@meson-build: ubuntu:19.04@meson-build:
extends: .meson-build@template extends:
- .ubuntu:19.04
- .meson-build@template
stage: meson stage: meson
image: $UBUNTU_CONTAINER_IMAGE
variables:
UBUNTU_VERSION: '19.04'
needs: ['ubuntu:19.04@container-prep'] needs: ['ubuntu:19.04@container-prep']
debian:stable@autotools-build: debian:stable@autotools-build:
extends: .autotools-build@template extends:
- .debian:stable
- .autotools-build@template
stage: autotools stage: autotools
image: $DEBIAN_CONTAINER_IMAGE
variables:
DEBIAN_VERSION: 'stable'
needs: ['debian:stable@container-prep'] needs: ['debian:stable@container-prep']
debian:stable@meson-build: debian:stable@meson-build:
extends: .meson-build@template extends:
- .debian:stable
- .meson-build@template
stage: meson stage: meson
image: $DEBIAN_CONTAINER_IMAGE
variables:
DEBIAN_VERSION: 'stable'
needs: ['debian:stable@container-prep'] needs: ['debian:stable@container-prep']
debian:sid@autotools-build: debian:sid@autotools-build:
extends: .autotools-build@template extends:
- .debian:sid
- .autotools-build@template
stage: autotools stage: autotools
image: $DEBIAN_CONTAINER_IMAGE
variables:
DEBIAN_VERSION: 'sid'
needs: ['debian:sid@container-prep'] needs: ['debian:sid@container-prep']
debian:sid@meson-build: debian:sid@meson-build:
extends: .meson-build@template extends:
- .debian:sid
- .meson-build@template
stage: meson stage: meson
image: $DEBIAN_CONTAINER_IMAGE
variables:
DEBIAN_VERSION: 'sid'
needs: ['debian:sid@container-prep'] needs: ['debian:sid@container-prep']
centos:7@autotools-build: centos:7@autotools-build:
extends: .autotools-build@template extends:
- .centos:7
- .autotools-build@template
stage: autotools stage: autotools
image: $CENTOS_CONTAINER_IMAGE
variables: variables:
CENTOS_VERSION: '7'
MAKE_ARGS: '' # disable distcheck, requires doxygen MAKE_ARGS: '' # disable distcheck, requires doxygen
needs: ['centos:7@container-prep'] needs: ['centos:7@container-prep']
centos:8@autotools-build: centos:8@autotools-build:
extends: .autotools-build@template extends:
- .centos:8
- .autotools-build@template
stage: autotools stage: autotools
image: $CENTOS_CONTAINER_IMAGE
variables: variables:
CENTOS_VERSION: '8'
MAKE_ARGS: '' # disable distcheck, requires doxygen MAKE_ARGS: '' # disable distcheck, requires doxygen
needs: ['centos:8@container-prep'] needs: ['centos:8@container-prep']
arch:rolling@autotools-build: arch:rolling@autotools-build:
extends: .autotools-build@template extends:
- .arch:rolling
- .autotools-build@template
stage: autotools stage: autotools
image: $ARCH_CONTAINER_IMAGE
variables:
ARCH_VERSION: 'rolling'
needs: ['arch:rolling@container-prep'] needs: ['arch:rolling@container-prep']
arch:rolling@meson-build: arch:rolling@meson-build:
extends: .meson-build@template extends:
- .arch:rolling
- .meson-build@template
stage: meson stage: meson
image: $ARCH_CONTAINER_IMAGE
variables:
ARCH_VERSION: 'rolling'
needs: ['arch:rolling@container-prep'] needs: ['arch:rolling@container-prep']
alpine:latest@autotools-build: alpine:latest@autotools-build:
extends: .autotools-build@template extends:
- .alpine:latest
- .autotools-build@template
stage: autotools stage: autotools
image: $ALPINE_CONTAINER_IMAGE
variables:
ALPINE_VERSION: 'latest'
needs: ['alpine:latest@container-prep'] needs: ['alpine:latest@container-prep']
alpine:latest@meson-build: alpine:latest@meson-build:
extends: .meson-build@template extends:
- .alpine:latest
- .meson-build@template
stage: meson stage: meson
image: $ALPINE_CONTAINER_IMAGE
variables:
ALPINE_VERSION: 'latest'
needs: ['alpine:latest@container-prep'] needs: ['alpine:latest@container-prep']
@ -683,11 +690,10 @@ alpine:latest@meson-build:
# We only run the build option combinations on one image # We only run the build option combinations on one image
# because they're supposed to fail equally on all # because they're supposed to fail equally on all
.fedora-custom-build@autotools-template: .fedora-custom-build@autotools-template:
extends: .autotools-build@template extends:
- .fedora:31
- .autotools-build@template
stage: build stage: build
image: $FEDORA_CONTAINER_IMAGE
variables:
FEDORA_VERSION: 31
needs: ['fedora:31@container-prep'] needs: ['fedora:31@container-prep']
no-valgrind:autotools: no-valgrind:autotools:
@ -726,11 +732,10 @@ enable-gcov:autotools:
CONFIGURE_FLAGS: "--enable-gcov" CONFIGURE_FLAGS: "--enable-gcov"
.fedora-custom-build@meson-template: .fedora-custom-build@meson-template:
extends: .meson-build@template extends:
- .fedora:31
- .meson-build@template
stage: build stage: build
image: $FEDORA_CONTAINER_IMAGE
variables:
FEDORA_VERSION: 31
needs: ['fedora:31@container-prep'] needs: ['fedora:31@container-prep']
no-valgrind:meson: no-valgrind:meson:
@ -777,8 +782,9 @@ scan-build:meson:
SKIP_MESON_TEST: 1 SKIP_MESON_TEST: 1
soname: soname:
extends:
- .fedora:31
stage: build stage: build
image: $FEDORA_CONTAINER_IMAGE
script: script:
- ./autogen.sh --prefix=$PWD/prefix-autotools/ - ./autogen.sh --prefix=$PWD/prefix-autotools/
- make install - make install
@ -786,8 +792,6 @@ soname:
- meson "$MESON_BUILDDIR" --prefix=$PWD/prefix-meson/ - meson "$MESON_BUILDDIR" --prefix=$PWD/prefix-meson/
- ninja -C "$MESON_BUILDDIR" install - ninja -C "$MESON_BUILDDIR" install
- ls -l $PWD/prefix-meson/lib64/libevdev.so.2.3.0 - ls -l $PWD/prefix-meson/lib64/libevdev.so.2.3.0
variables:
FEDORA_VERSION: 31
needs: ['fedora:31@container-prep'] needs: ['fedora:31@container-prep']
################################################################# #################################################################
@ -805,12 +809,14 @@ soname:
fi fi
.qemu@fedora:31: .qemu@fedora:31:
extends:
- .fedora:31
stage: VM stage: VM
image: $QEMU_CONTAINER_IMAGE image:
$CI_REGISTRY_IMAGE/$DISTRIB_NAME/$FDO_DISTRIBUTION_VERSION:qemu-$FDO_DISTRIBUTION_TAG
tags: tags:
- kvm - kvm
variables: variables:
FEDORA_VERSION: 31
MESON_BUILDDIR: build_dir MESON_BUILDDIR: build_dir
script: script:
# start our vm, no args required # start our vm, no args required
@ -863,8 +869,9 @@ qemu:meson:valgrind:
MESON_TEST_ARGS: '--setup=valgrind' MESON_TEST_ARGS: '--setup=valgrind'
meson-from-tarball: meson-from-tarball:
extends:
- .fedora:31
stage: tarballs stage: tarballs
image: $FEDORA_CONTAINER_IMAGE
script: script:
- export INSTALLDIR="$PWD/_inst" - export INSTALLDIR="$PWD/_inst"
- mkdir _build - mkdir _build
@ -881,13 +888,12 @@ meson-from-tarball:
- ninja -C "$MESON_BUILDDIR" install - ninja -C "$MESON_BUILDDIR" install
- popd > /dev/null - popd > /dev/null
- ls -lR $INSTALLDIR - ls -lR $INSTALLDIR
variables:
FEDORA_VERSION: 31
needs: ['fedora:31@container-prep'] needs: ['fedora:31@container-prep']
autotools-from-tarball: autotools-from-tarball:
extends:
- .fedora:31
stage: tarballs stage: tarballs
image: $FEDORA_CONTAINER_IMAGE
script: script:
- export INSTALLDIR="$PWD/_inst" - export INSTALLDIR="$PWD/_inst"
- meson "$MESON_BUILDDIR" - meson "$MESON_BUILDDIR"
@ -904,6 +910,4 @@ autotools-from-tarball:
- popd > /dev/null - popd > /dev/null
- popd > /dev/null - popd > /dev/null
- ls -lR $INSTALLDIR - ls -lR $INSTALLDIR
variables:
FEDORA_VERSION: 31
needs: ['fedora:31@container-prep'] needs: ['fedora:31@container-prep']

View file

@ -1,31 +1,136 @@
# This file contains the configuration for the gitlab ci. # This file contains the configuration for the gitlab ci.
# See the .gitlab-ci/generate-gitlab-ci.py file for more info # See the .gitlab-ci/generate-gitlab-ci.py file for more info
#
# We're happy to rebuild all containers when one changes.
.default_tag: &default_tag '2020-03-06.0'
distributions: distributions:
- name: fedora - name: fedora
tag: *default_tag
versions: versions:
- '30' - '30'
- '31' - '31'
packages:
- git
- gcc
- gcc-c++
- meson
- automake
- autoconf
- libtool
- make
- pkgconfig
- python3
- check-devel
- valgrind
- binutils
- doxygen
- xz
- clang-analyzer
want_qemu: true
- name: ubuntu - name: ubuntu
tag: *default_tag
versions: versions:
- '19.10' - '19.10'
- '19.04' - '19.04'
packages:
- git
- gcc
- g++
- meson
- automake
- autoconf
- libtool
- make
- pkg-config
- python3
- check
- valgrind
- binutils
- doxygen
- xz-utils
- name: debian - name: debian
tag: *default_tag
versions: versions:
- 'stable' - 'stable'
- 'sid' - 'sid'
packages:
- git
- gcc
- g++
- meson
- automake
- autoconf
- libtool
- make
- pkg-config
- python3
- check
- valgrind
- binutils
- doxygen
- xz-utils
- name: centos - name: centos
tag: *default_tag
versions: versions:
- '7' - '7'
- '8' - '8'
packages:
- git
- gcc
- gcc-c++
- automake
- autoconf
- libtool
- make
- pkgconfig
- python3
- check-devel
- valgrind
- binutils
- xz
build: build:
meson: False meson: False
extra_variables: extra_variables:
# note: the variable value includes the comment because we want that in the gitlab-ci file # note: the variable value includes the comment because we want that in the gitlab-ci file
MAKE_ARGS: "'' # disable distcheck, requires doxygen" MAKE_ARGS: "'' # disable distcheck, requires doxygen"
- name: arch - name: arch
tag: *default_tag
versions: versions:
- 'rolling' - 'rolling'
packages:
- git
- gcc
- meson
- automake
- autoconf
- libtool
- make
- pkgconfig
- python3
- check
- valgrind
- binutils
- doxygen
- name: alpine - name: alpine
tag: *default_tag
versions: versions:
- 'latest' - 'latest'
packages:
- git
- gcc
- g++
- meson
- automake
- autoconf
- libtool
- make
- pkgconfig
- python3
- check-dev
- valgrind
- binutils
- doxygen
- xz
- linux-headers

View file

@ -6,7 +6,7 @@
# # # #
######################################## ########################################
.templates_sha: &template_sha 8410d3382c4ba5e83da76a027cb332169f2a95ad # see https://docs.gitlab.com/ee/ci/yaml/#includefile .templates_sha: &template_sha df52af2195b052325daf5d715c88be90f8ec7d86 # see https://docs.gitlab.com/ee/ci/yaml/#includefile
include: include:
{% for distribution in distributions|map(attribute='name')|unique()|sort() %} {% for distribution in distributions|map(attribute='name')|unique()|sort() %}
@ -26,42 +26,10 @@ stages:
- container_clean # clean up unused container images - container_clean # clean up unused container images
variables: variables:
############################################################################### # The upstrem repository we will check for images
# This is the list of packages required to build libevdev with the default # FDO_UPSTREAM_REPO: libevdev/libevdev
# configuration. # # The image that has buildah installed
# #
# Run dnf install/apt-get install/.. with the list of packages for your #
# distribution #
###############################################################################
FEDORA_RPMS: 'git gcc gcc-c++ meson automake autoconf libtool make pkgconfig python3 check-devel valgrind binutils doxygen xz clang-analyzer'
CENTOS_RPMS: 'git gcc gcc-c++ automake autoconf libtool make pkgconfig python3 check-devel valgrind binutils xz'
UBUNTU_DEBS: 'git gcc g++ meson automake autoconf libtool make pkg-config python3 check valgrind binutils doxygen xz-utils'
DEBIAN_DEBS: $UBUNTU_DEBS
ARCH_PKGS: 'git gcc meson automake autoconf libtool make pkgconfig python3 check valgrind binutils doxygen'
ALPINE_PKGS: 'git gcc g++ meson automake autoconf libtool make pkgconfig python3 check-dev valgrind binutils doxygen xz linux-headers'
############################ 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
# libevdev version
FEDORA_TAG: '2020-02-26.4'
CENTOS_TAG: '2020-02-26.4'
DEBIAN_TAG: '2020-02-26.4'
UBUNTU_TAG: '2020-02-26.4'
ARCH_TAG: '2020-02-26.4'
ALPINE_TAG: '2020-02-26.4'
QEMU_TAG: 'qemu-2020-02-26.4'
UPSTREAM_REPO: libevdev/libevdev
BUILDAH_IMAGE: $CI_REGISTRY/wayland/ci-templates/buildah:latest BUILDAH_IMAGE: $CI_REGISTRY/wayland/ci-templates/buildah:latest
FEDORA_CONTAINER_IMAGE: $CI_REGISTRY_IMAGE/fedora/$FEDORA_VERSION:$FEDORA_TAG
CENTOS_CONTAINER_IMAGE: $CI_REGISTRY_IMAGE/centos/$CENTOS_VERSION:$CENTOS_TAG
UBUNTU_CONTAINER_IMAGE: $CI_REGISTRY_IMAGE/ubuntu/$UBUNTU_VERSION:$UBUNTU_TAG
DEBIAN_CONTAINER_IMAGE: $CI_REGISTRY_IMAGE/debian/$DEBIAN_VERSION:$DEBIAN_TAG
ARCH_CONTAINER_IMAGE: $CI_REGISTRY_IMAGE/arch/rolling:$ARCH_TAG
ALPINE_CONTAINER_IMAGE: $CI_REGISTRY_IMAGE/alpine/latest:$ALPINE_TAG
QEMU_CONTAINER_IMAGE: $CI_REGISTRY_IMAGE/fedora/$FEDORA_VERSION:$QEMU_TAG
LIBEVDEV_SKIP_ROOT_TESTS: 1 LIBEVDEV_SKIP_ROOT_TESTS: 1
GIT_DEPTH: 1 GIT_DEPTH: 1
MESON_BUILDDIR: 'build dir' MESON_BUILDDIR: 'build dir'
@ -94,6 +62,30 @@ variables:
script: script:
- .gitlab-ci/meson-build.sh - .gitlab-ci/meson-build.sh
# Base image for a given distribution, provides
# - the image of that distribution
# - DISTRO_CONTAINER_IMAGE for any manipulation the job needs to be
.distribution_image:
image: $CI_REGISTRY_IMAGE/$DISTRIB_NAME/$FDO_DISTRIBUTION_VERSION:$FDO_DISTRIBUTION_TAG
variables:
DISTRO_CONTAINER_IMAGE: $CI_REGISTRY_IMAGE/$DISTRIB_NAME/$FDO_DISTRIBUTION_VERSION:$FDO_DISTRIBUTION_TAG
{# Generate templates for every distribution/version combination we want, any
job can then just extends: .name:version and the images will sort
themselves out. #}
{% for distro in distributions %}
{% for version in distro.versions %}
.{{distro.name}}:{{version}}:
extends: .distribution_image
variables:
DISTRIB_NAME: '{{distro.name}}'
FDO_DISTRIBUTION_TAG: '{{distro.tag}}'
FDO_DISTRIBUTION_VERSION: '{{version}}'
{% endfor %}
{% endfor %}
################################################################# #################################################################
# # # #
# prep stage # # prep stage #
@ -146,52 +138,58 @@ check-commit:
# log in to the registry # log in to the registry
- podman login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY - podman login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
# get the full container image name (DISTRIB_VERSION still has indirections) # get the full container image name (FDO_DISTRIBUTION_VERSION still has indirections)
- IMAGE=$(eval echo "$DISTRIB_NAME/$DISTRIB_VERSION:$TAG") - IMAGE=$(eval echo "$DISTRIB_NAME/$FDO_DISTRIBUTION_VERSION:$FDO_DISTRIBUTION_TAG")
- | - |
# force rebuild if schedule, reuse otherwise # force rebuild if schedule, reuse otherwise
if [[ $CI_PIPELINE_SOURCE != "schedule" ]] ; if [[ $CI_PIPELINE_SOURCE != "schedule" ]] ;
then then
# pull the latest upstream image if it exists # pull the latest upstream image if it exists
skopeo copy docker://$CI_REGISTRY/$UPSTREAM_REPO/$IMAGE \ skopeo copy docker://$CI_REGISTRY/$FDO_UPSTREAM_REPO/$IMAGE \
docker://$CI_REGISTRY_IMAGE/$IMAGE && exit 0 || true ; docker://$CI_REGISTRY_IMAGE/$IMAGE && exit 0 || true ;
# check if our image is already in the current registry # check if our image is already in the current registry
skopeo inspect docker://$CI_REGISTRY_IMAGE/$IMAGE > /dev/null && exit 0 || true ; skopeo inspect docker://$CI_REGISTRY_IMAGE/$IMAGE > /dev/null && exit 0 || true ;
fi fi
fedora:31@qemu-prep: {% for distro in distributions %}
{% if distro.want_qemu %}
{% for version in distro.versions %}
.{{ distro.name }}:{{ version }}@qemu-prep:
extends: extends:
- .fedora@qemu-build - .{{ distro.name }}:{{ version }}
- .fdo.qemu-build@fedora
- .pull_upstream_or_rebuild - .pull_upstream_or_rebuild
stage: prep stage: prep
tags: tags:
- kvm - kvm
variables: variables:
GIT_STRATEGY: none GIT_STRATEGY: none
FEDORA_VERSION: 31 FDO_DISTRIBUTION_TAG: qemu-{{ distro.tag }}
FEDORA_TAG: $QEMU_TAG FDO_DISTRIBUTION_PACKAGES: '{{ ' '.join(distro.packages)}}'
DISTRIB_NAME: fedora
DISTRIB_VERSION: $FEDORA_VERSION
TAG: $QEMU_TAG
allow_failure: true allow_failure: true
{% endfor %}
{% endif %}
{% endfor %}
fedora:31@qemu-prep:
extends: .fedora:31@qemu-prep
{% for distro in distributions %} {% for distro in distributions %}
{% for version in distro.versions %} {% for version in distro.versions %}
### {{ distro.name }} {{ version }} ### {{ distro.name }} {{ version }}
{{ distro.name }}:{{ version }}@container-prep: {{ distro.name }}:{{ version }}@container-prep:
extends: extends:
- .{{ distro.name }}@container-build - .{{ distro.name }}:{{ version }}
- .fdo.container-build@{{ distro.name }}
- .pull_upstream_or_rebuild - .pull_upstream_or_rebuild
stage: prep stage: prep
variables: variables:
GIT_STRATEGY: none GIT_STRATEGY: none
{{ distro.name.upper() }}_VERSION: '{{ version }}' FDO_DISTRIBUTION_PACKAGES: '{{ ' '.join(distro.packages)}}'
DISTRIB_NAME: {{ distro.name }}
DISTRIB_VERSION: ${{ distro.name.upper() }}_VERSION
TAG: ${{ distro.name.upper() }}_TAG
{% endfor %} {% endfor %}
{% endfor %} {% endfor %}
@ -212,8 +210,7 @@ fedora:31@qemu-prep:
stage: container_clean stage: container_clean
image: $BUILDAH_IMAGE image: $BUILDAH_IMAGE
script: script:
# get the full container image name (CURRENT_CONTAINER_IMAGE still has indirections) - CONTAINER_IMAGE=$DISTRO_CONTAINER_IMAGE
- CONTAINER_IMAGE=$(eval echo "$CURRENT_CONTAINER_IMAGE")
- GITLAB=$(echo $CI_PROJECT_URL | cut -f3 -d/) - GITLAB=$(echo $CI_PROJECT_URL | cut -f3 -d/)
- REPOSITORY=$(echo $CONTAINER_IMAGE | cut -f2- -d/ | cut -f1 -d:) - REPOSITORY=$(echo $CONTAINER_IMAGE | cut -f2- -d/ | cut -f1 -d:)
- IMAGE_PATH=$(echo $CONTAINER_IMAGE | cut -f1 -d:) - IMAGE_PATH=$(echo $CONTAINER_IMAGE | cut -f1 -d:)
@ -280,13 +277,11 @@ fedora:31@qemu-prep:
{% for distro in distributions %} {% for distro in distributions %}
{% for version in distro.versions %} {% for version in distro.versions %}
### {{ distro.name }} {{ version }} ### {{ distro.name }} {{ version }}
{{ distro.name }}:{{ version }}@container-clean: {{ distro.name }}:{{ version }}@container-clean:
extends: .container-clean extends:
variables: - .{{ distro.name }}:{{ version }}
{{ distro.name.upper() }}_VERSION: '{{ version }}' - .container-clean
CURRENT_CONTAINER_IMAGE: ${{ distro.name.upper() }}_CONTAINER_IMAGE
{% endfor %} {% endfor %}
{% endfor %} {% endfor %}
@ -317,32 +312,32 @@ fedora:31@qemu-prep:
{% for version in distro.versions %} {% for version in distro.versions %}
{{ distro.name }}:{{ version }}@autotools-build: {{ distro.name }}:{{ version }}@autotools-build:
extends: .autotools-build@template extends:
- .{{ distro.name }}:{{ version }}
- .autotools-build@template
stage: autotools stage: autotools
image: ${{ distro.name.upper() }}_CONTAINER_IMAGE {# Where we have extra_variables defined, add them to the list #}
{% if distro.build is defined and distro.build.extra_variables is defined %}
variables: variables:
{{ distro.name.upper() }}_VERSION: '{{ version }}' {% for key, value in distro.build.extra_variables.items() %}
{# Where we have extra_variables defined, add them to the list #}
{% if distro.build is defined and distro.build.extra_variables is defined %}
{% for key, value in distro.build.extra_variables.items() %}
{{ key }}: {{ value }} {{ key }}: {{ value }}
{% endfor %} {% endfor %}
{% endif %} {% endif %}
needs: ['{{ distro.name }}:{{ version }}@container-prep'] needs: ['{{ distro.name }}:{{ version }}@container-prep']
{% if not distro.build is defined or distro.build.meson|default(True) %} {% if not distro.build is defined or distro.build.meson|default(True) %}
{{ distro.name }}:{{ version }}@meson-build: {{ distro.name }}:{{ version }}@meson-build:
extends: .meson-build@template extends:
- .{{ distro.name }}:{{ version }}
- .meson-build@template
stage: meson stage: meson
image: ${{ distro.name.upper() }}_CONTAINER_IMAGE {# Where we have extra_variables defined, add them to the list #}
{% if distro.build is defined and distro.build.extra_variables is defined %}
variables: variables:
{{ distro.name.upper() }}_VERSION: '{{ version }}' {% for key, value in distro.build.extra_variables.items() %}
{# Where we have extra_variables defined, add them to the list #}
{% if distro.build is defined and distro.build.extra_variables is defined %}
{% for key, value in distro.build.extra_variables.items() %}
{{ key }}: {{ value }} {{ key }}: {{ value }}
{% endfor %} {% endfor %}
{% endif %} {% endif %}
needs: ['{{ distro.name }}:{{ version }}@container-prep'] needs: ['{{ distro.name }}:{{ version }}@container-prep']
{% endif %} {% endif %}
@ -354,11 +349,10 @@ fedora:31@qemu-prep:
# We only run the build option combinations on one image # We only run the build option combinations on one image
# because they're supposed to fail equally on all # because they're supposed to fail equally on all
.fedora-custom-build@autotools-template: .fedora-custom-build@autotools-template:
extends: .autotools-build@template extends:
- .fedora:31
- .autotools-build@template
stage: build stage: build
image: $FEDORA_CONTAINER_IMAGE
variables:
FEDORA_VERSION: 31
needs: ['fedora:31@container-prep'] needs: ['fedora:31@container-prep']
no-valgrind:autotools: no-valgrind:autotools:
@ -397,11 +391,10 @@ enable-gcov:autotools:
CONFIGURE_FLAGS: "--enable-gcov" CONFIGURE_FLAGS: "--enable-gcov"
.fedora-custom-build@meson-template: .fedora-custom-build@meson-template:
extends: .meson-build@template extends:
- .fedora:31
- .meson-build@template
stage: build stage: build
image: $FEDORA_CONTAINER_IMAGE
variables:
FEDORA_VERSION: 31
needs: ['fedora:31@container-prep'] needs: ['fedora:31@container-prep']
no-valgrind:meson: no-valgrind:meson:
@ -448,8 +441,9 @@ scan-build:meson:
SKIP_MESON_TEST: 1 SKIP_MESON_TEST: 1
soname: soname:
extends:
- .fedora:31
stage: build stage: build
image: $FEDORA_CONTAINER_IMAGE
script: script:
- ./autogen.sh --prefix=$PWD/prefix-autotools/ - ./autogen.sh --prefix=$PWD/prefix-autotools/
- make install - make install
@ -457,8 +451,6 @@ soname:
- meson "$MESON_BUILDDIR" --prefix=$PWD/prefix-meson/ - meson "$MESON_BUILDDIR" --prefix=$PWD/prefix-meson/
- ninja -C "$MESON_BUILDDIR" install - ninja -C "$MESON_BUILDDIR" install
- ls -l $PWD/prefix-meson/lib64/libevdev.so.2.3.0 - ls -l $PWD/prefix-meson/lib64/libevdev.so.2.3.0
variables:
FEDORA_VERSION: 31
needs: ['fedora:31@container-prep'] needs: ['fedora:31@container-prep']
################################################################# #################################################################
@ -476,12 +468,14 @@ soname:
fi fi
.qemu@fedora:31: .qemu@fedora:31:
extends:
- .fedora:31
stage: VM stage: VM
image: $QEMU_CONTAINER_IMAGE image:
$CI_REGISTRY_IMAGE/$DISTRIB_NAME/$FDO_DISTRIBUTION_VERSION:qemu-$FDO_DISTRIBUTION_TAG
tags: tags:
- kvm - kvm
variables: variables:
FEDORA_VERSION: 31
MESON_BUILDDIR: build_dir MESON_BUILDDIR: build_dir
script: script:
# start our vm, no args required # start our vm, no args required
@ -534,8 +528,9 @@ qemu:meson:valgrind:
MESON_TEST_ARGS: '--setup=valgrind' MESON_TEST_ARGS: '--setup=valgrind'
meson-from-tarball: meson-from-tarball:
extends:
- .fedora:31
stage: tarballs stage: tarballs
image: $FEDORA_CONTAINER_IMAGE
script: script:
- export INSTALLDIR="$PWD/_inst" - export INSTALLDIR="$PWD/_inst"
- mkdir _build - mkdir _build
@ -552,13 +547,12 @@ meson-from-tarball:
- ninja -C "$MESON_BUILDDIR" install - ninja -C "$MESON_BUILDDIR" install
- popd > /dev/null - popd > /dev/null
- ls -lR $INSTALLDIR - ls -lR $INSTALLDIR
variables:
FEDORA_VERSION: 31
needs: ['fedora:31@container-prep'] needs: ['fedora:31@container-prep']
autotools-from-tarball: autotools-from-tarball:
extends:
- .fedora:31
stage: tarballs stage: tarballs
image: $FEDORA_CONTAINER_IMAGE
script: script:
- export INSTALLDIR="$PWD/_inst" - export INSTALLDIR="$PWD/_inst"
- meson "$MESON_BUILDDIR" - meson "$MESON_BUILDDIR"
@ -575,6 +569,4 @@ autotools-from-tarball:
- popd > /dev/null - popd > /dev/null
- popd > /dev/null - popd > /dev/null
- ls -lR $INSTALLDIR - ls -lR $INSTALLDIR
variables:
FEDORA_VERSION: 31
needs: ['fedora:31@container-prep'] needs: ['fedora:31@container-prep']