diff --git a/Makefile.am b/Makefile.am index a1bd81cb5039d1c928463970b994f039ab2d85c7..f08382e3b3edff644721dae27a62f8f1be2a26f8 100644 --- a/Makefile.am +++ b/Makefile.am @@ -468,6 +468,7 @@ EXTRA_DIST += $(top_srcdir)/.version EXTRA_DIST += autogen.sh EXTRA_DIST += build-aux/git-version-gen EXTRA_DIST += ci/Jenkinsfile +EXTRA_DIST += ci/gitlab-ci.yml EXTRA_DIST += data/capsule-mkstublib EXTRA_DIST += doc/Building-libcapsule.txt EXTRA_DIST += doc/Strategy.txt diff --git a/ci/gitlab-ci.yml b/ci/gitlab-ci.yml new file mode 100644 index 0000000000000000000000000000000000000000..b14878fc34f8e2eb1ea65194382605be8718b7ad --- /dev/null +++ b/ci/gitlab-ci.yml @@ -0,0 +1,96 @@ +# Copyright © 2019 Collabora Ltd. +# +# SPDX-License-Identifier: MIT +# +# Permission is hereby granted, free of charge, to any person obtaining +# a copy of this software and associated documentation files (the +# "Software"), to deal in the Software without restriction, including +# without limitation the rights to use, copy, modify, merge, publish, +# distribute, sublicense, and/or sell copies of the Software, and to +# permit persons to whom the Software is furnished to do so, subject to +# the following conditions: +# +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +variables: + # A known-good version of deb-build-snapshot + DEB_BUILD_SNAPSHOT_TAG: v0.20190828.0 + + # Name of the package with libjpeg.so.62 in. Set to libjpeg62 in + # Ubuntu or really old versions of Debian + LIBJPEG62: libjpeg62-turbo + +before_script: + - | + set -eux + apt-get -y update + apt-get install -y --no-install-recommends \ + autoconf \ + autoconf-archive \ + automake \ + bubblewrap \ + build-essential \ + ca-certificates \ + chrpath \ + debhelper \ + devscripts \ + dh-autoreconf \ + git \ + gtk-doc-tools \ + libelf-dev \ + libipc-run-perl \ + libglib2.0-dev \ + ${LIBJPEG62} \ + perl \ + python3-debian \ + rsync \ + xsltproc \ + zlib1g \ + ${NULL+} + +.build: + image: ${BUILD_IMAGE} + script: | + set -eux + + set -- --upstream --source + + mkdir -p "debian/tmp/artifacts/${CI_JOB_NAME}" + set -- "$@" --download "$(pwd)/debian/tmp/artifacts/${CI_JOB_NAME}" + + if [ -n "${CI_DISPOSABLE_ENVIRONMENT-}" ]; then + set -- "$@" --install --force-local-install + fi + + tempdir="$(mktemp -d)" + git clone --branch ${DEB_BUILD_SNAPSHOT_TAG} https://gitlab.collabora.com/smcv/deb-build-snapshot.git "$tempdir/deb-build-snapshot" + "$tempdir/deb-build-snapshot/deb-build-snapshot" "$@" localhost + rm -fr "$tempdir" + artifacts: + paths: + - debian/tmp/artifacts/${CI_JOB_NAME} + +build:stretch: + extends: .build + variables: + BUILD_IMAGE: 'debian:stretch' + +build:buster: + extends: .build + variables: + BUILD_IMAGE: 'debian:buster' + +build:bionic: + extends: .build + variables: + BUILD_IMAGE: 'ubuntu:bionic' + LIBJPEG62: 'libjpeg62'