forked from Tencent/Shadow
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.orange-ci.yml
54 lines (52 loc) · 2.07 KB
/
.orange-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
'**':
push:
- network: idc-kvm
docker:
kvm: true
image: dockerimage.isd.com/android-build/shadow-build-cache:latest
stages:
- name: 构建全部SDK模块
script: ./gradlew buildSdk
- name: Lint全部SDK模块
script: ./gradlew lintSdk
- name: 构建Test模块
script: ./gradlew :test-dynamic-host:assemble :test-none-dynamic-host:assemble
- name: 确定虚拟机端口号
script: echo -n `bash /opt/tools/get-free-port-for-emulator.sh`
envExport:
stdout: EMULATOR_PORT
- name: 启动虚拟机
script: $ANDROID_HOME/tools/emulator -avd test -no-audio -no-window -port $EMULATOR_PORT
daemon: true
- name: 等待虚拟机
script: /opt/tools/android-wait-for-emulator.sh
- name: 测试SDK
script: ANDROID_SERIAL=emulator-$EMULATOR_PORT ./gradlew testSdk
- name: 发布SNAPSHOT版到maven.oa.com
script: ./gradlew publish
merge_request:
- network: idc-kvm
needGit: true
docker:
kvm: true
image: dockerimage.isd.com/android-build/shadow-build-cache:latest
stages:
- name: 打印merge信息,记录目标分支版本
script: echo `git show --pretty="HEAD:%H parents:%P" HEAD`
- name: 构建全部SDK模块
script: ./gradlew buildSdk
- name: Lint全部SDK模块
script: ./gradlew lintSdk
- name: 构建Test模块
script: ./gradlew :test-dynamic-host:assemble :test-none-dynamic-host:assemble
- name: 确定虚拟机端口号
script: echo -n `bash /opt/tools/get-free-port-for-emulator.sh`
envExport:
stdout: EMULATOR_PORT
- name: 启动虚拟机
script: $ANDROID_HOME/tools/emulator -avd test -no-audio -no-window -port $EMULATOR_PORT
daemon: true
- name: 等待虚拟机
script: /opt/tools/android-wait-for-emulator.sh
- name: 测试SDK
script: ANDROID_SERIAL=emulator-$EMULATOR_PORT ./gradlew testSdk