diff options
author | Alex Richardson <arichardson.kde@gmail.com> | 2022-04-18 22:18:41 +0000 |
---|---|---|
committer | Alex Richardson <arichardson.kde@gmail.com> | 2022-05-07 16:48:29 +0100 |
commit | 4ce02f196b726cc0277e9c16a8182af07b20f842 (patch) | |
tree | 41340dc02c233fe5fe40c75ce4e581bc1de8e698 /.gitlab-ci.yml | |
parent | c6aa71b5de7e1cf2268dd6a281995e5196a96711 (diff) | |
download | dbus-4ce02f196b726cc0277e9c16a8182af07b20f842.tar.gz |
Use freedesktop/ci-templates for the GitLab CI
The CI templates include infrastructure to create docker images with all
packages specified in tools/ci-install.sh. Using those docker images
speeds up the CI since we don't have to install all the dependencies in
every pipeline. We could extend this to also create containers that have
mingw pre-installed but for now we only create an image with the
dependencies that are required for every job.
Diffstat (limited to '.gitlab-ci.yml')
-rw-r--r-- | .gitlab-ci.yml | 52 |
1 files changed, 46 insertions, 6 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ae346cb1..ae268459 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -20,6 +20,13 @@ # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. +include: + - project: 'freedesktop/ci-templates' + ref: 957024f97e7b0f2cedc9ef29c6970fbeadd9326c + file: + - '/templates/debian.yml' + - '/templates/opensuse.yml' + image: debian:bullseye-slim stages: @@ -45,8 +52,17 @@ variables: WINDOWS_IMAGE: "$CI_REGISTRY_IMAGE/$WINDOWS_AMD64_SUFFIX:$WINDOWS_TAG-$UPSTREAM_BRANCH" WINDOWS_UPSTREAM_IMAGE: "$CI_REGISTRY/$UPSTREAM_REPO/$WINDOWS_AMD64_SUFFIX:$WINDOWS_TAG-$UPSTREAM_BRANCH" +.debian-vars: + variables: + FDO_DISTRIBUTION_VERSION: 'bullseye-slim' + FDO_DISTRIBUTION_TAG: '2022-04-17' # Bump this version on every ci-install.sh change + +.opensuse-vars: + variables: + FDO_DISTRIBUTION_VERSION: 'leap' + FDO_DISTRIBUTION_TAG: '2022-04-17' # Bump this version on every ci-install.sh change -windows amd64 docker: +windows amd64 image: stage: "build docker" variables: # this file needs to be relative to docker/windows/ subdir @@ -88,9 +104,21 @@ windows amd64 docker: - chown -R user . - runuser -u user ./tools/ci-build.sh +debian image: + extends: + - .fdo.container-build@debian + - .debian-vars + variables: + FDO_DISTRIBUTION_EXEC: './tools/ci-install.sh' + stage: 'build docker' + .debian-build: - extends: .unix-host-build - image: "debian:bullseye-slim" + needs: ["debian image"] + extends: + - .fdo.distribution-image@debian + - .debian-vars + - .unix-host-build + stage: build debian autotools production: extends: .debian-build @@ -151,9 +179,21 @@ debian buster autotools: when: manual image: "debian:buster-slim" +opensuse image: + extends: + - .fdo.container-build@opensuse + - .opensuse-vars + variables: + FDO_DISTRIBUTION_EXEC: './tools/ci-install.sh' + stage: 'build docker' + .suse-build: - extends: .unix-host-build - image: "opensuse/leap:15" + needs: ["opensuse image"] + extends: + - .fdo.distribution-image@opensuse + - .opensuse-vars + - .unix-host-build + stage: build opensuse cmake: extends: .suse-build @@ -198,7 +238,7 @@ ubuntu jammy autotools: - 'windows' - '1809' needs: - - "windows amd64 docker" + - "windows amd64 image" timeout: '2h' before_script: - $ErrorActionPreference = "Stop" |