[vlc-commits] CI: Introduced nightly jobs

Konstantin Pavlov git at videolan.org
Sun Apr 5 20:54:56 CEST 2020


vlc/vlc-3.0 | branch: master | Konstantin Pavlov <thresh at videolan.org> | Tue Jan 14 00:42:51 2020 +0300| [868f80ef88deec08cbf46aa7aca62ff3751ea5e4] | committer: Konstantin Pavlov

CI: Introduced nightly jobs

(cherry picked from commit 99d1eb9c97ae90cf0a71c62b21c11d2f6185915d)

> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=868f80ef88deec08cbf46aa7aca62ff3751ea5e4
---

 extras/ci/gitlab-ci.yml | 89 +++++++++++++++++++++++++++++++++++++++++++++----
 1 file changed, 83 insertions(+), 6 deletions(-)

diff --git a/extras/ci/gitlab-ci.yml b/extras/ci/gitlab-ci.yml
index 80a3a9a7af..44402c89a4 100644
--- a/extras/ci/gitlab-ci.yml
+++ b/extras/ci/gitlab-ci.yml
@@ -5,7 +5,7 @@ default:
     before_script:
         - set -x
         - export VLC_CONTRIB_SHA="$(extras/ci/get-contrib-sha.sh)"
-        - export VLC_PREBUILT_CONTRIBS_URL="https://artifacts.videolan.org/vlc-3.0/${CI_JOB_NAME}/vlc-contrib-${TRIPLET}-${VLC_CONTRIB_SHA}.tar.bz2"
+        - export VLC_PREBUILT_CONTRIBS_URL="https://artifacts.videolan.org/vlc-3.0/${CI_JOB_NAME##nightly-}/vlc-contrib-${TRIPLET}-${VLC_CONTRIB_SHA}.tar.bz2"
         - if ! extras/ci/check-url.sh "$VLC_PREBUILT_CONTRIBS_URL"; then unset VLC_PREBUILT_CONTRIBS_URL; fi
     after_script:
         - export VLC_CONTRIB_SHA="$(extras/ci/get-contrib-sha.sh)"
@@ -14,7 +14,7 @@ default:
 variables:
     VLC_WIN32_IMAGE: registry.videolan.org/vlc-debian-win32:20190416165205
     VLC_WIN64_IMAGE: registry.videolan.org/vlc-debian-win64:20190416180622
-    VLC_DEBIAN_IMAGE: registry.videolan.org/vlc-debian-unstable:20191023134128
+    VLC_DEBIAN_IMAGE: registry.videolan.org/vlc-debian-unstable:20200229201904
     VLC_ANDROID_IMAGE: registry.videolan.org/vlc-debian-android:20190717134531
     VLC_SNAP_IMAGE: registry.videolan.org/vlc-ubuntu-bionic:20190627090437
 
@@ -27,10 +27,12 @@ variables:
         TRIPLET: $HOST_ARCH-linux-gnu
 
 .variables-win32: &variables-win32
+        SHORTARCH: win32
         HOST_ARCH: i686
         TRIPLET: $HOST_ARCH-w64-mingw32
 
 .variables-win64: &variables-win64
+        SHORTARCH: win64
         HOST_ARCH: x86_64
         TRIPLET: $HOST_ARCH-w64-mingw32
 
@@ -64,6 +66,8 @@ variables:
         refs:
             - merge_requests
             - master at videolan/vlc-3.0
+    except:
+        - schedules
     artifacts:
         paths:
             - contrib/vlc-contrib-${TRIPLET}-*.tar.bz2
@@ -81,11 +85,14 @@ variables:
 .win-common:
     extends: .docker-template
     script: |
+        if [ "${CI_JOB_NAME:0:8}" = "nightly-" ]; then
+            NIGHTLY_EXTRA_BUILD_FLAGS="-i n -l"
+        fi
         if [ -n "$VLC_PREBUILT_CONTRIBS_URL" ]; then
             echo "Building using prebuilt contribs at $VLC_PREBUILT_CONTRIBS_URL"
-            extras/package/win32/build.sh -p -a $HOST_ARCH
+            extras/package/win32/build.sh -p -a $HOST_ARCH $NIGHTLY_EXTRA_BUILD_FLAGS
         else
-            extras/package/win32/build.sh -c -a $HOST_ARCH
+            extras/package/win32/build.sh -c -a $HOST_ARCH $NIGHTLY_EXTRA_BUILD_FLAGS
         fi
 
 win32:
