Skip to content

Commit 836ca63

Browse files
author
Bastien Riviere
committed
Merge branch 'baba/refactor-rust' into 'master'
refactor: import rust.yml from gitlab-ci-files See merge request TankerHQ/sdk-rust!68
2 parents f7f0cd0 + 596428f commit 836ca63

File tree

1 file changed

+84
-23
lines changed

1 file changed

+84
-23
lines changed

.gitlab-ci.yml

Lines changed: 84 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,59 +1,116 @@
11
include:
22
project: TankerHQ/gitlab-ci-files
3-
file: /rust.yml
3+
file: /common.yml
44
ref: 2021-10-04-177
55

6+
############
7+
# Workflow #
8+
############
9+
10+
workflow:
11+
rules:
12+
# web pipelines for releases only
13+
- if: $CI_PIPELINE_SOURCE == "web" && ($SDK_RUST_RELEASE_VERSION !~ /\A\d+\.\d+\.\d+(-(alpha|beta)\d+)?\z/ || $SDK_RUST_CARGO_REGISTRY !~ /\A(tanker|tanker-dev)\z/)
14+
when: never
15+
# forbid stable releases on registry tanker-dev
16+
- if: $CI_PIPELINE_SOURCE == "web" && ($SDK_RUST_RELEASE_VERSION =~ /\A\d+\.\d+\.\d+\z/ && $SDK_RUST_CARGO_REGISTRY != "tanker")
17+
when: never
18+
- if: !reference [.if-invalid-native-conan-reference, if]
19+
when: never
20+
# allow everything else
21+
- when: always
22+
23+
###########
24+
# Default #
25+
###########
26+
27+
default:
28+
before_script:
29+
- poetry run python -m pip install --upgrade pip
30+
- poetry install
31+
image: registry.gitlab.com/tankerhq/docker/sdk-rust:latest
32+
33+
##########
34+
# Stages #
35+
##########
36+
37+
stages:
38+
- check
39+
- deploy
40+
41+
#############################
42+
# Default settings override #
43+
#############################
44+
45+
.before-script/download-artifacts:
46+
before_script:
47+
- poetry run python -m pip install --upgrade pip
48+
- poetry install
49+
- poetry run python run-ci.py download-artifacts --project-id=$UPSTREAM_PROJECT_ID --pipeline-id=$UPSTREAM_PIPELINE_ID --job-name=$UPSTREAM_JOB_NAME
50+
- poetry run python run-ci.py reset-branch $(cat branch_name.txt)
51+
- poetry run python -m pip install --upgrade pip
52+
- poetry install
53+
54+
#################
55+
# Extend blocks #
56+
#################
57+
58+
.release-artifacts:
59+
artifacts:
60+
paths:
61+
- native/
62+
663
check/native-from-sources/linux:
64+
stage: check
765
extends:
8-
- .check
966
- .tags/linux
1067
- .rules/native-from-sources
1168
script:
1269
- poetry run python run-ci.py --isolate-conan-user-home build-and-test --use-tanker=same-as-branch --profile linux-release
1370

1471
check/native-from-sources/windows:
72+
stage: check
1573
extends:
16-
- .check
1774
- .tags/windows
1875
- .rules/native-from-sources
1976
script:
2077
- poetry run python run-ci.py --isolate-conan-user-home build-and-test --use-tanker=same-as-branch --profile vs2019-release-shared
2178

2279
check/native-from-sources/android:
80+
stage: check
2381
extends:
24-
- .check
2582
- .tags/linux
2683
- .rules/native-from-sources
2784
script:
2885
- poetry run python run-ci.py --isolate-conan-user-home build-and-test --use-tanker=same-as-branch --profile android-armv8-release-static-http_backend --profile android-x86_64-release-static-http_backend --profile android-x86-release-static-http_backend --profile android-armv7-release-static-http_backend
2986

