[gimp] gitlab-ci: add a new "packaging" stage.



commit 076e4d687b174891a4216624898227baa6689624
Author: Jehan <jehan girinstud io>
Date:   Fri May 21 19:34:00 2021 +0200

    gitlab-ci: add a new "packaging" stage.
    
    Unlike what I said in my previous commit, it still just takes too long
    to build the installer, whether I move some of the substeps around or
    whether I increase the max duration. So rather than increasing max
    duration a lot more, let's just add an intermediate stage.

 .gitlab-ci.yml | 70 ++++++++++++++++++++++++++++++++++++++++++++++++----------
 1 file changed, 58 insertions(+), 12 deletions(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 23cef9de98..f9cf811283 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -29,8 +29,9 @@ stages:
   - prepare
   - dependencies
   - gimp
-  - analysis
+  - packaging
   - distribution
+  - analysis
 
 variables:
   GIT_DEPTH: "1"
@@ -279,21 +280,44 @@ gimp-win64-native:
   script:
     - C:\msys64\usr\bin\pacman --noconfirm -Syyuu
     - C:\msys64\usr\bin\bash -lc "bash -x ./build/windows/gitlab-ci/build-gimp-msys2.sh"
-    - C:\msys64\usr\bin\bash -lc "bash -x ./build/windows/gitlab-ci/package-gimp-msys2.sh"
-    - cd _install-w64
-    - C:\msys64\usr\bin\bash -lc "bash -x ../build/windows/gitlab-ci/split-debug-msys2.sh"
   artifacts:
     name: "${CI_JOB_NAME}-${CI_COMMIT_REF_SLUG}"
     when: always
     expire_in: 1 day
     paths:
-    - gimp-w64
+    - _install-w64
     - build/windows/installer/lang/
   cache:
     paths:
     - _ccache/
   needs: ["deps-win64-native"]
 
+packaging-win64-native:
+  rules:
+    # On releases.
+    - if: '$CI_COMMIT_TAG != null'
+    # Custom builds though web GUI, API or schedules.
+    - if: '$GIMP_CI_WIN_INSTALLER != null'
+  stage: packaging
+  variables:
+    MSYSTEM: "MINGW64"
+    CHERE_INVOKING: "yes"
+  tags:
+    - win32-ps
+  script:
+    - C:\msys64\usr\bin\pacman --noconfirm -Syyuu
+    - C:\msys64\usr\bin\bash -lc "bash -x ./build/windows/gitlab-ci/package-gimp-msys2.sh"
+    - cd gimp-w64
+    - C:\msys64\usr\bin\bash -lc "bash -x ../build/windows/gitlab-ci/split-debug-msys2.sh"
+  artifacts:
+    name: "${CI_JOB_NAME}-${CI_COMMIT_REF_SLUG}"
+    when: always
+    expire_in: 1 day
+    paths:
+    - gimp-w64
+    - build/windows/installer/lang/
+  needs: ["gimp-win64-native"]
+
 ## WINDOWS 32-bit CI (native MSYS2) ##
 
 deps-win32-native:
@@ -336,20 +360,42 @@ gimp-win32-native:
   script:
     - C:\msys64\usr\bin\pacman --noconfirm -Syyuu
     - C:\msys64\usr\bin\bash -lc "bash -x ./build/windows/gitlab-ci/build-gimp-msys2.sh"
-    - C:\msys64\usr\bin\bash -lc "bash -x ./build/windows/gitlab-ci/package-gimp-msys2.sh"
-    - cd _install-w32
-    - C:\msys64\usr\bin\bash -lc "bash -x ../build/windows/gitlab-ci/split-debug-msys2.sh"
   artifacts:
     name: "${CI_JOB_NAME}-${CI_COMMIT_REF_SLUG}"
     when: always
     expire_in: 1 day
     paths:
-    - gimp-w32
+    - _install-w32
   cache:
     paths:
     - _ccache/
   needs: ["deps-win32-native"]
 
+packaging-win32-native:
+  rules:
+    # On releases.
+    - if: '$CI_COMMIT_TAG != null'
+    # Custom builds though web GUI, API or schedules.
+    - if: '$GIMP_CI_WIN_INSTALLER != null'
+  stage: packaging
+  variables:
+    MSYSTEM: "MINGW32"
+    CHERE_INVOKING: "yes"
+  tags:
+    - win32-ps
+  script:
+    - C:\msys64\usr\bin\pacman --noconfirm -Syyuu
+    - C:\msys64\usr\bin\bash -lc "bash -x ./build/windows/gitlab-ci/package-gimp-msys2.sh"
+    - cd gimp-w32
+    - C:\msys64\usr\bin\bash -lc "bash -x ../build/windows/gitlab-ci/split-debug-msys2.sh"
+  artifacts:
+    name: "${CI_JOB_NAME}-${CI_COMMIT_REF_SLUG}"
+    when: always
+    expire_in: 1 day
+    paths:
+    - gimp-w32
+  needs: ["gimp-win32-native"]
+
 ## WINDOWS 64-bit CI (cross-build crossroad) ##
 
 deps-win64:
@@ -528,8 +574,8 @@ win-installer-nightly:
     - win32-ps
   stage: distribution
   dependencies:
-    - gimp-win64-native
-    - gimp-win32-native
+    - packaging-win64-native
+    - packaging-win32-native
   artifacts:
     name: "${CI_JOB_NAME}-${CI_COMMIT_REF_SLUG}"
     when: always
@@ -539,7 +585,7 @@ win-installer-nightly:
   script:
     - C:\msys64\usr\bin\pacman --noconfirm -Syyuu
     - C:\msys64\usr\bin\bash -lc "bash -x ./build/windows/gitlab-ci/installer-gimp-msys2.sh"
-  needs: ["gimp-win32-native", "gimp-win64-native"]
+  needs: ["packaging-win32-native", "packaging-win64-native"]
 
 sources:
   rules:


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]