diff options
author | Christoph Reiter <reiter.christoph@gmail.com> | 2020-05-19 09:04:12 +0200 |
---|---|---|
committer | Christoph Reiter <reiter.christoph@gmail.com> | 2020-05-19 19:18:55 +0200 |
commit | a0b335a8b22247ef389a59d2c87d1ff09961e481 (patch) | |
tree | 2dcaf8d6f5de5f2c46a02ff82e0f936aafee26e0 | |
parent | a943f572dd2de0ed8ca438702ad2ba8ef80d7934 (diff) | |
download | gobject-introspection-a0b335a8b22247ef389a59d2c87d1ff09961e481.tar.gz |
CI: add two jobs building a project using g-i with meson and autotools
This tests that after installing the g-i tools a simple project using
them can be build with meson and autotools.
Fixes #341
-rw-r--r-- | .gitlab-ci.yml | 30 | ||||
-rw-r--r-- | .gitlab-ci/Dockerfile | 2 | ||||
-rwxr-xr-x | .gitlab-ci/run-docker.sh | 2 |
3 files changed, 32 insertions, 2 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 0cb71530..18e49f5a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -2,12 +2,40 @@ stages: - build - deploy -image: registry.gitlab.gnome.org/gnome/gobject-introspection:v6 +image: registry.gitlab.gnome.org/gnome/gobject-introspection:v7 cache: paths: - _ccache/ +example-meson: + stage: build + script: + - python3 -m pip install --user mako markdown + - meson --prefix /usr --libdir /usr/lib64 --buildtype debug -Ddoctool=enabled -Dgtk_doc=true -Dcairo=enabled -Dpython=python3 _build . + - ninja -C _build + - sudo ninja -C _build install + - g-ir-scanner --version + - cd examples/library + - meson --prefix /usr --default-library both _build + - ninja -C _build + - sudo ninja -C _build install + - g-ir-inspect --print-typelibs --print-shlibs GISample + +example-autotools: + stage: build + script: + - python3 -m pip install --user mako markdown + - meson --prefix /usr --libdir /usr/lib64 --buildtype debug -Ddoctool=enabled -Dgtk_doc=true -Dcairo=enabled -Dpython=python3 _build . + - ninja -C _build + - sudo ninja -C _build install + - g-ir-scanner --version + - cd examples/library + - ./autogen.sh --prefix /usr + - make -j + - sudo make install + - g-ir-inspect --print-typelibs --print-shlibs GISample + fedora-x86_64-meson: stage: build variables: diff --git a/.gitlab-ci/Dockerfile b/.gitlab-ci/Dockerfile index 0dec6700..3a579cf8 100644 --- a/.gitlab-ci/Dockerfile +++ b/.gitlab-ci/Dockerfile @@ -43,6 +43,7 @@ RUN dnf -y install \ python3-wheel \ readline-devel \ redhat-rpm-config \ + sudo \ sqlite-devel \ systemtap-sdt-devel \ zlib-devel \ @@ -53,6 +54,7 @@ RUN pip3 install meson==0.50.1 ARG HOST_USER_ID=5555 ENV HOST_USER_ID ${HOST_USER_ID} RUN useradd -u $HOST_USER_ID -ms /bin/bash user +RUN echo 'user ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers USER user WORKDIR /home/user diff --git a/.gitlab-ci/run-docker.sh b/.gitlab-ci/run-docker.sh index 5d29002c..8e6a04ab 100755 --- a/.gitlab-ci/run-docker.sh +++ b/.gitlab-ci/run-docker.sh @@ -2,7 +2,7 @@ set -e -TAG="registry.gitlab.gnome.org/gnome/gobject-introspection:v6" +TAG="registry.gitlab.gnome.org/gnome/gobject-introspection:v7" sudo docker build --build-arg HOST_USER_ID="$UID" --tag "${TAG}" \ --file "Dockerfile" . |