@@ -147,46 +147,6 @@ jobs:
147147 command : |
148148 export PATH=.:$PATH && npm --prefix ./samples/node run test
149149
150- sample-qt-test :
151- docker :
152- - image : cimg/python:<< pipeline.parameters.python-version >>
153- steps :
154- - checkout
155- - install-node
156- - run :
157- name : Install JavaScript dependencies for Glean
158- command : npm --prefix ./glean install
159- - run :
160- name : Install Qt dependencies
161- command : |
162- sudo apt-get update
163- sudo apt-get install -y gcc g++ make cmake \
164- qtbase5-dev qt5-default qt5-qmake qttools5-dev-tools qtdeclarative5-dev \
165- qtdeclarative5-dev-tools qml-module-qttest qml-module-qtquick2 \
166- qml-module-qtquick-localstorage qml-module-qtquick-controls2
167- sudo apt-get install xvfb
168- - run :
169- name : Build and install Qt Glean.js library
170- command : |
171- npm --prefix ./glean run build:qt
172- cp -r glean/dist/qt/org/ samples/qt/src/App/org/
173- - run :
174- name : Build the Node.js Glean generated files sample
175- command : |
176- cd samples/qt
177- python3 -m venv venv
178- source venv/bin/activate
179- pip install -r requirements.txt
180- glean_parser translate src/App/metrics.yaml src/App/pings.yaml \
181- -f javascript -o src/App/generated \
182- --option platform=qt --option version="2.0"
183- - run :
184- name : Run Qt sample tests
185- command : |
186- cd samples/qt
187- qmake -r
188- QML_IMPORT_TRACE=1 xvfb-run make check
189-
190150 browser-compat-smoke-tests :
191151 docker :
192152 - image : cimg/python:<< pipeline.parameters.python-version >>
@@ -253,9 +213,30 @@ jobs:
253213 - run :
254214 name : NPM Authentication
255215 command : echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > glean/.npmrc
256- - run :
257- name : Publish to npm
258- command : export PATH=.:$PATH && (cd glean && npm publish --access public)
216+ # This conditional matches the tag that contains 'pre', used
217+ # to mark prerelease builds. Since CircleCI conditionals do
218+ # not directly support 'else's, we need another conditional.
219+ - when :
220+ condition :
221+ matches :
222+ pattern : " ^v.*-pre.*$"
223+ value : << pipeline.git.tag >>
224+ steps :
225+ - run :
226+ name : Publish to npm (prerelease)
227+ command : export PATH=.:$PATH && (cd glean && npm publish --access public --tag prerelease)
228+ # This conditional matches 'release': we won't tag the npm
229+ # release in this case, because no 'pre' is found in the tag.
230+ - when :
231+ condition :
232+ not :
233+ matches :
234+ pattern : " ^v.*-pre.*$"
235+ value : << pipeline.git.tag >>
236+ steps :
237+ - run :
238+ name : Publish to npm
239+ command : export PATH=.:$PATH && (cd glean && npm publish --access public)
259240 - run :
260241 name : Get ghr release tool
261242 command : |
@@ -265,14 +246,6 @@ jobs:
265246 echo "${GHR_SHA256} *${GHR}.tar.gz" | sha256sum -c -
266247 tar -xf "${GHR}.tar.gz"
267248 cp ./${GHR}/ghr ghr
268- - run :
269- name : Publish to Github
270- command : |
271- # Attach Qt build to release
272- npm --prefix ./glean install
273- npm --prefix ./glean run build:qt
274- tar -zcvf "glean/dist/glean_js-${CIRCLE_TAG}-qt.tar.gz" glean/dist/qt
275- ./ghr -u mozilla -replace ${CIRCLE_TAG} glean/dist/glean_js-${CIRCLE_TAG}-qt.tar.gz
276249
277250workflows :
278251 ci :
@@ -291,9 +264,6 @@ workflows:
291264 - sample-node-test :
292265 requires :
293266 - test
294- - sample-qt-test :
295- requires :
296- - test
297267 - hold :
298268 type : approval
299269 requires :
@@ -302,7 +272,6 @@ workflows:
302272 - test
303273 - sample-webext-test
304274 - sample-node-test
305- - sample-qt-test
306275 filters :
307276 branches :
308277 ignore :
0 commit comments