Skip to content

Commit

Permalink
Fix Cirrus configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
stevesoltys committed Sep 12, 2023
1 parent 74cc453 commit fbff5ff
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,7 @@ check_android_task:
./gradlew assembleDebugAndroidTest
wait_for_avd_script:
adb wait-for-device shell 'while [[ -z $(getprop sys.boot_completed) ]]; do sleep 3; done; input keyevent 82'
install_app:
wget --output-document etar.apk https://f-droid.org/repo/ws.xsoh.etar_35.apk
adb install etar.apk
check_script: ./gradlew connectedAndroidTest
2 changes: 1 addition & 1 deletion app/development/scripts/provision_emulator.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ if $ANDROID_SDK_HOME/cmdline-tools/latest/bin/avdmanager list avd | grep -q "$EM
echo "AVD already exists. Skipping creation."
else
echo "Creating AVD..."
echo 'no' | $ANDROID_SDK_HOME/cmdline-tools/latest/bin/avdmanager create avd -n "$EMULATOR_NAME" -k "$SYSTEM_IMAGE"
echo 'no' | $ANDROID_SDK_HOME/cmdline-tools/latest/bin/avdmanager create avd --force -n "$EMULATOR_NAME" -k "$SYSTEM_IMAGE"
sleep 1
fi

Expand Down
1 change: 1 addition & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ android.enableJetifier=false
kotlin.code.style=official
android.nonTransitiveRClass=false
android.enableR8.fullMode=false
org.gradle.caching=true
15 changes: 15 additions & 0 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,18 @@ include ':app'
include ':contactsbackup'
include ':storage:lib'
include ':storage:demo'

ext.isCiServer = System.getenv().containsKey("CIRRUS_CI")
ext.isMasterBranch = System.getenv()["CIRRUS_BRANCH"] == "master"
ext.buildCacheHost = System.getenv().getOrDefault("CIRRUS_HTTP_CACHE_HOST", "localhost:12321")

buildCache {
local {
enabled = !isCiServer
}
remote(HttpBuildCache) {
url = "http://${buildCacheHost}/"
enabled = isCiServer
push = isMasterBranch
}
}

0 comments on commit fbff5ff

Please sign in to comment.