3087
check/native-from-sources/macos/x86_64:
88+
stage: check
3189
extends:
32-
- .check
3390
- .tags/macos/x86_64
3491
- .rules/native-from-sources
3592
script:
3693
- poetry run python run-ci.py --isolate-conan-user-home build-and-test --use-tanker=same-as-branch --profile macos-x86_64-release
3794

3895
check/native-from-sources/macos/arm:
96+
stage: check
3997
extends:
40-
- .check
4198
- .tags/macos/arm
4299
- .rules/native-from-sources
43100
script:
44101
- poetry run python run-ci.py --isolate-conan-user-home build-and-test --use-tanker=same-as-branch --profile macos-armv8-release
45102

46103
check/native-from-sources/ios/x86_64:
104+
stage: check
47105
extends:
48-
- .check
49106
- .tags/macos/x86_64
50107
- .rules/native-from-sources
51108
script:
52109
- poetry run python run-ci.py --isolate-conan-user-home build-and-test --use-tanker=same-as-branch --profile ios-armv8-release-http_backend --profile ios-simulator-x86_64-release-http_backend
53110

54111
check/native-from-sources/ios/arm:
112+
stage: check
55113
extends:
56-
- .check
57114
- .tags/macos/arm
58115
- .rules/native-from-sources
59116
script:
@@ -66,134 +123,138 @@ check/native-from-sources/ios/arm:
66123
- !reference [.rules/deploy-pipeline, rules]
67124

68125
check/deployed-native/linux:
126+
stage: check
69127
extends:
70-
- .check
71128
- .tags/linux
72129
- .rules/check/deployed-native
73130
- .release-artifacts
74131
script:
75132
- poetry run python run-ci.py --isolate-conan-user-home build-and-test --use-tanker=deployed --tanker-ref=$SDK_NATIVE_LATEST_CONAN_REFERENCE --profile linux-release
76133

77134
check/deployed-native/windows:
135+
stage: check
78136
extends:
79-
- .check
80137
- .tags/windows
81138
- .rules/check/deployed-native
82139
- .release-artifacts
83140
script:
84141
- poetry run python run-ci.py --isolate-conan-user-home build-and-test --use-tanker=deployed --tanker-ref=$SDK_NATIVE_LATEST_CONAN_REFERENCE --profile vs2019-release-shared
85142

86143
check/deployed-native/android:
144+
stage: check
87145
extends:
88-
- .check
89146
- .tags/linux
90147
- .rules/check/deployed-native
91148
- .release-artifacts
92149
script:
93150
- poetry run python run-ci.py --isolate-conan-user-home build-and-test --use-tanker=deployed --tanker-ref=$SDK_NATIVE_LATEST_CONAN_REFERENCE --profile android-armv8-release-static-http_backend --profile android-x86_64-release-static-http_backend --profile android-x86-release-static-http_backend --profile android-armv7-release-static-http_backend
94151

95152
check/deployed-native/macos/x86_64:
153+
stage: check
96154
extends:
97-
- .check
98155
- .tags/macos/x86_64
99156
- .rules/check/deployed-native
100157
- .release-artifacts
101158
script:
102159
- poetry run python run-ci.py --isolate-conan-user-home build-and-test --use-tanker=deployed --tanker-ref=$SDK_NATIVE_LATEST_CONAN_REFERENCE --profile macos-x86_64-release
103160

104161
check/deployed-native/macos/arm:
162+
stage: check
105163
extends:
106-
- .check
107164
- .tags/macos/arm
108165
- .rules/check/deployed-native
109166
- .release-artifacts
110167
script:
111168
- poetry run python run-ci.py --isolate-conan-user-home build-and-test --use-tanker=deployed --tanker-ref=$SDK_NATIVE_LATEST_CONAN_REFERENCE --profile macos-armv8-release
112169

