@@ -72,24 +72,36 @@ check:nix-dry:
72
72
- if : $CI_COMMIT_BRANCH && $CI_COMMIT_BRANCH != 'master' && $CI_COMMIT_TITLE !~ /^[0-9]+\.[0-9]+\.[0-9]+(?:-.*[0-9]+)?$/
73
73
when : manual
74
74
75
- check:test :
75
+ check:test-generate :
76
76
stage : check
77
- needs : []
78
77
script :
78
+ - mkdir -p ./tmp
79
79
- >
80
80
nix-shell --run '
81
- npm run build --verbose;
82
- npm test -- --ci --coverage;
81
+ ./scripts/test-pipelines.sh > ./tmp/test-pipelines.yml
83
82
'
84
83
artifacts :
85
84
when : always
86
- reports :
87
- junit :
88
- - ./tmp/junit/junit.xml
89
- coverage_report :
90
- coverage_format : cobertura
91
- path : ./tmp/coverage/cobertura-coverage.xml
92
- coverage : ' /All files[^|]*\|[^|]*\s+([\d\.]+)/'
85
+ paths :
86
+ - ./tmp/test-pipelines.yml
87
+ rules :
88
+ # Runs on staging commits and ignores version commits
89
+ - if : $CI_COMMIT_BRANCH =~ /^feature.*$/ && $CI_COMMIT_TITLE !~ /^[0-9]+\.[0-9]+\.[0-9]+(?:-.*[0-9]+)?$/
90
+ # Manually run on commits other than master and staging and ignore version commits
91
+ - if : $CI_COMMIT_BRANCH && $CI_COMMIT_BRANCH !~ /^(?:master|staging)$/ && $CI_COMMIT_TITLE !~ /^[0-9]+\.[0-9]+\.[0-9]+(?:-.*[0-9]+)?$/
92
+ when : manual
93
+
94
+ check:test :
95
+ stage : check
96
+ needs :
97
+ - check:test-generate
98
+ inherit :
99
+ variables : false
100
+ trigger :
101
+ include :
102
+ - artifact : tmp/test-pipelines.yml
103
+ job : check:test-generate
104
+ strategy : depend
93
105
rules :
94
106
# Runs on staging commits and ignores version commits
95
107
- if : $CI_COMMIT_BRANCH =~ /^feature.*$/ && $CI_COMMIT_TITLE !~ /^[0-9]+\.[0-9]+\.[0-9]+(?:-.*[0-9]+)?$/
@@ -125,82 +137,35 @@ build:merge:
125
137
# Runs on tag pipeline where the tag is a prerelease or release version
126
138
- if : $CI_COMMIT_TAG =~ /^v[0-9]+\.[0-9]+\.[0-9]+(?:-.*[0-9]+)?$/
127
139
128
- build:linux :
140
+ build:build-generate :
129
141
stage : build
130
- needs : []
131
142
script :
143
+ - mkdir -p ./tmp
132
144
- >
133
145
nix-shell --run '
134
- npm run build --verbose;
135
- npm test -- --ci --coverage;
146
+ ./scripts/build-pipelines.sh > ./tmp/build-pipelines.yml
136
147
'
137
148
artifacts :
138
149
when : always
139
- reports :
140
- junit :
141
- - ./tmp/junit/junit.xml
142
- coverage_report :
143
- coverage_format : cobertura
144
- path : ./tmp/coverage/cobertura-coverage.xml
145
150
paths :
146
- # Only the build:linux preserves the dist
147
- - ./dist
148
- coverage : ' /All files[^|]*\|[^|]*\s+([\d\.]+)/'
149
- rules :
150
- # Runs on staging commits and ignores version commits
151
- - if : $CI_COMMIT_BRANCH == 'staging' && $CI_COMMIT_TITLE !~ /^[0-9]+\.[0-9]+\.[0-9]+(?:-.*[0-9]+)?$/
152
- # Runs on tag pipeline where the tag is a prerelease or release version
153
- - if : $CI_COMMIT_TAG =~ /^v[0-9]+\.[0-9]+\.[0-9]+(?:-.*[0-9]+)?$/
154
-
155
- build:windows :
156
- stage : build
157
- needs : []
158
- tags :
159
- - windows
160
- before_script :
161
- - choco install nodejs --version=16.14.2 -y
162
- - refreshenv
163
- script :
164
- - npm config set msvs_version 2019
165
- - npm install --ignore-scripts
166
- - $env:Path = "$(npm bin);" + $env:Path
167
- - npm run build --verbose
168
- - npm test -- --ci
169
- artifacts :
170
- when : always
171
- reports :
172
- junit :
173
- - ./tmp/junit/junit.xml
151
+ - ./tmp/build-pipelines.yml
174
152
rules :
175
153
# Runs on staging commits and ignores version commits
176
154
- if : $CI_COMMIT_BRANCH == 'staging' && $CI_COMMIT_TITLE !~ /^[0-9]+\.[0-9]+\.[0-9]+(?:-.*[0-9]+)?$/
177
155
# Runs on tag pipeline where the tag is a prerelease or release version
178
156
- if : $CI_COMMIT_TAG =~ /^v[0-9]+\.[0-9]+\.[0-9]+(?:-.*[0-9]+)?$/
179
157
180
- build:macos :
158
+ build:platforms :
181
159
stage : build
182
- needs : []
183
- tags :
184
- - shared-macos-amd64
185
- image : macos-11-xcode-12
186
- variables :
187
- HOMEBREW_NO_INSTALL_UPGRADE : " true"
188
- HOMEBREW_NO_INSTALL_CLEANUP : " true"
189
- before_script :
190
- - eval "$(brew shellenv)"
191
- - brew install node@16
192
- - brew link --overwrite node@16
193
- - hash -r
194
- script :
195
- - npm install --ignore-scripts
196
- - export PATH="$(npm bin):$PATH"
197
- - npm run build --verbose
198
- - npm test -- --ci
199
- artifacts :
200
- when : always
201
- reports :
202
- junit :
203
- - ./tmp/junit/junit.xml
160
+ needs :
161
+ - build:build-generate
162
+ inherit :
163
+ variables : false
164
+ trigger :
165
+ include :
166
+ - artifact : tmp/build-pipelines.yml
167
+ job : build:build-generate
168
+ strategy : depend
204
169
rules :
205
170
# Runs on staging commits and ignores version commits
206
171
- if : $CI_COMMIT_BRANCH == 'staging' && $CI_COMMIT_TITLE !~ /^[0-9]+\.[0-9]+\.[0-9]+(?:-.*[0-9]+)?$/
@@ -210,9 +175,7 @@ build:macos:
210
175
build:prerelease :
211
176
stage : build
212
177
needs :
213
- - build:linux
214
- - build:windows
215
- - build:macos
178
+ - build:platforms
216
179
# Don't interrupt publishing job
217
180
interruptible : false
218
181
before_script :
@@ -235,9 +198,7 @@ build:prerelease:
235
198
integration:builds :
236
199
stage : integration
237
200
needs :
238
- - build:linux
239
- - build:windows
240
- - build:macos
201
+ - build:platforms
241
202
script :
242
203
- mkdir -p ./builds
243
204
- >
@@ -434,11 +395,7 @@ integration:merge:
434
395
stage : integration
435
396
needs :
436
397
- build:merge
437
- - job : build:linux
438
- optional : true
439
- - job : build:windows
440
- optional : true
441
- - job : build:macos
398
+ - job : build:platforms
442
399
optional : true
443
400
- job : integration:nix
444
401
optional : true
@@ -514,9 +471,7 @@ release:deployment:tag:
514
471
release:distribution :
515
472
stage : release
516
473
needs :
517
- - build:linux
518
- - build:windows
519
- - build:macos
474
+ - build:platforms
520
475
- integration:builds
521
476
- integration:merge
522
477
- release:deployment:tag
0 commit comments