forked from breadwallet/brd-mobile
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
152 lines (142 loc) · 4 KB
/
.gitlab-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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
stages:
- build
- deploy
#include:
# - template: Managed-Cluster-Applications.gitlab-ci.yml
default:
# image: alvrme/alpine-android:android-29-jdk11
tags:
- macos
before_script:
- git submodule update --init --checkout
variables:
ANDROID_SDK_ROOT: /Users/builder/Library/Android/sdk
SIGNING_KEY: /builds/breadwallet/brd-mobile/brd-android/FakeSigningKey
SIGNING_PASSWORD: qwerty
SIGNING_ALIAS: key0
SIGNING_ALIAS_PASSWORD: qwerty
ORG_GRADLE_DAEMON: "false"
ORG_GRADLE_DEPENDENCY_VERIFICATION: "off"
ORG_GRADLE_CONSOLE: plain
GIT_SUBMODULE_STRATEGY: recursive
GIT_STRATEGY: clone
cache:
key: ${CI_PROJECT_ID}-3
paths:
- ~/.gradle/
- /root/.gradle/
build-cosmos:
stage: build
script:
- ./gradlew allTest --no-daemon
only:
refs:
- main
- develop
- merge_requests
changes:
- buildSrc/**/Libs.kt
- cosmos-*/**/*
- .gitlab-ci.yml
artifacts:
when: on_failure
paths:
- ./**/build/reports/tests
build-android:
stage: build
script:
- ./gradlew :brd-android:app:build -xlint -xdetekt --no-daemon
only:
refs:
- main
- develop
- merge_requests
changes:
- buildSrc/**/Libs.kt
- brd-android/**/*
- cosmos-*/**/*
- .gitlab-ci.yml
artifacts:
paths:
- brd-android/app/build/outputs/apk/brd/debug/
- brd-android/app/build/outputs/apk/brd/release/
- brd-android/app/build/outputs/apk/brdTestnet/debug/
- brd-android/app/build/outputs/apk/brdTestnet/release/
reports:
junit: ./brd-android/**/build/test-results/**/TEST-*.xml
build-ios:
stage: build
only:
refs:
- main
- develop
- merge_requests
changes:
- buildSrc/**/Libs.kt
- brd-ios/**/*
- cosmos-*/**/*
- .gitlab-ci.yml
script:
- ./gradlew :cosmos-bundled:createXCFramework
- xcodebuild clean -workspace brd-ios/breadwallet.xcworkspace -scheme breadwallet | xcpretty
- xcodebuild test -workspace brd-ios/breadwallet.xcworkspace -scheme breadwallet -destination 'platform=iOS Simulator,name=iPhone 12,OS=14.5' | xcpretty -s
tags:
- macos
deploy-appetize:
stage: deploy
needs: [ "build-android" ]
script:
- ./gradlew appetizeUpload
only:
refs:
- merge_requests
changes:
- buildSrc/**/Libs.kt
- brd-android/**/*
- cosmos-*/**/*
- .gitlab-ci.yml
environment:
name: Review $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME
url: $NATIVE_REVIEW_URL?versionName=$CI_MERGE_REQUEST_SOURCE_BRANCH_NAME
on_stop: stop-review
stop-review:
stage: deploy
needs: [ "build-android" ]
variables:
GIT_SUBMODULE_STRATEGY: none
script:
- cd $CI_PROJECT_DIR; ./gradlew appetizeRemove -Pmerge=$CI_MERGE_REQUEST_SOURCE_BRANCH_NAME
when: manual
only:
refs:
- merge_requests
changes:
- buildSrc/**/Libs.kt
- brd-android/**/*
- cosmos-*/**/*
- .gitlab-ci.yml
environment:
name: Review $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME
action: stop
deploy-firebase:
stage: deploy
variables:
ORG_GRADLE_DEPENDENCY_VERIFICATION: "off"
script:
- ./gradlew :brd-android:app:assemble
- ./gradlew :brd-android:app:appDistributionUploadBrdRelease
- ./gradlew :brd-android:app:uploadCrashlyticsSymbolFileBrdRelease
- ./gradlew :brd-android:app:appDistributionUploadBrdTestnetRelease
- ./gradlew :brd-android:app:uploadCrashlyticsSymbolFileBrdTestnetRelease
- ./gradlew :brd-android:app:appDistributionUploadBrdDebug
- ./gradlew :brd-android:app:uploadCrashlyticsSymbolFileBrdDebug
- ./gradlew :brd-android:app:appDistributionUploadBrdTestnetDebug
- ./gradlew :brd-android:app:uploadCrashlyticsSymbolFileBrdTestnetDebug
rules:
- if: '$CI_COMMIT_TAG != null && $CI_COMMIT_TAG =~ /^android/'
artifacts:
paths:
- brd-android/app/build/outputs/apk/brd/debug/
- brd-android/app/build/outputs/apk/brd/release/
- brd-android/app/build/outputs/apk/brdTestnet/debug/
- brd-android/app/build/outputs/apk/brdTestnet/release/