Commit 1ff95a86 authored by alep's avatar alep

ci: configure Android environment

parent 6b4b70f3
Pipeline #688 failed
stages:
- install
- test
- build
default:
tags:
- shell
variables:
JAVA_HOME: "/Users/alypmustaqim/Library/Java/JavaVirtualMachines/jbr-17.0.14/Contents/Home"
ANDROID_HOME: "/Users/alypmustaqim/Library/Android/sdk"
ANDROID_SDK_ROOT: "/Users/alypmustaqim/Library/Android/sdk"
before_script:
- export PATH="$JAVA_HOME/bin:$ANDROID_HOME/platform-tools:$ANDROID_HOME/emulator:$ANDROID_HOME/cmdline-tools/latest/bin:$PATH"
- echo "Runner user: $(whoami)"
- echo "Architecture: $(uname -m)"
- java -version
- node --version
- yarn --version
cache:
key:
files:
- yarn.lock
paths:
- node_modules/
- .yarn/cache/
- android/.gradle/
- ~/.gradle/caches/
- ~/.gradle/wrapper/
install_dependencies:
stage: install
script:
- yarn install --frozen-lockfile
artifacts:
paths:
- node_modules/
expire_in: 1 hour
lint:
stage: test
needs:
- job: install_dependencies
artifacts: true
script:
- yarn lint
allow_failure: false
test:
stage: test
needs:
- job: install_dependencies
artifacts: true
script:
- yarn test --watchAll=false
allow_failure: false
build_android:
stage: build
needs:
- job: install_dependencies
artifacts: true
script:
- echo "ANDROID_HOME=$ANDROID_HOME"
- which java
- which adb
- which sdkmanager
- sdkmanager --version
- cd android
- chmod +x gradlew
- ./gradlew --version
- ./gradlew clean assembleRelease --stacktrace
artifacts:
name: "android-release-$CI_COMMIT_SHORT_SHA"
paths:
- android/app/build/outputs/apk/release/*.apk
- android/app/build/outputs/mapping/release/mapping.txt
expire_in: 7 days
rules:
- if: '$CI_COMMIT_BRANCH == "main"'
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment