[Android] CI: make it build vlc4 when needed
Nicolas Pomepuy
git at videolan.org
Tue Sep 27 07:27:39 UTC 2022
vlc-android | branch: master | Nicolas Pomepuy <nicolas at videolabs.io> | Fri Jul 22 10:27:02 2022 +0200| [c62b9e2571c242213b4f6c3a4249d79e0ddd1c0b] | committer: Nicolas Pomepuy
CI: make it build vlc4 when needed
By making it run the vlc 4 jobs when the java or jni is modified
and by allowing to tag libvlc-4xxx to launch an aar generation
with vlc4. it also bumps the docker image to fix some python dependency
> https://code.videolan.org/videolan/vlc-android/commit/c62b9e2571c242213b4f6c3a4249d79e0ddd1c0b
---
buildsystem/compile.sh | 2 +-
buildsystem/gitlab/.gitlab-ci.yml | 99 +++++++++++++++++++++++++++++++++++----
2 files changed, 92 insertions(+), 9 deletions(-)
diff --git a/buildsystem/compile.sh b/buildsystem/compile.sh
index 730138574..83c5a8d69 100755
--- a/buildsystem/compile.sh
+++ b/buildsystem/compile.sh
@@ -259,7 +259,7 @@ fi
if [ "$FORCE_VLC_4" = 1 ]; then
- LIBVLCJNI_TESTED_HASH=93e383fe19c84cfcb5298e69693fc1669735875f
+ LIBVLCJNI_TESTED_HASH=70f51af456cf3ce3d8d0477632306755101de3e2
else
LIBVLCJNI_TESTED_HASH=1a292138d3dd475d4e460b5720f09a4b7b01980a
fi
diff --git a/buildsystem/gitlab/.gitlab-ci.yml b/buildsystem/gitlab/.gitlab-ci.yml
index 6d3c2acc0..85d2fb6c4 100644
--- a/buildsystem/gitlab/.gitlab-ci.yml
+++ b/buildsystem/gitlab/.gitlab-ci.yml
@@ -8,7 +8,7 @@ cache:
default:
interruptible: true
- image: registry.videolan.org/vlc-debian-android:20220224093321
+ image: registry.videolan.org/vlc-debian-android:20220505164734
tags:
- amd64
- docker
@@ -117,6 +117,30 @@ build-ml-x86_64:
variables:
ARCH: x86_64
+build-ml-arm64-v4:
+ extends: .build-ml-base
+ variables:
+ ARCH: arm64
+ EXTRA_BUILD_PARAM: -vlc4
+
+build-ml-armv7-v4:
+ extends: .build-ml-base
+ variables:
+ ARCH: arm
+ EXTRA_BUILD_PARAM: -vlc4
+
+build-ml-x86-v4:
+ extends: .build-ml-base
+ variables:
+ ARCH: x86
+ EXTRA_BUILD_PARAM: -vlc4
+
+build-ml-x86_64-v4:
+ extends: .build-ml-base
+ variables:
+ ARCH: x86_64
+ EXTRA_BUILD_PARAM: -vlc4
+
# Nightly builds: build native & app code, and ship the APK as artifact
nightly-arm64:
extends: .build-all-base
@@ -162,19 +186,32 @@ nightly-x86_64:
- application/app/build/outputs/apk/dev/VLC-Android-*.apk
expire_in: 2 weeks
-.build-release-libs-base:
+.build-libs-base:
rules:
- - if: '$CI_COMMIT_TAG =~ /^libvlc-.*$/'
+ - if: '$CI_COMMIT_TAG =~ /^libvlc-3.*$/'
+ stage: build
+ script:
+ - mkdir -p $M2_REPO
+ - ./buildsystem/compile.sh -l -a ${ARCH} -m2 $M2_REPO release ${EXTRA_BUILD_PARAM}
+ - ./buildsystem/compile.sh -ml -a ${ARCH} -m2 $M2_REPO release -b ${EXTRA_BUILD_PARAM}
+ artifacts:
+ expire_in: 1h
+ when: on_success
+ paths:
+ - $CI_PROJECT_DIR/libvlcjni/libvlc/jni/libs/*
+ - $CI_PROJECT_DIR/medialibrary/jni/libs/*
+ - $CI_PROJECT_DIR/.dbg/*
variables:
M2_REPO: "$CI_PROJECT_DIR/aars/repository"
-.build-libs-base:
- extends: .build-release-libs-base
+.build-libs-base-v4:
+ rules:
+ - if: '$CI_COMMIT_TAG =~ /^libvlc-4.*$/'
stage: build
script:
- mkdir -p $M2_REPO
- - ./buildsystem/compile.sh -l -a ${ARCH} -m2 $M2_REPO release
- - ./buildsystem/compile.sh -ml -a ${ARCH} -m2 $M2_REPO release -b
+ - ./buildsystem/compile.sh -l -a ${ARCH} -m2 $M2_REPO release -vlc4
+ - ./buildsystem/compile.sh -ml -a ${ARCH} -m2 $M2_REPO release -b -vlc4
artifacts:
expire_in: 1h
when: on_success
@@ -182,6 +219,8 @@ nightly-x86_64:
- $CI_PROJECT_DIR/libvlcjni/libvlc/jni/libs/*
- $CI_PROJECT_DIR/medialibrary/jni/libs/*
- $CI_PROJECT_DIR/.dbg/*
+ variables:
+ M2_REPO: "$CI_PROJECT_DIR/aars/repository"
build-libs-arm64:
extends: .build-libs-base
@@ -203,8 +242,32 @@ build-libs-x86_64:
variables:
ARCH: x86_64
+build-libs-arm64-v4:
+ extends: .build-libs-base-v4
+ variables:
+ ARCH: arm64
+ EXTRA_BUILD_PARAM: -vlc4
+
+build-libs-armv7-v4:
+ extends: .build-libs-base-v4
+ variables:
+ ARCH: arm
+ EXTRA_BUILD_PARAM: -vlc4
+
+build-libs-x86-v4:
+ extends: .build-libs-base-v4
+ variables:
+ ARCH: x86
+ EXTRA_BUILD_PARAM: -vlc4
+
+build-libs-x86_64-v4:
+ extends: .build-libs-base-v4
+ variables:
+ ARCH: x86_64
+ EXTRA_BUILD_PARAM: -vlc4
+
publish_libs:
- extends: .build-release-libs-base
+ extends: .build-libs-base
stage: package
needs:
- job: "build-libs-arm64"
@@ -223,6 +286,26 @@ publish_libs:
- $M2_REPO
expire_in: 2 weeks
+publish_libs-v4:
+ extends: .build-libs-base-v4
+ stage: package
+ needs:
+ - job: "build-libs-arm64-v4"
+ - job: "build-libs-armv7-v4"
+ - job: "build-libs-x86-v4"
+ - job: "build-libs-x86_64-v4"
+ script:
+ - mkdir -p $M2_REPO
+ - ./buildsystem/compile.sh --init -b -vlc4
+ - GRADLE_ABI=ALL RELEASE_SIGNING_ENABLED=false ./gradlew -Dmaven.repo.local=$M2_REPO -PforceVlc4=true -p libvlcjni publishToMavenLocal
+ - GRADLE_ABI=ALL RELEASE_SIGNING_ENABLED=false ./gradlew -Dmaven.repo.local=$M2_REPO -PforceVlc4=true -p medialibrary publishToMavenLocal
+ artifacts:
+ name: "${CI_COMMIT_TAG}.dbg"
+ paths:
+ - .dbg/
+ - $M2_REPO
+ expire_in: 2 weeks
+
release:
stage: build
rules:
More information about the Android
mailing list