Try switching CI backend
This commit is contained in:
parent
f1be5733e0
commit
cfdc040e6a
|
@ -1,11 +1,4 @@
|
||||||
image: reactivecircus/android-emulator-23:latest
|
image: registry.gitlab.com/fdroid/ci-images-client
|
||||||
|
|
||||||
|
|
||||||
variables:
|
|
||||||
API_LEVEL: "23"
|
|
||||||
ARCH: "x86"
|
|
||||||
TARGET: "default"
|
|
||||||
|
|
||||||
|
|
||||||
before_script:
|
before_script:
|
||||||
- export GRADLE_USER_HOME=`pwd`/.gradle
|
- export GRADLE_USER_HOME=`pwd`/.gradle
|
||||||
|
@ -21,6 +14,9 @@ lintDebug:
|
||||||
interruptible: true
|
interruptible: true
|
||||||
stage: build
|
stage: build
|
||||||
script:
|
script:
|
||||||
|
- apt-get update || apt-get update
|
||||||
|
- apt-get install -y openjdk-11-jdk-headless
|
||||||
|
- update-alternatives --auto java
|
||||||
- ./gradlew checkLicenses
|
- ./gradlew checkLicenses
|
||||||
- ./gradlew -Pci --console=plain :app:lintDebug -PbuildDir=lint
|
- ./gradlew -Pci --console=plain :app:lintDebug -PbuildDir=lint
|
||||||
|
|
||||||
|
@ -28,47 +24,53 @@ lintDebug:
|
||||||
assembleDebug:
|
assembleDebug:
|
||||||
interruptible: true
|
interruptible: true
|
||||||
stage: build
|
stage: build
|
||||||
|
tags:
|
||||||
|
- server_artectrex
|
||||||
script:
|
script:
|
||||||
|
- apt-get update || apt-get update
|
||||||
|
- apt-get install -y openjdk-11-jdk-headless
|
||||||
|
- update-alternatives --auto java
|
||||||
- ./gradlew assembleDebug
|
- ./gradlew assembleDebug
|
||||||
artifacts:
|
artifacts:
|
||||||
paths:
|
paths:
|
||||||
- app/build/outputs/
|
- app/build/outputs/
|
||||||
|
|
||||||
# Run all tests, if any fails, interrupt the pipeline(fail it)
|
# Run all tests, if any fails, interrupt the pipeline (fail it)
|
||||||
debugTests:
|
debugTests:
|
||||||
interruptible: true
|
interruptible: true
|
||||||
stage: test
|
stage: test
|
||||||
script:
|
script:
|
||||||
|
- apt-get update || apt-get update
|
||||||
|
- apt-get install -y openjdk-11-jdk-headless
|
||||||
|
- update-alternatives --auto java
|
||||||
- ./gradlew -Pci --console=plain :app:testDebug -x lint
|
- ./gradlew -Pci --console=plain :app:testDebug -x lint
|
||||||
|
|
||||||
|
.connected-template: &connected-template
|
||||||
|
stage: test
|
||||||
|
image: registry.gitlab.com/fdroid/ci-images-client
|
||||||
|
script:
|
||||||
|
- start-emulator
|
||||||
|
- wait-for-emulator
|
||||||
|
- adb devices
|
||||||
|
- adb shell input keyevent 82 &
|
||||||
|
# Switch to right java version for building the app
|
||||||
|
- apt-get update || apt-get update
|
||||||
|
- apt-get install -y openjdk-11-jdk-headless
|
||||||
|
- update-alternatives --auto java
|
||||||
|
- ./gradlew connectedStagingAndroidTest || (adb -e logcat -d > logcat.txt; exit 1)
|
||||||
|
artifacts:
|
||||||
|
paths:
|
||||||
|
- logcat.txt
|
||||||
|
|
||||||
emulatorTest:
|
connected 24 default x86_64:
|
||||||
interruptible: true
|
<<: *connected-template
|
||||||
stage: test
|
|
||||||
script:
|
|
||||||
- echo no | avdmanager create avd --force --name "api-${API_LEVEL}" --abi "${TARGET}/${ARCH}" --package "system-images;android-${API_LEVEL};${TARGET};${ARCH}"
|
|
||||||
- $ANDROID_SDK_ROOT/emulator/emulator -avd "api-${API_LEVEL}" -no-window -gpu swiftshader_indirect -no-snapshot -noaudio -no-boot-anim -camera-back none &
|
|
||||||
- chmod +x android-wait-for-emulator.sh
|
|
||||||
- ./gradlew build -x lint
|
|
||||||
- ./android-wait-for-emulator.sh
|
|
||||||
- adb shell settings put global window_animation_scale 0.0
|
|
||||||
- adb shell settings put global transition_animation_scale 0.0
|
|
||||||
- adb shell settings put global animator_duration_scale 0.0
|
|
||||||
|
|
||||||
- ./gradlew build connectedCheck connectedStagingAndroidTest jacocoTestReport -x lint
|
|
||||||
|
|
||||||
- cat app/build/reports/jacoco/jacocoTestReport/html/index.html | grep -o 'Total[^%]*%'
|
|
||||||
|
|
||||||
artifacts:
|
|
||||||
when: always
|
|
||||||
paths:
|
|
||||||
- ./app/build/reports/jacoco/jacocoTestReport/
|
|
||||||
expire_in: 1 week
|
|
||||||
|
|
||||||
|
|
||||||
fdroid build:
|
fdroid build:
|
||||||
|
stage: build
|
||||||
image: registry.gitlab.com/fdroid/ci-images-client:latest
|
image: registry.gitlab.com/fdroid/ci-images-client:latest
|
||||||
allow_failure: true
|
allow_failure: true
|
||||||
|
tags:
|
||||||
|
- server_artectrex
|
||||||
artifacts:
|
artifacts:
|
||||||
paths:
|
paths:
|
||||||
- signed/
|
- signed/
|
||||||
|
@ -98,6 +100,7 @@ fdroid build:
|
||||||
- ln -s $CI_PROJECT_DIR/fdroidserver /home/vagrant/fdroidserver
|
- ln -s $CI_PROJECT_DIR/fdroidserver /home/vagrant/fdroidserver
|
||||||
- mkdir -p /vagrant/cache
|
- mkdir -p /vagrant/cache
|
||||||
- wget -q https://services.gradle.org/distributions/gradle-5.6.2-bin.zip --output-document=/vagrant/cache/gradle-5.6.2-bin.zip
|
- wget -q https://services.gradle.org/distributions/gradle-5.6.2-bin.zip --output-document=/vagrant/cache/gradle-5.6.2-bin.zip
|
||||||
|
# Check sha256 of the gralde build
|
||||||
- echo '32fce6628848f799b0ad3205ae8db67d0d828c10ffe62b748a7c0d9f4a5d9ee0 /vagrant/cache/gradle-5.6.2-bin.zip' | sha256sum -c
|
- echo '32fce6628848f799b0ad3205ae8db67d0d828c10ffe62b748a7c0d9f4a5d9ee0 /vagrant/cache/gradle-5.6.2-bin.zip' | sha256sum -c
|
||||||
- bash fdroidserver/buildserver/provision-gradle
|
- bash fdroidserver/buildserver/provision-gradle
|
||||||
- bash fdroidserver/buildserver/provision-apt-get-install https://deb.debian.org/debian
|
- bash fdroidserver/buildserver/provision-apt-get-install https://deb.debian.org/debian
|
||||||
|
|
Loading…
Reference in New Issue