113170
check/deployed-native/ios/x86_64:
171+
stage: check
114172
extends:
115-
- .check
116173
- .tags/macos/x86_64
117174
- .rules/check/deployed-native
118175
- .release-artifacts
119176
script:
120177
- poetry run python run-ci.py --isolate-conan-user-home build-and-test --use-tanker=deployed --tanker-ref=$SDK_NATIVE_LATEST_CONAN_REFERENCE --profile ios-armv8-release-http_backend --profile ios-simulator-x86_64-release-http_backend
121178

122179
check/deployed-native/ios/arm:
180+
stage: check
123181
extends:
124-
- .check
125182
- .tags/macos/arm
126183
- .rules/check/deployed-native
127184
- .release-artifacts
128185
script:
129186
- poetry run python run-ci.py --isolate-conan-user-home build-and-test --use-tanker=deployed --tanker-ref=$SDK_NATIVE_LATEST_CONAN_REFERENCE --profile ios-armv8-release-http_backend --profile ios-simulator-armv8-release-http_backend
130187

131188
check/downstream/linux:
189+
stage: check
132190
extends:
133-
- .check
134191
- .tags/linux
135192
- .rules/check/downstream/linux
136193
- .before-script/download-artifacts
137194
script:
138195
- poetry run python run-ci.py --isolate-conan-user-home build-and-test --use-tanker=upstream --profile linux-release
139196

140197
check/downstream/windows:
198+
stage: check
141199
extends:
142-
- .check
143200
- .tags/windows
144201
- .rules/check/downstream/windows
145202
- .before-script/download-artifacts
146203
script:
147204
- poetry run python run-ci.py --isolate-conan-user-home build-and-test --use-tanker=upstream --profile vs2019-release-shared
148205

149206
check/downstream/android:
207+
stage: check
150208
extends:
151-
- .check
152209
- .tags/linux
153210
- .rules/check/downstream/android
154211
- .before-script/download-artifacts
155212
script:
156213
- poetry run python run-ci.py --isolate-conan-user-home build-and-test --use-tanker=upstream --profile android-armv8-release-static-http_backend --profile android-x86_64-release-static-http_backend --profile android-x86-release-static-http_backend --profile android-armv7-release-static-http_backend
157214

158215
check/downstream/ios/x86_64:
216+
stage: check
159217
extends:
160-
- .check
161218
- .tags/macos/x86_64
162219
- .rules/check/downstream/ios
163220
- .before-script/download-artifacts
164221
script:
165222
- poetry run python run-ci.py --isolate-conan-user-home build-and-test --use-tanker=upstream --profile ios-armv8-release-http_backend --profile ios-simulator-x86_64-release-http_backend
166223

167224
check/downstream/ios/arm:
225+
stage: check
168226
extends:
169-
- .check
170227
- .tags/macos/arm
171228
- .rules/check/downstream/ios
172229
- .before-script/download-artifacts
173230
script:
174231
- poetry run python run-ci.py --isolate-conan-user-home build-and-test --use-tanker=upstream --profile ios-armv8-release-http_backend --profile ios-simulator-armv8-release-http_backend
175232

176233
check/downstream/macos/x86_64:
234+
stage: check
177235
extends:
178-
- .check
179236
- .tags/macos/x86_64
180237
- .rules/check/downstream/macos/x86_64
181238
- .before-script/download-artifacts
182239
script:
183240
- poetry run python run-ci.py --isolate-conan-user-home build-and-test --use-tanker=upstream --profile macos-x86_64-release
184241

185242
check/downstream/macos/arm:
243+
stage: check
186244
extends:
187-
- .check
188245
- .tags/macos/arm
189246
- .rules/check/downstream/macos/arm
190247
- .before-script/download-artifacts
191248
script:
192249
- poetry run python run-ci.py --isolate-conan-user-home build-and-test --use-tanker=upstream --profile macos-armv8-release
193250

251+
################
252+
# deploy stage #
253+
################
254+
194255
deploy:
256+
stage: deploy
195257
extends:
196-
- .deploy
197258
- .tags/linux
198259
- .rules/deploy/rust
199260
script:

0 commit comments

Comments
 (0)