mirror of https://code.videolan.org/videolan/vlc
645 lines
22 KiB
YAML
645 lines
22 KiB
YAML
stages:
|
|
- build
|
|
|
|
default:
|
|
before_script:
|
|
- set -x
|
|
- export VLC_CONTRIB_SHA="$(extras/ci/get-contrib-sha.sh ${CI_JOB_NAME##nightly-})"
|
|
- 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 ${CI_JOB_NAME##nightly-})"
|
|
- mv contrib/vlc-contrib-*.tar.bz2 contrib/vlc-contrib-${TRIPLET}-${VLC_CONTRIB_SHA}.tar.bz2 2>/dev/null || true
|
|
- cd contrib && find . -maxdepth 1 -type f -name "vlc-contrib-*-${VLC_CONTRIB_SHA}.tar.bz2" -exec sh -c 'tar tf "$0" > /dev/null && shasum -a 512 "$0" | tee SHA512SUM' "{}" \;
|
|
interruptible: true
|
|
# Most jobs use docker, so we can default to those tags.
|
|
# macOS base template will overwrite this
|
|
tags:
|
|
- docker
|
|
- amd64
|
|
|
|
variables:
|
|
VLC_TEST_TIMEOUT: 60
|
|
VLC_WIN64_IMAGE: registry.videolan.org/vlc-debian-win64-posix:20240212151604
|
|
VLC_WIN_LLVM_MSVCRT_IMAGE: registry.videolan.org/vlc-debian-llvm-msvcrt:20240212151604
|
|
VLC_WIN_LLVM_UCRT_IMAGE: registry.videolan.org/vlc-debian-llvm-ucrt:20240212151604
|
|
VLC_DEBIAN_IMAGE: registry.videolan.org/vlc-debian-unstable:20240402131352
|
|
VLC_ANDROID_IMAGE: registry.videolan.org/vlc-debian-android:20231013040434
|
|
VLC_SNAP_IMAGE: registry.videolan.org/vlc-ubuntu-focal:20231013031754
|
|
VLC_RASPBIAN_IMAGE: registry.videolan.org/vlc-ubuntu-raspberry:20231013032350
|
|
VLC_WASM_EMSCRIPTEN: registry.videolan.org/vlc-debian-wasm-emscripten:20240313095757
|
|
|
|
.variables-debian: &variables-debian
|
|
HOST_ARCH: x86_64
|
|
TRIPLET: $HOST_ARCH-linux-gnu
|
|
|
|
.variables-snap: &variables-snap
|
|
HOST_ARCH: x86_64
|
|
TRIPLET: $HOST_ARCH-linux-gnu
|
|
|
|
.variables-raspbian-arm: &variables-raspbian-arm
|
|
HOST_ARCH: arm
|
|
TRIPLET: $HOST_ARCH-linux-gnueabihf
|
|
|
|
.variables-win32: &variables-win32
|
|
SHORTARCH: win32
|
|
VLCARCH: win32
|
|
HOST_ARCH: i686
|
|
TRIPLET: $HOST_ARCH-w64-mingw32
|
|
|
|
.variables-win64: &variables-win64
|
|
SHORTARCH: win64
|
|
VLCARCH: win64
|
|
HOST_ARCH: x86_64
|
|
TRIPLET: $HOST_ARCH-w64-mingw32
|
|
|
|
.variables-win64-arm: &variables-win64-arm
|
|
SHORTARCH: arm64
|
|
VLCARCH: winarm64
|
|
HOST_ARCH: aarch64
|
|
TRIPLET: $HOST_ARCH-w64-mingw32
|
|
|
|
.variables-macos-x86_64: &variables-macos-x86_64
|
|
VLC_PATH: /Users/videolanci/sandbox/bin
|
|
VLC_FORCE_KERNELVERSION: 19
|
|
SHORTARCH: intel64
|
|
HOST_ARCH: x86_64
|
|
TRIPLET: $HOST_ARCH-apple-darwin$VLC_FORCE_KERNELVERSION
|
|
|
|
.variables-macos-arm64: &variables-macos-arm64
|
|
VLC_PATH: /Users/videolanci/sandbox/bin
|
|
VLC_FORCE_KERNELVERSION: 19
|
|
SHORTARCH: arm64
|
|
HOST_ARCH: aarch64
|
|
TRIPLET: $HOST_ARCH-apple-darwin$VLC_FORCE_KERNELVERSION
|
|
|
|
.variables-ios-arm64: &variables-ios-arm64
|
|
VLC_PATH: /Users/videolanci/sandbox/bin
|
|
HOST_ARCH: arm64
|
|
TRIPLET: $HOST_ARCH-apple-iphoneos
|
|
SDKNAME: iphoneos
|
|
|
|
.variables-ios-armv7: &variables-ios-armv7
|
|
VLC_PATH: /Users/videolanci/sandbox/bin
|
|
HOST_ARCH: armv7
|
|
TRIPLET: $HOST_ARCH-apple-iphoneos
|
|
SDKNAME: iphoneos
|
|
|
|
.variables-ios-simulator-x86_64: &variables-ios-simulator-x86_64
|
|
VLC_PATH: /Users/videolanci/sandbox/bin
|
|
HOST_ARCH: x86_64
|
|
TRIPLET: $HOST_ARCH-apple-iphonesimulator
|
|
SDKNAME: iphonesimulator
|
|
|
|
.variables-tvos-arm64: &variables-tvos-arm64
|
|
VLC_PATH: /Users/videolanci/sandbox/bin
|
|
HOST_ARCH: arm64
|
|
TRIPLET: $HOST_ARCH-apple-appletvos
|
|
SDKNAME: appletvos
|
|
|
|
.variables-android-arm: &variables-android-arm
|
|
ANDROID_ARCH: arm
|
|
TRIPLET: arm-linux-androideabi
|
|
|
|
.variables-android-arm64: &variables-android-arm64
|
|
ANDROID_ARCH: arm64
|
|
TRIPLET: aarch64-linux-android
|
|
|
|
.variables-android-x86: &variables-android-x86
|
|
ANDROID_ARCH: x86
|
|
TRIPLET: i686-linux-android
|
|
|
|
.variables-android-x86_64: &variables-android-x86_64
|
|
ANDROID_ARCH: x86_64
|
|
TRIPLET: x86_64-linux-android
|
|
|
|
.variables-emscripten-wasm32: &variables-emscripten-wasm32
|
|
HOST_ARCH: wasm32
|
|
TRIPLET: $HOST_ARCH-unknown-emscripten
|
|
|
|
# Common rules
|
|
.base-template:
|
|
stage: build
|
|
rules:
|
|
- if: $CI_MERGE_REQUEST_IID
|
|
- if: '$CI_PIPELINE_SOURCE == "push" && $CI_PROJECT_PATH == "videolan/vlc"'
|
|
artifacts:
|
|
paths:
|
|
- contrib/vlc-contrib-${TRIPLET}-*.tar.bz2
|
|
- contrib/SHA512SUM
|
|
|
|
#
|
|
# Windows
|
|
#
|
|
.win-common:
|
|
extends: .base-template
|
|
script: |
|
|
if [ "${CI_JOB_NAME:0:8}" = "nightly-" ]; then
|
|
EXTRA_BUILD_FLAGS="-i n -l"
|
|
fi
|
|
if [ -n "$VLC_PREBUILT_CONTRIBS_URL" ]; then
|
|
echo "Building using prebuilt contribs at $VLC_PREBUILT_CONTRIBS_URL"
|
|
EXTRA_BUILD_FLAGS="${EXTRA_BUILD_FLAGS} -p"
|
|
fi
|
|
if [ "${CI_COMMIT_BRANCH}" = "${CI_DEFAULT_BRANCH}" ]; then
|
|
EXTRA_BUILD_FLAGS="${EXTRA_BUILD_FLAGS} -c"
|
|
fi
|
|
extras/package/win32/build.sh -a $HOST_ARCH $EXTRA_BUILD_FLAGS $LIBVLC_EXTRA_BUILD_FLAGS $UWP_EXTRA_BUILD_FLAGS
|
|
if [ "${CI_JOB_NAME}" = "win64" ]; then
|
|
cmake -DLIBVLC_SDK_INC:STRING="${CI_PROJECT_DIR}/include;${CI_PROJECT_DIR}/${VLCARCH}/include" -DLIBVLC_SDK_LIB:STRING=${CI_PROJECT_DIR}/${VLCARCH}/lib/.libs -H${CI_PROJECT_DIR}/doc/libvlc -B${CI_PROJECT_DIR}/doc/libvlc/build \
|
|
-G Ninja -DCMAKE_C_COMPILER=${TRIPLET}-gcc -DCMAKE_CXX_COMPILER=${TRIPLET}-g++ -DCMAKE_SYSTEM_NAME=Windows
|
|
cmake --build ${CI_PROJECT_DIR}/doc/libvlc/build
|
|
fi
|
|
|
|
win32-llvm:
|
|
extends: .win-common
|
|
image:
|
|
name: $VLC_WIN_LLVM_MSVCRT_IMAGE
|
|
variables:
|
|
<<: *variables-win32
|
|
LIBVLC_EXTRA_BUILD_FLAGS: -x
|
|
|
|
win64:
|
|
extends: .win-common
|
|
image:
|
|
name: $VLC_WIN64_IMAGE
|
|
variables:
|
|
<<: *variables-win64
|
|
LIBVLC_EXTRA_BUILD_FLAGS: -x
|
|
|
|
win64-llvm:
|
|
extends: .win-common
|
|
image:
|
|
name: $VLC_WIN_LLVM_MSVCRT_IMAGE
|
|
variables: *variables-win64
|
|
|
|
win64-arm-llvm:
|
|
extends: .win-common
|
|
image:
|
|
name: $VLC_WIN_LLVM_UCRT_IMAGE
|
|
variables:
|
|
<<: *variables-win64-arm
|
|
VLCARCH: winarm64-ucrt
|
|
UWP_EXTRA_BUILD_FLAGS: -u -x -S 0x0A000006
|
|
# Clang <= 15 produces incorrect unwind info for code with
|
|
# branch protection enabled on Windows.
|
|
CONFIGFLAGS: --disable-branch-protection
|
|
|
|
uwp64-libvlc-llvm:
|
|
extends: .win-common
|
|
image:
|
|
name: $VLC_WIN_LLVM_UCRT_IMAGE
|
|
variables:
|
|
<<: *variables-win64
|
|
VLCARCH: win64-uwp
|
|
LIBVLC_EXTRA_BUILD_FLAGS: -z
|
|
UWP_EXTRA_BUILD_FLAGS: -u -w -x -S 0x0A000007
|
|
|
|
.nightly-win-common:
|
|
extends: .win-common
|
|
rules:
|
|
- if: '$CI_PIPELINE_SOURCE == "schedule"'
|
|
after_script:
|
|
- mkdir nightlies
|
|
- for ext in 7z; do mv ${VLCARCH}/vlc-*-dev-*-debug.${ext} nightlies/$(basename ${VLCARCH}/vlc-*-dev-*-debug.${ext} | sed "s/\.${ext}/-${CI_COMMIT_SHORT_SHA}\.${ext}/") || echo "vlc-*debug.${ext} not found!"; done
|
|
- for ext in exe msi 7z zip; do mv ${VLCARCH}/vlc-*-dev-*.${ext} nightlies/$(basename ${VLCARCH}/vlc-*-dev-*.${ext} | sed "s/\.${ext}/-${CI_COMMIT_SHORT_SHA}\.${ext}/") || echo "vlc-*.${ext} not found!"; done
|
|
- cd nightlies && find . -maxdepth 1 -type f -not -name SHA512SUM | xargs shasum -a 512 | tee SHA512SUM
|
|
artifacts:
|
|
paths:
|
|
- nightlies/*
|
|
|
|
nightly-win32-llvm:
|
|
extends: .nightly-win-common
|
|
image:
|
|
name: $VLC_WIN_LLVM_MSVCRT_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_MSVCRT_IMAGE
|
|
variables: *variables-win64
|
|
|
|
nightly-win64-ucrt-llvm:
|
|
extends: .nightly-win-common
|
|
image:
|
|
name: $VLC_WIN_LLVM_UCRT_IMAGE
|
|
variables:
|
|
<<: *variables-win64
|
|
VLCARCH: win64-ucrt
|
|
TRIPLET: $HOST_ARCH-ucrt-w64-mingw32
|
|
UWP_EXTRA_BUILD_FLAGS: -u -x -S 0x0A000006
|
|
|
|
nightly-win64-arm-llvm:
|
|
extends: .nightly-win-common
|
|
image:
|
|
name: $VLC_WIN_LLVM_UCRT_IMAGE
|
|
variables:
|
|
<<: *variables-win64-arm
|
|
VLCARCH: winarm64-ucrt
|
|
TRIPLET: $HOST_ARCH-ucrt-w64-mingw32
|
|
UWP_EXTRA_BUILD_FLAGS: -u -x -S 0x0A000006
|
|
# Clang <= 15 produces incorrect unwind info for code with
|
|
# branch protection enabled on Windows.
|
|
CONFIGFLAGS: --disable-branch-protection
|
|
|
|
#
|
|
# Debian
|
|
#
|
|
debian-contrib:
|
|
extends: .base-template
|
|
image:
|
|
name: $VLC_DEBIAN_IMAGE
|
|
rules:
|
|
- changes:
|
|
# should match get-contrib-sha.sh
|
|
- contrib/**/*
|
|
- contrib/*
|
|
- extras/tools/*
|
|
- extras/ci/*
|
|
script: |
|
|
export NCPU=$(getconf _NPROCESSORS_ONLN)
|
|
echo "Building branch '${CI_COMMIT_BRANCH}' (default: '${CI_DEFAULT_BRANCH}')"
|
|
|
|
# Build tools
|
|
( cd extras/tools && ./bootstrap && make -j$NCPU --output-sync=recurse )
|
|
export PATH="$(pwd)/extras/tools/build/bin:$PATH"
|
|
|
|
# Build contribs
|
|
mkdir -p contrib/contrib-$TRIPLET && cd contrib/contrib-$TRIPLET
|
|
../bootstrap --enable-x262
|
|
if [ -n "$VLC_PREBUILT_CONTRIBS_URL" ]; then
|
|
echo "Building using prebuilt contribs at $VLC_PREBUILT_CONTRIBS_URL"
|
|
make prebuilt PREBUILT_URL="${VLC_PREBUILT_CONTRIBS_URL}" || PREBUILT_FAILED=yes
|
|
else
|
|
PREBUILT_FAILED=yes
|
|
fi
|
|
if [ -n "$PREBUILT_FAILED" ]; then
|
|
make list
|
|
make -j$NCPU --output-sync=recurse fetch
|
|
make -j$NCPU --output-sync=recurse
|
|
if [ "${CI_COMMIT_BRANCH}" = "${CI_DEFAULT_BRANCH}" ]; then
|
|
make package
|
|
fi
|
|
else
|
|
make -j$NCPU --output-sync=recurse tools
|
|
fi
|
|
allow_failure: true
|
|
variables:
|
|
<<: *variables-debian
|
|
|
|
debian:
|
|
extends: .base-template
|
|
image:
|
|
name: $VLC_DEBIAN_IMAGE
|
|
script: |
|
|
export NCPU=$(getconf _NPROCESSORS_ONLN)
|
|
echo "Building branch '${CI_COMMIT_BRANCH}' (default: '${CI_DEFAULT_BRANCH}')"
|
|
|
|
# Configure VLC
|
|
./bootstrap
|
|
./configure
|
|
|
|
# Allow core dumps for tracing test failures
|
|
ulimit -c unlimited
|
|
|
|
# Build, check and distcheck VLC
|
|
export XZ_OPT="-T 0"
|
|
make -j$NCPU distcheck AM_DISTCHECK_CONFIGURE_FLAGS="--enable-fast-install --enable-extra-checks" || ./test/dump_stacktraces.sh
|
|
variables:
|
|
<<: *variables-debian
|
|
|
|
nightly-debian:
|
|
extends: debian
|
|
rules:
|
|
- if: '$CI_PIPELINE_SOURCE == "schedule"'
|
|
after_script:
|
|
artifacts:
|
|
|
|
#
|
|
# Linux Meson build
|
|
#
|
|
debian-meson:
|
|
extends: .base-template
|
|
coverage: '/^coverage result: (\d+.\d+)$/'
|
|
image:
|
|
name: $VLC_DEBIAN_IMAGE
|
|
script:
|
|
- |
|
|
export NCPU=$(getconf _NPROCESSORS_ONLN)
|
|
echo "Building branch '${CI_COMMIT_BRANCH}' (default: '${CI_DEFAULT_BRANCH}')"
|
|
- |
|
|
echo -e "\e[0Ksection_start:$(date +%s):build_tools_section\r\e[0KTools build"
|
|
# Build tools
|
|
( cd extras/tools && ./bootstrap && make -j$NCPU --output-sync=recurse )
|
|
# Build meson from extras/tool explicitly
|
|
( cd extras/tools && make -j$NCPU .buildmeson )
|
|
export PATH="$(pwd)/extras/tools/build/bin:$PATH"
|
|
echo -e "\e[0Ksection_end:$(date +%s):build_tools_section\r\e[0K"
|
|
- |
|
|
echo -e "\e[0Ksection_start:$(date +%s):setup_meson_section\r\e[0KMeson setup"
|
|
# Setup meson build dir
|
|
meson setup -Db_coverage=true -Dextra_checks=true build-meson || (echo "ERROR: Meson setup failed!" >&2 ; cat build-meson/meson-logs/meson-log.txt >&2 ; exit 1)
|
|
echo -e "\e[0Ksection_end:$(date +%s):setup_meson_section\r\e[0K"
|
|
|
|
- |
|
|
echo -e "\e[0Ksection_start:$(date +%s):build_meson_section\r\e[0KVLC build"
|
|
# Build VLC
|
|
ninja -C build-meson || (echo "ERROR: Build failed!" >&2 ; exit 2)
|
|
echo -e "\e[0Ksection_end:$(date +%s):build_meson_section\r\e[0K"
|
|
|
|
- |
|
|
echo -e "\e[0Ksection_start:$(date +%s):tests_meson_section\r\e[0KVLC tests"
|
|
# Run tests
|
|
meson test -C build-meson || (echo "ERROR: Tests failed!" >&2 ; cat build-meson/meson-logs/testlog.txt >&2 ; exit 3)
|
|
echo -e "\e[0Ksection_end:$(date +%s):tests_meson_section\r\e[0K"
|
|
|
|
- |
|
|
# We split in two different commands to handle the case where
|
|
# the coverage will be generated on different jobs later.
|
|
# Note: qt6-assets_qrc.cpp, qt6-qml_qrc.cpp, qt6-shaders_qrc.cpp, qt6-windows_qrc.cpp need to be remove from the report since their
|
|
# coverage should not be checked. It leads to gcovr having trouble
|
|
# parsing the coverage otherwise.
|
|
gcovr -r "${CI_PROJECT_DIR}/" --json "${CI_PROJECT_DIR}/${CI_JOB_NAME}.cov.json" -j$NCPU --gcov-ignore-parse-errors=negative_hits.warn_once_per_file --exclude build-meson/modules/gui/qt/qt6-assets_qrc.cpp --exclude build-meson/modules/gui/qt/qt6-qml_qrc.cpp --exclude build-meson/modules/gui/qt/shaders/qt6-shaders_qrc.cpp --exclude build-meson/modules/gui/qt/qt6-windows_qrc.cpp
|
|
|
|
- mkdir html-coverage
|
|
- >
|
|
gcovr --add-tracefile "${CI_PROJECT_DIR}/${CI_JOB_NAME}.cov.json"
|
|
--xml="cobertura.xml"
|
|
--html="html-coverage/vlc.html"
|
|
--html-details -s -j$NCPU
|
|
- |
|
|
# Ensure that sources are reported from CI_PROJECT_DIR directory so
|
|
# that gitlab can associate the files correctly.
|
|
sed -i 's,<source>.*</source>,<source>'"${CI_PROJECT_DIR}"'</source>,' cobertura.xml
|
|
# Expose the line coverage percentage to gitlab from the cobertura XML.
|
|
- >
|
|
grep -Eo 'line-rate="[^"]+"' cobertura.xml | head -n 1 |
|
|
grep -Eo '[0-9.]+' | awk '{ print "coverage result:", $1 * 100 } ' ||
|
|
true
|
|
allow_failure: true
|
|
variables: *variables-debian
|
|
artifacts:
|
|
reports:
|
|
junit: build-meson/meson-logs/testlog.junit.xml
|
|
coverage_report:
|
|
coverage_format: cobertura
|
|
path: cobertura.xml
|
|
paths:
|
|
- ${CI_PROJECT_DIR}/${CI_JOB_NAME}.cov.json
|
|
- cobertura.xml
|
|
- html-coverage/
|
|
- ${CI_PROJECT_DIR}/build-meson/meson-logs/testlog.junit.xml
|
|
|
|
#
|
|
# Snap builds
|
|
#
|
|
.snap-common:
|
|
extends: .base-template
|
|
image:
|
|
name: $VLC_SNAP_IMAGE
|
|
script: |
|
|
cd extras/package/snap
|
|
make -f package.mak snap
|
|
after_script:
|
|
- export VLC_CONTRIB_SHA="$(extras/ci/get-contrib-sha.sh 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
|
|
allow_failure: true
|
|
variables: *variables-snap
|
|
|
|
snap:
|
|
extends: .snap-common
|
|
|
|
nightly-snap:
|
|
extends: .snap-common
|
|
rules:
|
|
- if: '$CI_PIPELINE_SOURCE == "schedule"'
|
|
after_script:
|
|
- if [ "$CI_PROJECT_NAMESPACE" = "videolan" ]; then /bin/true; else exit 0; fi
|
|
- mkdir nightlies
|
|
- mv extras/package/snap/vlc_*.snap nightlies/
|
|
- echo $SNAP_LOGIN | base64 --decode | snapcraft login --with -
|
|
- snapcraft push nightlies/vlc_*.snap --release edge
|
|
- snapcraft logout
|
|
- cd nightlies && find . -maxdepth 1 -type f -not -name SHA512SUM | xargs shasum -a 512 | tee SHA512SUM
|
|
artifacts:
|
|
paths:
|
|
- nightlies/*
|
|
|
|
#
|
|
# Raspbian
|
|
#
|
|
raspbian-arm:
|
|
extends: .base-template
|
|
image:
|
|
name: $VLC_RASPBIAN_IMAGE
|
|
script: |
|
|
if [ -n "$VLC_PREBUILT_CONTRIBS_URL" ]; then
|
|
echo "Building using prebuilt contribs at $VLC_PREBUILT_CONTRIBS_URL"
|
|
EXTRA_BUILD_FLAGS="${EXTRA_BUILD_FLAGS} -p"
|
|
fi
|
|
if [ "${CI_COMMIT_BRANCH}" = "${CI_DEFAULT_BRANCH}" ]; then
|
|
EXTRA_BUILD_FLAGS="${EXTRA_BUILD_FLAGS} -c"
|
|
fi
|
|
extras/package/raspberry/build.sh $EXTRA_BUILD_FLAGS -x -a $HOST_ARCH
|
|
variables: *variables-raspbian-arm
|
|
|
|
#
|
|
# macOS
|
|
#
|
|
.ccache-common-apple:
|
|
variables:
|
|
CCACHE_BASEDIR: ${CI_PROJECT_DIR}
|
|
CCACHE_DIR: ${CI_PROJECT_DIR}/ccache
|
|
CCACHE_COMPILERCHECK: content
|
|
CCACHE_CPP2: 'true'
|
|
VLC_CCACHE_BINS_PATH: '/Users/videolanci/sandbox/bin/ccache/bin'
|
|
before_script:
|
|
- !reference [default, before_script]
|
|
- |
|
|
if [ -x "${VLC_CCACHE_BINS_PATH}/ccache" ]; then
|
|
${VLC_CCACHE_BINS_PATH}/ccache --zero-stats
|
|
${VLC_CCACHE_BINS_PATH}/ccache --show-stats
|
|
else
|
|
echo "No ccache present, disabling caching"
|
|
unset VLC_CCACHE_BINS_PATH
|
|
fi
|
|
after_script:
|
|
- !reference [default, after_script]
|
|
- |
|
|
if [ -x "${VLC_CCACHE_BINS_PATH}/ccache" ]; then
|
|
${VLC_CCACHE_BINS_PATH}/ccache --show-stats
|
|
fi
|
|
cache:
|
|
key: ${CI_JOB_NAME}
|
|
paths:
|
|
- ccache
|
|
|
|
.macos-common:
|
|
extends:
|
|
- .base-template
|
|
- .ccache-common-apple
|
|
tags:
|
|
- monterey
|
|
script: |
|
|
if [ "${CI_JOB_NAME:0:8}" = "nightly-" ]; then
|
|
NIGHTLY_EXTRA_BUILD_FLAGS="-i n"
|
|
else
|
|
EXTRA_BUILD_FLAGS="-i z"
|
|
fi
|
|
if [ -n "$VLC_PREBUILT_CONTRIBS_URL" ]; then
|
|
echo "Building using prebuilt contribs at $VLC_PREBUILT_CONTRIBS_URL"
|
|
else
|
|
EXTRA_BUILD_FLAGS="${EXTRA_BUILD_FLAGS} -c"
|
|
fi
|
|
if [ "${CI_COMMIT_BRANCH}" = "${CI_DEFAULT_BRANCH}" ]; then
|
|
EXTRA_BUILD_FLAGS="${EXTRA_BUILD_FLAGS} -p"
|
|
fi
|
|
export PATH="${VLC_PATH}:$PATH"
|
|
mkdir build && cd build
|
|
../extras/package/macosx/build.sh $EXTRA_BUILD_FLAGS $NIGHTLY_EXTRA_BUILD_FLAGS -a $HOST_ARCH -x
|
|
# At least compile every targets
|
|
make check TESTS=
|
|
|
|
macos-x86_64:
|
|
extends: .macos-common
|
|
variables: *variables-macos-x86_64
|
|
|
|
macos-arm64:
|
|
extends: .macos-common
|
|
variables: *variables-macos-arm64
|
|
|
|
.nightly-macos-common:
|
|
extends: .macos-common
|
|
rules:
|
|
- if: '$CI_PIPELINE_SOURCE == "schedule"'
|
|
after_script:
|
|
- mkdir nightlies
|
|
- mv build/vlc-*.dmg nightlies/$(basename build/vlc-*.dmg | sed "s/\.dmg/-${SHORTARCH}-${CI_COMMIT_SHORT_SHA}\.dmg/")
|
|
- mv build/vlc-*.tar.gz nightlies/$(basename build/vlc-*.tar.gz | sed "s/\.tar\.gz/-${SHORTARCH}-${CI_COMMIT_SHORT_SHA}\.tar\.gz/")
|
|
- cd nightlies && find . -maxdepth 1 -type f -not -name SHA512SUM | xargs shasum -a 512 | tee SHA512SUM
|
|
artifacts:
|
|
paths:
|
|
- nightlies/*
|
|
|
|
nightly-macos-x86_64:
|
|
extends: .nightly-macos-common
|
|
variables: *variables-macos-x86_64
|
|
|
|
nightly-macos-arm64:
|
|
extends: .nightly-macos-common
|
|
variables: *variables-macos-arm64
|
|
|
|
#
|
|
# iOS
|
|
#
|
|
.apple-os-common:
|
|
extends: .base-template
|
|
tags:
|
|
- monterey
|
|
script: |
|
|
export PATH="${VLC_PATH}:$PATH"
|
|
mkdir build && cd build
|
|
if [ -n "$VLC_PREBUILT_CONTRIBS_URL" ]; then
|
|
../extras/package/apple/build.sh --sdk=$SDKNAME --arch=$HOST_ARCH --package-contribs \
|
|
--enable-extra-checks --with-prebuilt-contribs
|
|
else
|
|
../extras/package/apple/build.sh --sdk=$SDKNAME --arch=$HOST_ARCH --package-contribs \
|
|
--enable-extra-checks
|
|
fi
|
|
|
|
ios-arm64:
|
|
extends: .apple-os-common
|
|
variables: *variables-ios-arm64
|
|
|
|
ios-armv7:
|
|
extends: .apple-os-common
|
|
variables: *variables-ios-armv7
|
|
|
|
ios-simulator-x86_64:
|
|
extends: .apple-os-common
|
|
variables: *variables-ios-simulator-x86_64
|
|
|
|
tvos-arm64:
|
|
extends: .apple-os-common
|
|
variables: *variables-tvos-arm64
|
|
|
|
#
|
|
# Android
|
|
#
|
|
.android-common:
|
|
extends: .base-template
|
|
image:
|
|
name: $VLC_ANDROID_IMAGE
|
|
script: |
|
|
git clone https://code.videolan.org/videolan/libvlcjni.git
|
|
(cd libvlcjni && git checkout aa63288b6bb5c52dfacbdec95104cd4c86c7e9c2)
|
|
if [ -n "$VLC_PREBUILT_CONTRIBS_URL" ]; then
|
|
CONTRIB_FLAGS="--with-prebuilt-contribs"
|
|
else
|
|
CONTRIB_FLAGS="--package-contribs"
|
|
fi
|
|
EXTRA_PARAMS="--enable-extra-checks" /bin/sh ./libvlcjni/buildsystem/compile-libvlc.sh --no-jni -a $ANDROID_ARCH $CONTRIB_FLAGS
|
|
|
|
android-arm:
|
|
extends: .android-common
|
|
variables: *variables-android-arm
|
|
|
|
android-arm64:
|
|
extends: .android-common
|
|
variables: *variables-android-arm64
|
|
|
|
android-x86:
|
|
extends: .android-common
|
|
variables: *variables-android-x86
|
|
|
|
android-x86_64:
|
|
extends: .android-common
|
|
variables: *variables-android-x86_64
|
|
|
|
#
|
|
# Webassembly
|
|
#
|
|
|
|
wasm32-emscripten-build :
|
|
extends: .base-template
|
|
variables: *variables-emscripten-wasm32
|
|
image:
|
|
name: $VLC_WASM_EMSCRIPTEN
|
|
script:
|
|
- source $EMSCRIPTEN_SDK/emsdk_env.sh
|
|
- |
|
|
EXTRA_BUILD_FLAGS="${EXTRA_BUILD_FLAGS} --enable-extra-checks"
|
|
if [ -n "$VLC_PREBUILT_CONTRIBS_URL" ]; then
|
|
echo "Building using prebuilt contribs at $VLC_PREBUILT_CONTRIBS_URL"
|
|
EXTRA_BUILD_FLAGS="${EXTRA_BUILD_FLAGS} --with-prebuilt-contribs"
|
|
fi
|
|
if [ "${CI_COMMIT_BRANCH}" = "${CI_DEFAULT_BRANCH}" ]; then
|
|
EXTRA_BUILD_FLAGS="${EXTRA_BUILD_FLAGS} --gen-contrib-archive"
|
|
fi
|
|
./extras/package/wasm-emscripten/build.sh $EXTRA_BUILD_FLAGS
|
|
|
|
#
|
|
# VLC Documentation
|
|
#
|
|
pages:
|
|
extends: .base-template
|
|
image:
|
|
name: $VLC_DEBIAN_IMAGE
|
|
script:
|
|
- ./bootstrap
|
|
- ./configure
|
|
- make doc
|
|
- mv doc/doxygen/html public
|
|
artifacts:
|
|
paths:
|
|
- public
|
|
rules:
|
|
- if: '$CI_PIPELINE_SOURCE == "schedule"'
|