fix ci cache to speed up building
This commit is contained in:
+13
-6
@@ -6,10 +6,12 @@ build-android:
|
|||||||
mkdir -p ~/.ssh && ssh-keyscan -p 22 -t rsa,ed25519 git.inker.bot >> ~/.ssh/known_hosts
|
mkdir -p ~/.ssh && ssh-keyscan -p 22 -t rsa,ed25519 git.inker.bot >> ~/.ssh/known_hosts
|
||||||
cache:
|
cache:
|
||||||
- paths:
|
- paths:
|
||||||
- $HOME/.gradle
|
- .go/pkg/mod
|
||||||
- $HOME/go
|
- .cache/go-build
|
||||||
- works/core/clients/android/app/build
|
- works/core/clients/android/app/build
|
||||||
- $HOME/Android
|
- Android/
|
||||||
|
- .gradle/caches
|
||||||
|
- .gradle/wrapper
|
||||||
script: |
|
script: |
|
||||||
export version="$(git describe --tags)-$CI_COMMIT_SHORT_SHA" && echo "building version $version"
|
export version="$(git describe --tags)-$CI_COMMIT_SHORT_SHA" && echo "building version $version"
|
||||||
bash ./setup-ndk.sh
|
bash ./setup-ndk.sh
|
||||||
@@ -26,16 +28,21 @@ build-android:
|
|||||||
cp *.aar clients/android/app/libs
|
cp *.aar clients/android/app/libs
|
||||||
cd clients/android
|
cd clients/android
|
||||||
echo "Gonna build with ANDROID_HOME=$ANDROID_HOME"
|
echo "Gonna build with ANDROID_HOME=$ANDROID_HOME"
|
||||||
ANDROID_HOME="$HOME/Android/Sdk" ./gradlew --no-daemon :app:assembleOtherRelease :app:assembleOtherLegacyRelease
|
ANDROID_HOME="$PWD/Android/Sdk" ./gradlew --no-daemon :app:assembleOtherRelease :app:assembleOtherLegacyRelease
|
||||||
cd ../..
|
cd ../..
|
||||||
mkdir -p dist # prepare upload
|
mkdir -p dist # prepare upload
|
||||||
cp clients/android/app/build/outputs/apk/other/release/*.apk dist
|
cp clients/android/app/build/outputs/apk/other/release/*arm64-v8a.apk dist
|
||||||
cp clients/android/app/build/outputs/apk/otherLegacy/release/*.apk dist
|
cp clients/android/app/build/outputs/apk/otherLegacy/release/*arm64-v8a.apk dist
|
||||||
VERSION_CODE=$(grep VERSION_CODE clients/android/version.properties | cut -d= -f2)
|
VERSION_CODE=$(grep VERSION_CODE clients/android/version.properties | cut -d= -f2)
|
||||||
VERSION_NAME=$(grep VERSION_NAME clients/android/version.properties | cut -d= -f2)
|
VERSION_NAME=$(grep VERSION_NAME clients/android/version.properties | cut -d= -f2)
|
||||||
variables:
|
variables:
|
||||||
ANDROID_NDK_VERSION: r28
|
ANDROID_NDK_VERSION: r28
|
||||||
LOCAL_PROPERTIES: "S0VZU1RPUkVfUEFTUz0xMTQ1MTQKQUxJQVNfTkFNRT1hbGlhcwpBTElBU19QQVNTPTExNDUxNAo="
|
LOCAL_PROPERTIES: "S0VZU1RPUkVfUEFTUz0xMTQ1MTQKQUxJQVNfTkFNRT1hbGlhcwpBTElBU19QQVNTPTExNDUxNAo="
|
||||||
|
GOPATH: "$CI_PROJECT_DIR/.go"
|
||||||
|
GOMODCACHE: "$CI_PROJECT_DIR/.go/pkg/mod"
|
||||||
|
GOCACHE: "$CI_PROJECT_DIR/.cache/go-build"
|
||||||
|
GRADLE_USER_HOME: "$CI_PROJECT_DIR/.gradle"
|
||||||
|
|
||||||
artifacts:
|
artifacts:
|
||||||
paths:
|
paths:
|
||||||
- "./works/core/dist"
|
- "./works/core/dist"
|
||||||
|
|||||||
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
export ANDROID_HOME="$HOME/Android/Sdk"
|
export ANDROID_HOME="$PWD/Android/Sdk"
|
||||||
export ANDROID_SDK_ROOT="$ANDROID_HOME"
|
export ANDROID_SDK_ROOT="$ANDROID_HOME"
|
||||||
|
|
||||||
if [ -d "$ANDROID_HOME" ]; then
|
if [ -d "$ANDROID_HOME" ]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user