提交 a7ba4541 创建 作者: 宋海霞's avatar 宋海霞

更新 .gitlab-ci.yml

上级 bd12196a
流水线 #118835 已失败 于阶段
用时 5 分 31 秒
#image: openjdk:8-jdk image: "android-container:8.2"
#image: "registry.cn-hangzhou.aliyuncs.com/engintime/ubuntu_16.04_program:latest"
image: "android-container:7.3"
variables: variables:
ANDROID_COMPILE_SDK: "25" # ANDROID_COMPILE_SDK: "25"
ANDROID_BUILD_TOOLS: "24.0.0" # ANDROID_BUILD_TOOLS: "24.0.0"
ANDROID_SDK_TOOLS: "24.4.1" # ANDROID_SDK_TOOLS: "24.4.1"
before_script: before_script:
# - apt-get --quiet update --yes
# - apt-get --quiet install --yes wget tar unzip lib32stdc++6 lib32z1
# - wget --quiet --output-document=android-sdk.tgz https://dl.google.com/android/android-sdk_r${ANDROID_SDK_TOOLS}-linux.tgz
# - tar --extract --gzip --file=android-sdk.tgz
# - echo y | android-sdk-linux/tools/android --silent update sdk --no-ui --all --filter android-${ANDROID_COMPILE_SDK}
# - echo y | android-sdk-linux/tools/android --silent update sdk --no-ui --all --filter platform-tools
# - echo y | android-sdk-linux/tools/android --silent update sdk --no-ui --all --filter build-tools-${ANDROID_BUILD_TOOLS}
# - echo y | android-sdk-linux/tools/android --silent update sdk --no-ui --all --filter extra-android-m2repository
# - echo y | android-sdk-linux/tools/android --silent update sdk --no-ui --all --filter extra-google-google_play_services
# - echo y | android-sdk-linux/tools/android --silent update sdk --no-ui --all --filter extra-google-m2repository
# - export ANDROID_HOME=$PWD/android-sdk-linux
# - export PATH=$PATH:$PWD/android-sdk-linux/platform-tools/
- chmod +x ./gradlew - chmod +x ./gradlew
- chmod +x ./android-wait-for-emulator.sh - chmod +x ./android-wait-for-emulator.sh
...@@ -39,17 +25,16 @@ build: ...@@ -39,17 +25,16 @@ build:
stage: build stage: build
<<: *codecode-runner <<: *codecode-runner
script: script:
- ./gradlew clean assembleDebug - ls /cache/wrapper/dists/gradle-6.6-all/dm6whvs5m6hlkbnc6ae2jubui
- echo "no" | avdmanager --verbose create avd --force --name "test" --device "pixel" --package "system-images;android-30;google_apis;x86" - export
- emulator -avd "test" -verbose -no-boot-anim -no-window -gpu swiftshader_indirect -accel on & - ./gradlew assembleDebug --offline
- avdmanager --verbose create avd --force --name "test" --device "pixel" --package "system-images;android-30;google_apis;x86"
- emulator -memory 4096 -timezone Asia/Shang_Hai -avd "test" -no-boot-anim -no-window -gpu swiftshader_indirect -accel on -noaudio -no-snapshot-save -dns-server 8.8.8.8,8.8.4.4 -netfast -nojni &
- ./android-wait-for-emulator.sh - ./android-wait-for-emulator.sh
- adb install /builds/engintime-cs/teacher-group/shx/androidTest/MySecondApp/app/build/outputs/apk/debug/app-debug.apk - ./gradlew cAT --offline
- adb shell am instrument -w -r -e debug false -e class 'com.example.mysecondapp.ExampleKotlinTest' com.example.mysecondapp.test/android.support.test.runner.AndroidJUnitRunner
# - adb shell am instrument -w -r -e debug false -e class 'com.example.mysecondapp.ExampleKotlinTest' com.example.mysecondapp.test/androidx.test.runner.AndroidJUnitRunner
# - ./gradlew cAT
# - cd ./app/build/outputs/apk/debug
# -
artifacts: artifacts:
paths: paths:
- app/build/reports/androidTests/ - app/build/reports/androidTests/
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论