@@ -100,6 +107,31 @@ win64:
         name: $VLC_WIN64_IMAGE
     variables: *variables-win64
 
+.nightly-win-common:
+    extends: .win-common
+    only:
+        - schedules
+    except:
+    after_script:
+        - mkdir nightlies
+        - for ext in 7z zip; do mv ${SHORTARCH}/vlc-*-debug.${ext} nightlies/$(basename ${SHORTARCH}/vlc-*-debug.${ext} | sed "s/\.${ext}/-${CI_COMMIT_SHORT_SHA}\.${ext}/"); done
+        - for ext in exe msi 7z zip; do mv ${SHORTARCH}/vlc-*.${ext} nightlies/$(basename ${SHORTARCH}/vlc-*.${ext} | sed "s/\.${ext}/-${CI_COMMIT_SHORT_SHA}\.${ext}/"); done
+    artifacts:
+        paths:
+            - nightlies/*
+
+nightly-win32:
+    extends: .nightly-win-common
+    image:
+        name: $VLC_WIN32_IMAGE
+    variables: *variables-win32
+
+nightly-win64:
+    extends: .nightly-win-common
+    image:
+        name: $VLC_WIN64_IMAGE
+    variables: *variables-win64
+
 #
 # Debian
 #
@@ -134,12 +166,24 @@ debian:
 
         # Run tests
         VLC_TEST_TIMEOUT=60 sh -x ./test/make_check_wrapper.sh -j4
+        if [ "${CI_JOB_NAME:0:8}" = "nightly-" ]; then
+            export XZ_OPT="-T 0"
+            make -j$NCPU distcheck
+        fi
     variables: *variables-debian
 
+nightly-debian:
+    extends: debian
+    only:
+        - schedules
+    except:
+    after_script:
+    artifacts:
+
 #
 # Snap builds
 #
-snap:
+.snap-common:
     extends: .docker-template
     image:
         name: $VLC_SNAP_IMAGE
@@ -151,6 +195,24 @@ snap:
         - mv extras/package/snap/parts/vlc/build/contrib/vlc-contrib-*.tar.bz2 contrib/vlc-contrib-${TRIPLET}-${VLC_CONTRIB_SHA}.tar.bz2 2>/dev/null || true
     variables: *variables-snap
 
+snap:
+    extends: .snap-common
+
+nightly-snap:
+    extends: .snap-common
+    only:
+        - schedules
+    except:
+    after_script:
+        - if [ "$CI_PROJECT_NAMESPACE" = "videolan" ]; then /bin/true; else exit 0; fi
+        - cd extras/package/snap
+        - echo $SNAP_LOGIN | base64 --decode | snapcraft login --with -
+        - snapcraft push vlc_*.snap --release beta
+        - snapcraft logout
+    artifacts:
+        paths:
+           - extras/package/snap/vlc_*.snap
+
 #
 # macOS
 #
@@ -159,6 +221,9 @@ macos:
     tags:
         - old-macmini
     script: |
+        if [ "${CI_JOB_NAME:0:8}" = "nightly-" ]; then
+            NIGHTLY_EXTRA_BUILD_FLAGS="-i n"
+        fi
         if [ -n "$VLC_PREBUILT_CONTRIBS_URL" ]; then
             echo "Building using prebuilt contribs at $VLC_PREBUILT_CONTRIBS_URL"
             mkdir -p contrib/contrib-$TRIPLET && cd contrib/contrib-$TRIPLET
@@ -168,9 +233,21 @@ macos:
             EXTRA_BUILD_FLAGS="-c -p"
         fi
         mkdir build && cd build
-        ../extras/package/macosx/build.sh $EXTRA_BUILD_FLAGS -k $VLC_SDK_PATH
+        ../extras/package/macosx/build.sh $EXTRA_BUILD_FLAGS -k $VLC_SDK_PATH $NIGHTLY_EXTRA_BUILD_FLAGS
     variables: *variables-macos
 
+nightly-macos:
+    extends: macos
+    only:
+        - schedules
+    except:
+    after_script:
+        - mkdir nightlies
+        - mv build/vlc-*.dmg nightlies/$(basename build/vlc-*.dmg | sed "s/\.dmg/-${CI_COMMIT_SHORT_SHA}\.dmg/")
+    artifacts:
+        paths:
+            - nightlies/*
+
 #
 # Android
 #



More information about the vlc-commits mailing list