[gimp] gitlab-ci: name the distribution artifacts and small build-deps.sh fix.



commit 6f4155ee347fdcfbcd9b8e9820190d98216737e8
Author: Jehan <jehan girinstud io>
Date:   Sat Oct 3 18:04:27 2020 +0200

    gitlab-ci: name the distribution artifacts and small build-deps.sh fix.
    
    This should give a nice name to distribution archives so that they are
    not all called `artifacts.zip`. Names will better describe their
    contents (target OS or source and short commit hash, because for CI
    builds, it's important to know which commit is being tested).
    
    Also replace CI_COMMIT_REF_NAME in other artifact names by
    CI_COMMIT_REF_SLUG. Otherwise if a branch has a slash (quite common in
    branch names), only the part after the last slash is used for archive
    naming.
    
    Finally immediately exits from dependency build with error code (!= 0)
    if `crossroad install` command failed.

 .gitlab-ci.yml                                   | 15 +++++++++------
 build/windows/crossbuild-gitlab-ci/build-deps.sh |  6 +++++-
 2 files changed, 14 insertions(+), 7 deletions(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index a6bcc9463a..b43206b137 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -117,7 +117,7 @@ deps-debian:
   artifacts:
     expire_in: 1 days
     when: always
-    name: "app-build-${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}"
+    name: "app-build-${CI_JOB_NAME}-${CI_COMMIT_REF_SLUG}"
     paths:
     - _build
     #- "${INSTALL_DIR}"
@@ -213,7 +213,7 @@ deps-win64:
     - export PATH="`pwd`/.local/bin:$PATH"
     - crossroad w64 gimp --run="build/windows/crossbuild-gitlab-ci/build-deps.sh"
   artifacts:
-    name: "${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}"
+    name: "${CI_JOB_NAME}-${CI_COMMIT_REF_SLUG}"
     when: always
     expire_in: 2 hours
     paths:
@@ -245,7 +245,7 @@ gimp-win64:
       crossroad w64 gimp --run="-"
   needs: ["deps-win64"]
   artifacts:
-    name: "${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}"
+    name: "${CI_JOB_NAME}-${CI_COMMIT_REF_SLUG}"
     when: always
     expire_in: 1 day
     paths:
@@ -274,7 +274,7 @@ deps-win32:
     - export PATH="`pwd`/.local/bin:$PATH"
     - crossroad w32 gimp --run="build/windows/crossbuild-gitlab-ci/build-deps.sh"
   artifacts:
-    name: "${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}"
+    name: "${CI_JOB_NAME}-${CI_COMMIT_REF_SLUG}"
     when: always
     expire_in: 2 hours
     paths:
@@ -306,7 +306,7 @@ gimp-win32:
       crossroad w32 gimp --run="-"
   needs: ["deps-win32"]
   artifacts:
-    name: "${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}"
+    name: "${CI_JOB_NAME}-${CI_COMMIT_REF_SLUG}"
     when: always
     expire_in: 1 day
     paths:
@@ -324,7 +324,7 @@ cppcheck:
     - mkdir report
     - cppcheck-htmlreport --source-dir=. --title=gimp --file=cppcheck.xml --report-dir=report
   artifacts:
-    name: "${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}"
+    name: "${CI_JOB_NAME}-${CI_COMMIT_REF_SLUG}"
     expire_in: 1 week
     when: always
     paths:
@@ -338,6 +338,7 @@ sources:
   dependencies:
     - gimp-distcheck-debian
   artifacts:
+    name: "GIMP-sources-${CI_COMMIT_SHORT_SHA}"
     when: always
     paths:
     - gimp-*.tar.*
@@ -355,6 +356,7 @@ win64-nightly:
     GIMP_PREFIX: "gimp-prefix"
     GIMP_DISTRIB: "gimp-w64"
   artifacts:
+    name: "GIMP-Win64-CI-${CI_COMMIT_SHORT_SHA}"
     when: always
     paths:
     - gimp-w64
@@ -430,6 +432,7 @@ win32-nightly:
     GIMP_DISTRIB: "gimp-w32"
     XDG_DATA_HOME:  "$CI_PROJECT_DIR/.local/share/"
   artifacts:
+    name: "GIMP-Win32-${CI_COMMIT_SHORT_SHA}"
     when: always
     paths:
     - gimp-w32
diff --git a/build/windows/crossbuild-gitlab-ci/build-deps.sh 
b/build/windows/crossbuild-gitlab-ci/build-deps.sh
index 8364f287cc..5648e95b5f 100644
--- a/build/windows/crossbuild-gitlab-ci/build-deps.sh
+++ b/build/windows/crossbuild-gitlab-ci/build-deps.sh
@@ -43,6 +43,11 @@ crossroad install appstream-glib              \
                   poppler poppler-data        \
                   xpm-nox
 
+if [ $? -ne 0 ]; then
+  echo "Installation of pre-built dependencies failed.";
+  exit 1;
+fi
+
 if [ "x$CROSSROAD_PLATFORM" = "xw64" ]; then
     # Generate the loaders.cache file for GUI image support.
     # Note: this is mostly for distribution so I initially wanted to
@@ -53,5 +58,4 @@ if [ "x$CROSSROAD_PLATFORM" = "xw64" ]; then
     wine ${CROSSROAD_PREFIX}/bin/gdk-pixbuf-query-loaders.exe 
${CROSSROAD_PREFIX}/lib/gdk-pixbuf-2.0/2.10.0/loaders/*.dll > 
${CROSSROAD_PREFIX}/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache
     sed -i "s&$CROSSROAD_PREFIX/&&" ${CROSSROAD_PREFIX}/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache
     sed -i '/.dll\"/s*/*\\\\*g' ${CROSSROAD_PREFIX}/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache
-    echo CROSSROAD PREFIX IS: $CROSSROAD_PREFIX
 fi


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