gitlab-ci: Consolidate configuraiton into hierarchy of extensible configs
authorJan Vesely <jano.vesely@gmail.com>
Sun, 5 May 2019 02:10:19 +0000 (22:10 -0400)
committerØyvind Kolås <pippin@gimp.org>
Sat, 25 May 2019 16:26:56 +0000 (18:26 +0200)
Signed-off-by: Jan Vesely <jano.vesely@gmail.com>
.gitlab-ci.yml

index ac1a60465d11527936dc42b1c4a78dfb0a0372b1..bca1a798f2af3a7b09e86da557ff2d6bc983c63e 100644 (file)
@@ -1,47 +1,51 @@
-.artifacts-meson: &artifacts-meson
-  when: always
-  paths:
-   - _build/meson-logs
-
-.artifacts-autotools: &artifacts-autotools
-  when: always
-  paths:
-    - _build/*.log
-    - _build/*/*.log
-    - _build/*/*/*.log
+.build:
+  stage: build
+  image: archlinux/base:latest
 
-.meson-build: &meson-build
-  - meson _build
-      -D enable-f16c=true
-      -D enable-mmx=true
-      -D enable-sse=true
-      -D enable-sse2=true
-      -D enable-sse3=true
-      -D enable-sse4_1=true
-      -D with-docs=true
-      ${LCMS_OPTION}
-  - ninja -C _build
-  - ninja -C _build test
+.meson-build:
+  extends: .build
+  artifacts:
+    when: always
+    paths:
+      - _build/meson-logs
+  script:
+    - meson _build
+        -D enable-f16c=true
+        -D enable-mmx=true
+        -D enable-sse=true
+        -D enable-sse2=true
+        -D enable-sse3=true
+        -D enable-sse4_1=true
+        -D with-docs=true
+        ${LCMS_OPTION}
+    - ninja -C _build
+    - ninja -C _build test
 
-.autotools-build: &autotools-build
-  - mkdir _build
-  - cd _build
-  - ../autogen.sh
-      --enable-docs
-      --enable-f16c
-      --enable-mmx
-      --enable-sse
-      --enable-sse2
-      --enable-sse3
-      --enable-sse4_1
-      ${LCMS_OPTION}
-  - make
-  - make check
+.autotools-build:
+  extends: .build
+  artifacts:
+    when: always
+    paths:
+      - _build/*.log
+      - _build/*/*.log
+      - _build/*/*/*.log
+  script:
+    - mkdir _build
+    - cd _build
+    - ../autogen.sh
+        --enable-docs
+        --enable-f16c
+        --enable-mmx
+        --enable-sse
+        --enable-sse2
+        --enable-sse3
+        --enable-sse4_1
+        ${LCMS_OPTION}
+    - make
+    - make check
 
 latest-meson-lcms:
-  stage: build
-  image: archlinux/base:latest
-  artifacts: *artifacts-meson
+  extends: .meson-build
   variables:
     LCMS_OPTION : "-Dwith-lcms=true"
   before_script:
@@ -50,12 +54,9 @@ latest-meson-lcms:
         meson
         lcms2
         git
-  script: *meson-build
 
 latest-meson-nolcms:
-  stage: build
-  image: archlinux/base:latest
-  artifacts: *artifacts-meson
+  extends: .meson-build
   variables:
     LCMS_OPTION : "-Dwith-lcms=false"
   before_script:
@@ -64,12 +65,9 @@ latest-meson-nolcms:
         meson
         lcms2
         git
-  script: *meson-build
 
 latest-autotools-lcms:
-  stage: build
-  image: archlinux/base:latest
-  artifacts: *artifacts-autotools
+  extends: .autotools-build
   variables:
     LCMS_OPTION : "--with-lcms"
   before_script:
@@ -77,16 +75,12 @@ latest-autotools-lcms:
         base-devel
         lcms2
         git
-  script: *autotools-build
 
 latest-autotools-nolcms:
-  stage: build
-  image: archlinux/base:latest
-  artifacts: *artifacts-autotools
+  extends: .autotools-build
   variables:
     LCMS_OPTION : "--without-lcms"
   before_script:
     - pacman -Syu --noconfirm --needed
         base-devel
         git
-  script: *autotools-build