Skip to contentSkip to conversation

gitlab-ci: Parametrize images used with CI_ variables

PATCH In review Arkadiusz Hiler 3 participants 8 messages Oct 24, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/4 gitlab-ci: Parametrize images used with CI_ variables

The container stage was already using CI_ variables, pushing to the right registry. Let's do that for the pulling containers too.

---
 .gitlab-ci.yml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
.gitlab-ci.yml +2 -2
index a90961b6..030b3405 100644
@@ -1,4 +1,4 @@
-image: registry.freedesktop.org/drm/igt-gpu-tools/igt-fedora:latest
+image: $CI_REGISTRY/$CI_PROJECT_PATH/igt-fedora:latest
 variables:
   MESON_OPTIONS: >
     -Dwith_libdrm=intel,nouveau,amdgpu
@@ -27,7 +27,7 @@ build:tests-fedora:
       - build
 
 build:tests-debian:
-  image: registry.freedesktop.org/drm/igt-gpu-tools/igt-debian:latest
+  image: $CI_REGISTRY/$CI_PROJECT_PATH/igt-debian:latest
   stage: build
   script:
     - meson $MESON_OPTIONS build
Signature · 6 lines
2.17.2

_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
#1 lore raw

PATCH 2/4 gitlab-ci: Compile using autotools

Let's make sure that IGT compiles with autotools.

---
 .gitlab-ci.yml    | 7 +++++++
 Dockerfile.debian | 8 ++++++++
 2 files changed, 15 insertions(+)
.gitlab-ci.yml +7 -0
index 030b3405..394cd86d 100644
@@ -33,6 +33,13 @@ build:tests-debian:
     - meson $MESON_OPTIONS build
     - ninja -C build
 
+build:tests-debian-autotools:
+  image: $CI_REGISTRY/$CI_PROJECT_PATH/igt-debian:latest
+  stage: build
+  script:
+    - ./autogen.sh --enable-{chamelium,audio,intel,amdgpu,nouveau,tests,runner}
+    - make -j
+
 ninja:test:
   stage: test
   script:
Dockerfile.debian +8 -0
index 1c70f015..104906c1 100644
@@ -33,3 +33,11 @@ RUN apt-get install -t stretch-backports -y \
 					meson \
 					libdrm-dev \
 					libdrm-intel1
+
+# autotools build deps
+RUN apt-get install -y \
+			autoconf \
+			automake \
+			xutils-dev \
+			libtool \
+			make
Signature · 6 lines
2.17.2

_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
#4 lore raw

PATCH 3/4 gitlab-ci: Compare test-list.txt(s) generated by meson and autotools

In reply to Arkadiusz Hiler

Let's make sure that we haven't missed any tests with any of the supported build systems.

---
 .gitlab-ci.yml | 35 +++++++++++++++++++++++++++++++----
 1 file changed, 31 insertions(+), 4 deletions(-)
.gitlab-ci.yml +31 -4
index 394cd86d..1814d8b6 100644
@@ -16,6 +16,8 @@ stages:
   - test
   - deploy
 
+#################### BUILD #########################
+
 build:tests-fedora:
   stage: build
   script:
@@ -26,12 +28,17 @@ build:tests-fedora:
     paths:
       - build
 
-build:tests-debian:
+build:tests-debian-meson:
   image: $CI_REGISTRY/$CI_PROJECT_PATH/igt-debian:latest
   stage: build
   script:
     - meson $MESON_OPTIONS build
     - ninja -C build
+    - cp build/tests/test-list.txt meson-test-list.txt
+  artifacts:
+    paths:
+      - meson-test-list.txt
+
 
 build:tests-debian-autotools:
   image: $CI_REGISTRY/$CI_PROJECT_PATH/igt-debian:latest
@@ -39,13 +46,31 @@ build:tests-debian-autotools:
   script:
     - ./autogen.sh --enable-{chamelium,audio,intel,amdgpu,nouveau,tests,runner}
     - make -j
+    - cp tests/test-list.txt autotools-test-list.txt
+  artifacts:
+    paths:
+      - autotools-test-list.txt
 
-ninja:test:
+#################### TEST ##########################
+
+test:ninja-test:
+  dependencies:
+    - build:tests-fedora
+  stage: test
+  script: ninja -C build test
+
+test:test-list-diff:
+  dependencies:
+    - build:tests-debian-autotools
+    - build:tests-debian-meson
   stage: test
