summaryrefslogtreecommitdiff
path: root/.gitlab-ci.yml
diff options
context:
space:
mode:
Diffstat (limited to '.gitlab-ci.yml')
-rw-r--r--.gitlab-ci.yml257
1 files changed, 32 insertions, 225 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 71cb9eb..2ec72c7 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,7 +1,7 @@
stages:
- - prebuild
- containers
- builds
+ - sanity_checks
.multilib: &multilib |
dpkg_architecture=$(which dpkg-architecture 2>/dev/null || true)
@@ -31,81 +31,8 @@ stages:
export VIRT_PREFIX="$VIRT_PREFIX/$ABI/sys-root/mingw"
export PKG_CONFIG_PATH="$VIRT_PREFIX/lib/pkgconfig"
-.container_job_template: &container_job_definition
- image: docker:stable
- stage: containers
- services:
- - name: registry.gitlab.com/libvirt/libvirt-ci/docker-dind:master
- alias: docker
- before_script:
- - export TAG="$CI_REGISTRY_IMAGE/ci-$NAME:latest"
- - export COMMON_TAG="$CI_REGISTRY/libosinfo/libosinfo/ci-$NAME:latest"
- - docker info
- - docker login registry.gitlab.com -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD"
- script:
- - docker pull "$TAG" || docker pull "$COMMON_TAG" || true
- - docker build --cache-from "$TAG" --cache-from "$COMMON_TAG" --tag "$TAG" -f "ci/containers/ci-$NAME.Dockerfile" ci
- - docker push "$TAG"
- after_script:
- - docker logout
-
-.osinfo-db-tools-build: &osinfo-db-tools-build |
- pushd /tmp/
- git clone https://gitlab.com/libosinfo/osinfo-db-tools.git
- cd osinfo-db-tools
- mkdir build
- cd build
- meson .. . --prefix=$VIRT_PREFIX --werror
- $NINJA install
- popd
-
-.osinfo-db-build: &osinfo-db-build |
- pushd /tmp/
- git clone https://gitlab.com/libosinfo/osinfo-db.git
- cd osinfo-db
- mkdir build
- cd build
- $MAKE -f ../Makefile VPATH=..
- $MAKE -f ../Makefile VPATH=.. check
- $MAKE -f ../Makefile VPATH=.. install OSINFO_DB_TARGET="--system"
- popd
-
-.libosinfo-build: &libosinfo-build |
- pushd .
- mkdir build
- cd build
- meson .. . --prefix=$VIRT_PREFIX --werror
- $NINJA
- $NINJA install
- popd
-
-.libosinfo-check: &libosinfo-check |
- pushd .
- cd build
- $NINJA test
- popd
-
-.libosinfo-rpm: &libosinfo-rpm |
- pushd .
- cd build
- $NINJA dist
- if test -x /usr/bin/rpmbuild && test "$RPM" != "skip"; then
- rpmbuild --nodeps -ta meson-dist/*.tar.xz
- fi
- popd
-
-.libosinfo-mingw-build: &libosinfo-mingw-build |
- pushd .
- mkdir build
- cd build
- meson .. . $MESON_OPTS --prefix=$VIRT_PREFIX -Denable-gtk-doc=false -Denable-tests=false -Denable-introspection=disabled -Denable-vala=disabled --werror
- $NINJA
- $NINJA install
- popd
-
-.native-build-job: &native-build-job
- stage: builds
- image: $CI_REGISTRY_IMAGE/ci-$NAME:latest
+.native_build_job:
+ extends: .gitlab_native_build_job
cache:
paths:
- ccache
@@ -113,15 +40,29 @@ stages:
script:
- *multilib
- *native-environment
- - *osinfo-db-tools-build
- - *osinfo-db-build
- - *libosinfo-build
- - *libosinfo-check
- - *libosinfo-rpm
-
-.mingw-build-job: &mingw-build-job
- stage: builds
- image: $CI_REGISTRY_IMAGE/ci-$NAME:latest
+ - pushd /tmp/
+ - git clone https://gitlab.com/libosinfo/osinfo-db.git
+ - cd osinfo-db
+ - mkdir build
+ - cd build
+ - $MAKE -f ../Makefile VPATH=..
+ - $MAKE -f ../Makefile VPATH=.. check
+ - $MAKE -f ../Makefile VPATH=.. install OSINFO_DB_TARGET="--system"
+ - popd
+ - mkdir build
+ - cd build
+ - meson .. . --prefix=$VIRT_PREFIX --werror
+ - $NINJA
+ - $NINJA install
+ - $NINJA test
+ - $NINJA dist
+ - if test -x /usr/bin/rpmbuild && test "$RPM" != "skip";
+ then
+ rpmbuild --nodeps -ta meson-dist/*.tar.xz;
+ fi
+
+.cross_build_job:
+ extends: .gitlab_cross_build_job
cache:
paths:
- ccache
@@ -129,145 +70,11 @@ stages:
script:
- *multilib
- *native-environment
- - *osinfo-db-build
- *mingw-environment
- - *libosinfo-mingw-build
-
-# Check that all commits are signed-off for the DCO.
-# Skip on "libosinfo" namespace, since we only need to run
-# this test on developer's personal forks from which
-# merge requests are submitted
-check-dco:
- stage: prebuild
- image: registry.gitlab.com/libvirt/libvirt-ci/check-dco:master
- script:
- - /check-dco libosinfo
- except:
- variables:
- - $CI_PROJECT_NAMESPACE == "libosinfo"
-
-
-centos-8-container:
- <<: *container_job_definition
- variables:
- NAME: centos-8
-
-centos-stream-container:
- <<: *container_job_definition
- variables:
- NAME: centos-stream
-
-debian-10-container:
- <<: *container_job_definition
- variables:
- NAME: debian-10
-
-debian-sid-container:
- <<: *container_job_definition
- variables:
- NAME: debian-sid
-
-fedora-32-container:
- <<: *container_job_definition
- variables:
- NAME: fedora-32
-
-fedora-33-container:
- <<: *container_job_definition
- variables:
- NAME: fedora-33
-
-fedora-rawhide-container:
- <<: *container_job_definition
- variables:
- NAME: fedora-rawhide
-
-fedora-rawhide-cross-mingw32-container:
- <<: *container_job_definition
- variables:
- NAME: fedora-rawhide-cross-mingw32
-
-fedora-rawhide-cross-mingw64-container:
- <<: *container_job_definition
- variables:
- NAME: fedora-rawhide-cross-mingw64
-
-opensuse-151-container:
- <<: *container_job_definition
- variables:
- NAME: opensuse-151
-
-ubuntu-1804-container:
- <<: *container_job_definition
- variables:
- NAME: ubuntu-1804
-
-ubuntu-2004-container:
- <<: *container_job_definition
- variables:
- NAME: ubuntu-2004
-
-
-centos-8:
- <<: *native-build-job
- variables:
- NAME: centos-8
- RPM: skip
-
-centos-stream:
- <<: *native-build-job
- variables:
- NAME: centos-stream
- RPM: skip
-
-debian-10:
- <<: *native-build-job
- variables:
- NAME: debian-10
-
-debian-sid:
- <<: *native-build-job
- variables:
- NAME: debian-sid
-
-fedora-32:
- <<: *native-build-job
- variables:
- NAME: fedora-32
-
-fedora-33:
- <<: *native-build-job
- variables:
- NAME: fedora-33
-
-fedora-rawhide:
- <<: *native-build-job
- variables:
- NAME: fedora-rawhide
-
-fedora-rawhide-cross-mingw32:
- <<: *mingw-build-job
- variables:
- NAME: fedora-rawhide-cross-mingw32
-
-fedora-rawhide-cross-mingw64:
- <<: *mingw-build-job
- variables:
- NAME: fedora-rawhide-cross-mingw32
-
-opensuse-151:
- <<: *native-build-job
- variables:
- NAME: opensuse-151
- RPM: skip
-
-ubuntu-1804:
- script:
- <<: *native-build-job
- variables:
- NAME: ubuntu-1804
+ - mkdir build
+ - cd build
+ - meson .. . $MESON_OPTS --prefix=$VIRT_PREFIX -Denable-gtk-doc=false -Denable-tests=false -Denable-introspection=disabled -Denable-vala=disabled --werror
+ - $NINJA
+ - $NINJA install
-ubuntu-2004:
- <<: *native-build-job
- variables:
- NAME: ubuntu-2004
+include: '/ci/gitlab.yml'