From 57094d6cceb88ac6a4371b93dab7cb0e840c704a Mon Sep 17 00:00:00 2001 From: Sylvain Berfini Date: Tue, 3 Oct 2023 14:28:38 +0200 Subject: [PATCH] Added CI --- .gitlab-ci-files/job-android.yml | 27 +++++++++++++++++++++++++++ .gitlab-ci.yml | 18 ++++++++++++++++++ 2 files changed, 45 insertions(+) create mode 100644 .gitlab-ci-files/job-android.yml create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci-files/job-android.yml b/.gitlab-ci-files/job-android.yml new file mode 100644 index 000000000..73aa87adb --- /dev/null +++ b/.gitlab-ci-files/job-android.yml @@ -0,0 +1,27 @@ +job-android: + + stage: build + tags: [ "docker-android" ] + image: gitlab.linphone.org:4567/bc/public/linphone-android/bc-dev-android:20230414_bullseye_jdk_17_cleaned + + before_script: + - if ! [ -z ${SCP_PRIVATE_KEY+x} ]; then eval $(ssh-agent -s); fi + - if ! [ -z ${SCP_PRIVATE_KEY+x} ]; then echo "$SCP_PRIVATE_KEY" | tr -d '\r' | ssh-add - > /dev/null; fi + - if ! [ -z ${ANDROID_SETTINGS_GRADLE+x} ]; then echo "$ANDROID_SETTINGS_GRADLE" > settings.gradle; fi + - git config --global --add safe.directory /builds/BC/public/linphone-android + + script: + - ./gradlew app:dependencies | grep org.linphone + - ./gradlew assembleDebug + + artifacts: + paths: + - ./app/build/outputs/apk/debug/linphone-android-debug-*.apk + when: always + expire_in: 1 week + + +.scheduled-job-android: + extends: job-android + only: + - schedules diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 000000000..ae36cb70b --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,18 @@ +################################################# +# Base configuration +################################################# + + + +################################################# +# Platforms to test +################################################# + + +include: + - '.gitlab-ci-files/job-android.yml' + + +stages: + - build + - deploy