-  script:
-    - ninja -C build test
+  script: diff <(sed "s/ /\n/g" meson-test-list.txt| sort) <(sed "s/ /\n/g" autotools-test-list.txt | sort) 
+
+################### DEPLOY #########################
 
 pages:
+  dependencies:
+    - build:tests-fedora
   stage: deploy
   script:
     - ninja -C build igt-gpu-tools-doc
@@ -56,6 +81,8 @@ pages:
   only:
     - master
 
+################# CONTAINERS #######################
+
 containers:igt-debian:
   stage: containers
   when: manual
Signature · 6 lines
2.17.2

_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
#5 lore raw

PATCH 4/4 gitlab-ci: Do meson build with oldest supported meson

In reply to Arkadiusz Hiler

Documentation building differs for meson < 0.47, so let's make sure that it works.

Also remove a comment that has slipped through.

---
 .gitlab-ci.yml    | 11 ++++++++++-
 Dockerfile.fedora |  8 ++++++++
 2 files changed, 18 insertions(+), 1 deletion(-)
.gitlab-ci.yml +10 -1
index 1814d8b6..bd1ddb79 100644
@@ -21,13 +21,22 @@ stages:
 build:tests-fedora:
   stage: build
   script:
-    # Feodora does not have peg packaged
     - meson $MESON_OPTIONS build
     - ninja -C build
   artifacts:
     paths:
       - build
 
+# documentation building is different with meson<0.47
+build:tests-fedora-oldest-meson:
+  stage: build
+  script:
+    - dnf remove -y meson
+    - pip3 install /usr/src/meson-*.tar.gz
+    - meson $MESON_OPTIONS build
+    - ninja -C build
+    - ninja -C build igt-gpu-tools-doc
+
 build:tests-debian-meson:
   image: $CI_REGISTRY/$CI_PROJECT_PATH/igt-debian:latest
   stage: build
Dockerfile.fedora +8 -0
index 341a0ed7..652a36c3 100644
@@ -10,6 +10,7 @@ RUN dnf install -y gcc \
 		kmod-devel \
 		glib2-devel \
 		cairo-devel \
+		ninja-build \
 		procps-devel \
 		pixman-devel \
 		json-c-devel \
@@ -34,3 +35,10 @@ RUN curl -O http://piumarta.com/software/peg/peg-0.1.18.tar.gz
 RUN tar xf peg-0.1.18.tar.gz
 RUN cd peg-0.1.18 && make PREFIX=/usr install
 RUN rm -fr /tmp/peg
+
+# Meson version switching shenanigans
+WORKDIR /usr/src
+RUN curl -O https://files.pythonhosted.org/packages/c0/98/bcbda7862f8ca18dbdaa57b9c51cf7333cdc59b48278ed279217cd6ad8ff/meson-0.44.0.tar.gz
+
+# Cleanup workdir
+WORKDIR /
Signature · 6 lines
2.17.2

_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
#2 lore raw

Re: [igt-dev] [PATCH i-g-t 2/4] gitlab-ci: Compile using autotools

In reply to Arkadiusz Hiler
Quoted 3 lines · Arkadiusz Hiler

Let's make sure that IGT compiles with autotools.

Should we also test autotools tests, and distcheck? That stuff tends to break, until someone needs to cut a release again :-)

Similar I guess for meson.

Just an aside, patch itself looks fine.
-Daniel

Quoted 42 lines
---
 .gitlab-ci.yml    | 7 +++++++
 Dockerfile.debian | 8 ++++++++
 2 files changed, 15 insertions(+)
.gitlab-ci.yml +7 -0
index 030b3405..394cd86d 100644
@@ -33,6 +33,13 @@ build:tests-debian:
     - meson $MESON_OPTIONS build
     - ninja -C build
 
+build:tests-debian-autotools:
+  image: $CI_REGISTRY/$CI_PROJECT_PATH/igt-debian:latest
+  stage: build
+  script:
+    - ./autogen.sh --enable-{chamelium,audio,intel,amdgpu,nouveau,tests,runner}
+    - make -j
+
 ninja:test:
   stage: test
   script:
Dockerfile.debian +8 -0
index 1c70f015..104906c1 100644
@@ -33,3 +33,11 @@ RUN apt-get install -t stretch-backports -y \
 					meson \
 					libdrm-dev \
 					libdrm-intel1
+
+# autotools build deps
+RUN apt-get install -y \
+			autoconf \
+			automake \
+			xutils-dev \
+			libtool \
+			make
Signature · 1 line
2.17.2
Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
Reviewed-by on v1 4/4
#6 lore raw

