diff options
author | Christoph Reiter <reiter.christoph@gmail.com> | 2019-11-14 18:24:14 +0100 |
---|---|---|
committer | Christoph Reiter <reiter.christoph@gmail.com> | 2019-11-14 18:31:07 +0100 |
commit | fde50458dd9e7ea209d486ae315799eb9dc4ec36 (patch) | |
tree | 3305bb1ae396fd08d756b17c8afde04a9b95abf3 | |
parent | 441926c7d5da515c865a3bc4a3d1d996a6b64b67 (diff) | |
download | gobject-introspection-fde50458dd9e7ea209d486ae315799eb9dc4ec36.tar.gz |
CI: add a job that builds glib as a subproject
In our case we have to do various special things in case glib isn't available
through pkg-config and not all tests are run.
Add a CI job that tests this case so we don't regress.
-rw-r--r-- | .gitlab-ci.yml | 20 | ||||
-rw-r--r-- | .gitlab-ci/minimal.Dockerfile | 27 | ||||
-rwxr-xr-x | .gitlab-ci/run-docker-minimal.sh | 11 |
3 files changed, 58 insertions, 0 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 9e62b41a..16a8f3bb 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -35,6 +35,26 @@ fedora-x86_64-meson: - "${CI_PROJECT_DIR}/_build/meson-logs" - public +fedora-x86_64-subprojects: + image: registry.gitlab.gnome.org/gnome/gobject-introspection:min-v1 + stage: build + variables: + CCACHE_BASEDIR: "${CI_PROJECT_DIR}" + CCACHE_DIR: "${CI_PROJECT_DIR}/_ccache" + script: + - meson _build . + - cd _build + - ninja + - meson test --print-errorlogs --suite=gobject-introspection + except: + - tags + artifacts: + when: always + name: "gi-_${CI_COMMIT_REF_NAME}" + paths: + - "${CI_PROJECT_DIR}/_build/meson-logs" + - public + fedora-x86_64-python3.5: stage: build variables: diff --git a/.gitlab-ci/minimal.Dockerfile b/.gitlab-ci/minimal.Dockerfile new file mode 100644 index 00000000..b33aa64b --- /dev/null +++ b/.gitlab-ci/minimal.Dockerfile @@ -0,0 +1,27 @@ +FROM fedora:29 + +RUN dnf -y install \ + flex \ + bison \ + gcc \ + gcc-c++ \ + git \ + ninja-build \ + pkgconf \ + python3 \ + python3-devel \ + python3-pip \ + python3-wheel \ + libmount-devel \ + && dnf clean all + +RUN pip3 install meson==0.52.0 + +ARG HOST_USER_ID=5555 +ENV HOST_USER_ID ${HOST_USER_ID} +RUN useradd -u $HOST_USER_ID -ms /bin/bash user + +USER user +WORKDIR /home/user + +ENV LANG C.UTF-8 diff --git a/.gitlab-ci/run-docker-minimal.sh b/.gitlab-ci/run-docker-minimal.sh new file mode 100755 index 00000000..36b2d376 --- /dev/null +++ b/.gitlab-ci/run-docker-minimal.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +set -e + +TAG="registry.gitlab.gnome.org/gnome/gobject-introspection:min-v1" + +sudo docker build --build-arg HOST_USER_ID="$UID" --tag "${TAG}" \ + --file "minimal.Dockerfile" . +sudo docker run --rm \ + --volume "$(pwd)/..:/home/user/app" --workdir "/home/user/app" \ + --tty --interactive "${TAG}" bash |