gitlab-ci: replace clbin uploads with GitLab CI Artifacts
This gathers all files that are not tracked by git into a named ZIP file, which is available for 1 week to download from the Pipelines page for the fork that ran the build.
This commit is contained in:
parent
eda48c09c7
commit
69f6560ba8
@ -14,8 +14,22 @@ before_script:
|
||||
- export ANDROID_COMPILE_SDK=`sed -n 's,.*compileSdkVersion\s*\([0-9][0-9]*\).*,\1,p' app/build.gradle`
|
||||
- echo y | android --silent update sdk --no-ui --filter android-${ANDROID_COMPILE_SDK}
|
||||
|
||||
.test-template: &test-template
|
||||
artifacts:
|
||||
name: "${CI_PROJECT_PATH}_${CI_JOB_STAGE}_${CI_COMMIT_REF_NAME}_${CI_COMMIT_SHA}"
|
||||
paths:
|
||||
- logcat.txt
|
||||
- app/build/reports
|
||||
- app/build/outputs/*ml
|
||||
- app/build/outputs/apk
|
||||
expire_in: 1 week
|
||||
when: on_failure
|
||||
after_script:
|
||||
- echo "Download debug artifacts from https://gitlab.com/${CI_PROJECT_PATH}/-/jobs"
|
||||
|
||||
test:
|
||||
stage: test
|
||||
<<: *test-template
|
||||
script:
|
||||
- export EXITVALUE=0
|
||||
- ./tools/check-format-strings.py
|
||||
@ -28,17 +42,12 @@ test:
|
||||
- ./gradlew lint
|
||||
- ./gradlew pmd
|
||||
- ./gradlew checkstyle
|
||||
- ./gradlew test || {
|
||||
for log in app/build/reports/*ests/*/*ml; do
|
||||
echo "read $log here:";
|
||||
(cat "$log" | curl --silent -F 'clbin=<-' https://clbin.com) || true;
|
||||
done;
|
||||
export EXITVALUE=1;
|
||||
}
|
||||
- ./gradlew test || export EXITVALUE=1
|
||||
- exit $EXITVALUE
|
||||
|
||||
connected10:
|
||||
stage: test
|
||||
<<: *test-template
|
||||
variables:
|
||||
AVD_SDK: "10"
|
||||
script:
|
||||
@ -46,23 +55,13 @@ connected10:
|
||||
- emulator64-arm -avd fcl-test-$AVD_SDK -no-skin -no-audio -no-window &
|
||||
- ./tools/wait-for-emulator
|
||||
- adb shell input keyevent 82 &
|
||||
- export EXITVALUE=0
|
||||
- ./gradlew connectedCheck || {
|
||||
adb -e logcat -d '*:E';
|
||||
echo "get the full logcat here:";
|
||||
(adb -e logcat -d | curl --silent -F 'clbin=<-' https://clbin.com) || true;
|
||||
export EXITVALUE=1;
|
||||
}
|
||||
- for log in app/build/reports/*ests/*/*ml
|
||||
app/build/outputs/*results*/connected/*.xml; do
|
||||
echo "read $log here:";
|
||||
(cat "$log" | curl --silent -F 'clbin=<-' https://clbin.com) || true;
|
||||
done
|
||||
- ./gradlew connectedCheck || adb -e logcat -d '*:E' > logcat.txt
|
||||
|
||||
connected24:
|
||||
stage: test
|
||||
variables:
|
||||
AVD_SDK: "24"
|
||||
<<: *test-template
|
||||
script:
|
||||
- ./gradlew assembleDebug
|
||||
- android list avd
|
||||
@ -70,19 +69,7 @@ connected24:
|
||||
- ./tools/wait-for-emulator
|
||||
- adb shell input keyevent 82 &
|
||||
- adb devices
|
||||
- export EXITVALUE=0
|
||||
- ./gradlew connectedCheck || {
|
||||
adb -e logcat -d '*:E';
|
||||
echo "get the full logcat here:";
|
||||
(adb -e logcat -d | curl --silent -F 'clbin=<-' https://clbin.com) || true;
|
||||
export EXITVALUE=1;
|
||||
}
|
||||
- for log in app/build/reports/*ests/*/*ml
|
||||
app/build/outputs/*results*/connected/*.xml; do
|
||||
echo "read $log here:";
|
||||
(cat "$log" | curl --silent -F 'clbin=<-' https://clbin.com) || true;
|
||||
done
|
||||
- exit $EXITVALUE
|
||||
- ./gradlew connectedCheck || adb -e logcat -d '*:E' > logcat.txt
|
||||
|
||||
deploy_nightly:
|
||||
stage: deploy
|
||||
|
Loading…
x
Reference in New Issue
Block a user