Re: [igt-dev] [PATCH i-g-t 4/4] gitlab-ci: Do meson build with oldest supported meson

In reply to Arkadiusz Hiler
Quoted 6 lines · Arkadiusz Hiler

Documentation building differs for meson < 0.47, so let's make sure that it works.

Also remove a comment that has slipped through.

On the series:

Quoted 59 lines
---
 .gitlab-ci.yml    | 11 ++++++++++-
 Dockerfile.fedora |  8 ++++++++
 2 files changed, 18 insertions(+), 1 deletion(-)
.gitlab-ci.yml +10 -1
index 1814d8b6..bd1ddb79 100644
@@ -21,13 +21,22 @@ stages:
 build:tests-fedora:
   stage: build
   script:
-    # Feodora does not have peg packaged
     - meson $MESON_OPTIONS build
     - ninja -C build
   artifacts:
     paths:
       - build
 
+# documentation building is different with meson<0.47
+build:tests-fedora-oldest-meson:
+  stage: build
+  script:
+    - dnf remove -y meson
+    - pip3 install /usr/src/meson-*.tar.gz
+    - meson $MESON_OPTIONS build
+    - ninja -C build
+    - ninja -C build igt-gpu-tools-doc
+
 build:tests-debian-meson:
   image: $CI_REGISTRY/$CI_PROJECT_PATH/igt-debian:latest
   stage: build
Dockerfile.fedora +8 -0
index 341a0ed7..652a36c3 100644
@@ -10,6 +10,7 @@ RUN dnf install -y gcc \
 		kmod-devel \
 		glib2-devel \
 		cairo-devel \
+		ninja-build \
 		procps-devel \
 		pixman-devel \
 		json-c-devel \
@@ -34,3 +35,10 @@ RUN curl -O http://piumarta.com/software/peg/peg-0.1.18.tar.gz
 RUN tar xf peg-0.1.18.tar.gz
 RUN cd peg-0.1.18 && make PREFIX=/usr install
 RUN rm -fr /tmp/peg
+
+# Meson version switching shenanigans
+WORKDIR /usr/src
+RUN curl -O https://files.pythonhosted.org/packages/c0/98/bcbda7862f8ca18dbdaa57b9c51cf7333cdc59b48278ed279217cd6ad8ff/meson-0.44.0.tar.gz
+
+# Cleanup workdir
+WORKDIR /
Signature · 1 line
2.17.2
Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
#3 lore raw

Re: [igt-dev] [PATCH i-g-t 2/4] gitlab-ci: Compile using autotools

In reply to Daniel Vetter
Quoted 5 lines · Daniel Vetter
Quoted 3 lines · Arkadiusz Hiler

Let's make sure that IGT compiles with autotools.

Quoted 7 lines

Should we also test autotools tests, and distcheck? That stuff tends to break, until someone needs to cut a release again :-)

Similar I guess for meson.

Just an aside, patch itself looks fine.
-Daniel

I did the release only once so far, so Petri should be the one to elaborate, but IIRC we use some .sh script that creates distributable just using meson. The autotools way of releasing is not intended to be ever used again.

If that's the case we can get rid of make dist/distcheck.

And yep, we can add testing for the "meson way" of building release packages.

Signature · 6 lines
Cheers,
Arek
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
#7 lore raw

[igt-dev] ✗ Fi.CI.BAT: failure for series starting with [i-g-t,1/4] gitlab-ci: Parametrize images used with CI_ variables

In reply to Arkadiusz Hiler
== Series Details ==

== Series Details ==

Series: series starting with [i-g-t,1/4] gitlab-ci: Parametrize images used with CI_ variables
URL : https://patchwork.freedesktop.org/series/51451/
State : failure

== Summary ==

Applying: gitlab-ci: Parametrize images used with CI_ variables Using index info to reconstruct a base tree...
M .gitlab-ci.yml
Falling back to patching base and 3-way merge...
Auto-merging .gitlab-ci.yml
CONFLICT (content): Merge conflict in .gitlab-ci.yml
Patch failed at 0001 gitlab-ci: Parametrize images used with CI_ variables Use 'git am --show-current-patch' to see the failed patch
When you have resolved this problem, run "git am --continue". If you prefer to skip this patch, run "git am --skip" instead. To restore the original branch and stop patching, run "git am --abort".

_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev