[vlc-devel] [PATCH] CI: Introduced nightly jobs
Konstantin Pavlov
thresh at videolan.org
Mon Mar 30 20:10:04 CEST 2020
Problems:
- bashisms
---
extras/ci/gitlab-ci.yml | 94 ++++++++++++++++++++++++++++++++++++++---
1 file changed, 88 insertions(+), 6 deletions(-)
diff --git a/extras/ci/gitlab-ci.yml b/extras/ci/gitlab-ci.yml
index 3b3dc91ff4..6a31bab869 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/${CI_JOB_NAME}/vlc-contrib-${TRIPLET}-${VLC_CONTRIB_SHA}.tar.bz2"
+ - export VLC_PREBUILT_CONTRIBS_URL="https://artifacts.videolan.org/vlc/${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)"
@@ -15,7 +15,7 @@ variables:
VLC_WIN32_IMAGE: registry.videolan.org/vlc-debian-win32:20190416165205
VLC_WIN64_IMAGE: registry.videolan.org/vlc-debian-win64:20190416180622
VLC_WIN_LLVM_IMAGE: registry.videolan.org/vlc-debian-llvm-mingw:20190621125349
- 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
VLC_RASPBIAN_IMAGE: registry.videolan.org/vlc-debian-raspbian:20200213203125
@@ -80,6 +80,8 @@ variables:
refs:
- merge_requests
- master at videolan/vlc
+ except:
+ - schedules
artifacts:
paths:
- contrib/vlc-contrib-${TRIPLET}-*.tar.bz2
@@ -97,11 +99,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:
@@ -122,6 +127,37 @@ win64-llvm:
name: $VLC_WIN_LLVM_IMAGE
variables: *variables-win64-llvm
+.nightly-win-common:
+ extends: .win-common
+ only:
+ - schedules
+ except:
+ after_script:
+ - mkdir nightlies
+ - for ext in 7z zip; do mv */vlc-*-dev-*-debug.$ext nightlies/$(ls vlc-*-dev-*-debug.$ext | sed -re "s/([[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+)/\1-`date +%Y%m%d-%H%M`/"); done
+ - for ext in exe msi 7z zip; do mv */vlc-*-dev-*.$ext nightlies/$(ls vlc-*-dev-*.$ext | sed -re "s/([[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+)/\1-`date +%Y%m%d-%H%M`/"); 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
+
+nightly-win64-llvm:
+ extends: .nightly-win-common
+ image:
+ name: $VLC_WIN_LLVM_IMAGE
+ variables: *variables-win64-llvm
+
#
# Debian
#
@@ -156,12 +192,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
@@ -173,6 +221,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:
+ - cd extras/package/snap
+ - mkdir .snapcraft
+ - echo $snapmacaroon | base64 -d > .snapcraft/snapcraft.cfg
+ - snapcraft push --release edge vlc_*.snap
+ - rm -rf .snapcraft
+ artifacts:
+ paths:
+ - extras/package/snap/vlc_*.snap
+
#
# Raspbian
#
@@ -197,6 +263,9 @@ macos:
tags:
- macos
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
@@ -206,9 +275,22 @@ macos:
EXTRA_BUILD_FLAGS="-c -p"
fi
mkdir build && cd build
- ../extras/package/macosx/build.sh $EXTRA_BUILD_FLAGS
+ ../extras/package/macosx/build.sh $EXTRA_BUILD_FLAGS $NIGHTLY_EXTRA_BUILD_FLAGS
variables: *variables-macos
+nightly-macos:
+ extends: macos
+ only:
+ - schedules
+ except:
+ after_script:
+ - cd build
+ - mkdir ../nightlies
+ - mv vlc-*.dmg ../nightlies/$(ls vlc-*.dmg | sed -E "s/([[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+)/\1-`date +%Y%m%d-%H%M`/")
+ artifacts:
+ paths:
+ - nightlies/*
+
#
# iOS
#
--
2.25.1
More information about the vlc-devel
mailing list