[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [orbot/master] update gitlab ci
commit 1cdfb052cecf9cf58892e9f2c58b8479726e9fa4
Author: n8fr8 <nathan@xxxxxxxxxxxxxxxxxxxx>
Date: Wed Aug 7 13:48:16 2019 -0400
update gitlab ci
---
.gitlab-ci.yml | 75 ++++++++++++++++++++++++++--------------------------------
1 file changed, 33 insertions(+), 42 deletions(-)
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 9a09b8b4..6ee99832 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,54 +1,45 @@
-image: registry.gitlab.com/fdroid/ci-images-client:latest
+image: openjdk:8-jdk
-cache:
- paths:
- - .gradle/wrapper
- - .gradle/caches
+variables:
+ ANDROID_COMPILE_SDK: "28"
+ ANDROID_BUILD_TOOLS: "28.0.2"
+ ANDROID_SDK_TOOLS: "4333796"
+
+before_script:
+ - apt-get --quiet update --yes
+ - apt-get --quiet install --yes wget tar unzip lib32stdc++6 lib32z1
+ - wget --quiet --output-document=android-sdk.zip https://dl.google.com/android/repository/sdk-tools-linux-${ANDROID_SDK_TOOLS}.zip
+ - unzip -d android-sdk-linux android-sdk.zip
+ - echo y | android-sdk-linux/tools/bin/sdkmanager "platforms;android-${ANDROID_COMPILE_SDK}" >/dev/null
+ - echo y | android-sdk-linux/tools/bin/sdkmanager "platform-tools" >/dev/null
+ - echo y | android-sdk-linux/tools/bin/sdkmanager "build-tools;${ANDROID_BUILD_TOOLS}" >/dev/null
+ - export ANDROID_HOME=$PWD/android-sdk-linux
+ - export PATH=$PATH:$PWD/android-sdk-linux/platform-tools/
+ - chmod +x ./gradlew
+ # temporarily disable checking for EPIPE error and use yes to accept all licenses
+ - set +o pipefail
+ - yes | android-sdk-linux/tools/bin/sdkmanager --licenses
+ - set -o pipefail
stages:
+ - build
- test
- - deploy
-before_script:
- - export GRADLE_USER_HOME=$PWD/.gradle
- - export ANDROID_COMPILE_SDK=`sed -n 's,.*compileSdkVersion\s*\([0-9][0-9]*\).*,\1,p' app/build.gradle`
- - alias sdkmanager="sdkmanager --no_https"
- - echo y | sdkmanager
- "platforms;android-${ANDROID_COMPILE_SDK}"
- "$(sed -nE 's,.*buildToolsVersion *.([0-9.]+).*,build-tools;\1,p' app/build.gradle)"
- "build-tools;23.0.3" > /dev/null
+#lintDebug:
+# stage: build
+# script:
+# - ./gradlew -Pci --console=plain :app:lintDebug -PbuildDir=lint
-.test-template: &test-template
+assembleDebug:
+ stage: build
+ script:
+ - ./gradlew assembleDebug
artifacts:
- name: "${CI_PROJECT_PATH}_${CI_JOB_STAGE}_${CI_COMMIT_REF_NAME}_${CI_COMMIT_SHA}"
paths:
- - "logcat.txt"
- - "*/build/reports"
- - "*/build/outputs/*ml"
- - "*/build/outputs/apk"
- expire_in: 1 week
- when: on_failure
- after_script:
- - echo "Download debug artifacts from https://gitlab.com/${CI_PROJECT_PATH}/-/jobs"
-
-# Run the most important first. Then we can decide whether to ignore
-# the style tests if the rest of the more meaningful tests pass.
-test:
- stage: test
- <<: *test-template
- script:
- # print lint errors/warnings to build log
- - sed -i 's,\s*textReport .*,\ttextReport true,g' */build.gradle
- # 'assemble' everything and run all checks that do not require a device/emulator
- - ./gradlew build -PdisablePreDex
+ - app/build/outputs/
-errorprone:
+debugTests:
stage: test
script:
- - for f in */build.gradle; do cat tools/errorprone.gradle >> $f; done
- - ./gradlew assembleDebug -PdisablePreDex
+ - ./gradlew -Pci --console=plain :app:testReleaseflavorDebugUnitTest
-after_script:
- # this file changes every time but should not be cached
- - rm -f $GRADLE_USER_HOME/caches/modules-2/modules-2.lock
- - rm -fr $GRADLE_USER_HOME/caches/*/plugin-resolution/
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits