@@ -66,15 +66,15 @@ jobs:
6666 name : Run integration tests
6767 command : export PATH=.:$PATH && npm --prefix ./glean run test:integration
6868
69- samples -tests :
69+ webext-sample -tests :
7070 docker :
7171 - image : cimg/python:3.8.8-node
7272 steps :
7373 - checkout
7474 - run :
7575 name : Install JavaScript dependencies for Glean
7676 command : npm --prefix ./glean install
77- # JS webext sample related jobs
77+ # JS sample related jobs
7878 - run :
7979 name : Install JavaScript dependencies for the JS web extension sample
8080 command : |
8888 name : Run JS web extension sample test
8989 command : |
9090 export PATH=.:$PATH && npm --prefix ./samples/web-extension/javascript run test
91- # TS webext sample related jobs
91+ # TS sample related jobs
9292 - run :
9393 name : Install Typescript dependencies for the TS web extension sample
9494 command : |
@@ -102,7 +102,15 @@ jobs:
102102 name : Run TS web extension sample test
103103 command : |
104104 export PATH=.:$PATH && npm --prefix ./samples/web-extension/typescript run test
105- # Node.js sample related jobs
105+
106+ node-sample-tests :
107+ docker :
108+ - image : cimg/python:3.8.8-node
109+ steps :
110+ - checkout
111+ - run :
112+ name : Install JavaScript dependencies for Glean
113+ command : npm --prefix ./glean install
106114 - run :
107115 name : Install JavaScript dependencies for the Node.js sample
108116 command : |
@@ -117,55 +125,55 @@ jobs:
117125 command : |
118126 export PATH=.:$PATH && npm --prefix ./samples/node run test
119127
120- check-size :
128+ qt-sample-tests :
121129 docker :
122- - image : cimg/node:16.1.0
130+ - image : cimg/python:3.8.8-node
123131 steps :
124132 - checkout
125133 - run :
126- name : Get and post build sizes to GitHub PR
127- command : |
128- ./benchmarks/run.sh
129-
130- check-qt-js :
131- docker :
132- - image : cimg/python:3.9.4-node
133- steps :
134- - checkout
134+ name : Install JavaScript dependencies for Glean
135+ command : npm --prefix ./glean install
135136 - run :
136- name : Install JavaScript dependencies and build Glean.js for Qt
137+ name : Install Qt dependencies
137138 command : |
138- npm --prefix ./glean install
139- npm --prefix ./glean run build:qt
139+ sudo apt-get update
140+ sudo apt-get install -y gcc g++ make cmake \
141+ qtbase5-dev qt5-default qt5-qmake qttools5-dev-tools qtdeclarative5-dev \
142+ qtdeclarative5-dev-tools qml-module-qttest qml-module-qtquick2 \
143+ qml-module-qtquick-localstorage qml-module-qtquick-controls2
144+ sudo apt-get install xvfb
140145 - run :
141- name : Setup Qt dependency
146+ name : Build and install Qt Glean.js library
142147 command : |
143- # The following commands are copied from the VPN Qt setup for Linux
144- # See: https://github.com/mozilla-mobile/mozilla-vpn-client/blob/main/.github/workflows/linux.yaml#L18-L21
145- #
146- # Add external PPA, latest version of QT is 5.12.x for Ubuntu 20.04
147- sudo add-apt-repository ppa:beineri/opt-qt-5.15.2-focal -y
148- sudo apt update
149- sudo apt install git qt515tools qt515svg qt515networkauth-no-lgpl qt515charts-no-lgpl libgl-dev libpolkit-gobject-1-dev devscripts debhelper cdbs quilt qt515graphicaleffects qt515imageformats qt515quickcontrols2 libxcb-image0-dev libxcb-shape0-dev libxcb-sync0-dev libxcb-render-util0-dev libxcb-xfixes0-dev libxcb-icccm4-dev libx11-xcb-dev libxcb-keysyms1-dev libasound2-dev libaudio-dev libcups2-dev libdbus-1-dev libglu1-mesa-dev libmng-dev libtiff5-dev libxcursor-dev libxi-dev libxinerama-dev libxmu-dev libxrandr-dev libxv-dev libedit-dev libvulkan-dev qt515websockets -y
148+ npm --prefix ./glean run build:qt
149+ cp -r glean/dist/qt/org/ samples/qt/src/App/org/
150150 - run :
151- name : Run the Qt sample app and check for errors
151+ name : Build the Node.js Glean generated files sample
152152 command : |
153- cd samples/qt-qml-app
153+ cd samples/qt
154154 python3 -m venv venv
155155 source venv/bin/activate
156156 pip install -r requirements.txt
157- glean_parser translate metrics.yaml pings.yaml -f javascript -o generated \
158- --option platform=qt --option version="0.22"
157+ glean_parser translate src/App/metrics.yaml src/App/pings.yaml \
158+ -f javascript -o src/App/generated \
159+ --option platform=qt --option version="0.22"
160+ - run :
161+ name : Run Qt sample tests
162+ command : |
163+ cd samples/qt
164+ ls src
165+ qmake -r
166+ QML_IMPORT_TRACE=1 xvfb-run make check
159167
160- sudo apt-get install xvfb
161- xvfb-run python main.py &> qml.log &
162- # Wait for app to start
163- sleep 10
164- if ! grep -q "Initialized Glean succesfully." "qml.log"; then
165- echo "\n\n\033[1;91m** Failed to initialize Glean in Qt! See more logs below. **\033[0m\n\n"
166- cat qml.log
167- exit 1
168- fi
168+ check-size :
169+ docker :
170+ - image : cimg/node:16.1.0
171+ steps :
172+ - checkout
173+ - run :
174+ name : Get and post build sizes to GitHub PR
175+ command : |
176+ ./benchmarks/run.sh
169177
170178 # via https://circleci.com/blog/deploying-documentation-to-github-pages-with-continuous-integration/
171179 docs-deploy :
@@ -195,7 +203,6 @@ jobs:
195203 git config user.name "moz-glean"
196204 npm --prefix ./glean run publish:docs
197205
198-
199206 publish :
200207 docker :
201208 - image : cimg/node:16.1.0
@@ -233,15 +240,17 @@ workflows:
233240 jobs :
234241 - lint
235242 - test
236- - check-qt-js
237- - samples-tests
243+ - webext-sample-tests
244+ - node-sample-tests
245+ - qt-sample-tests
238246 - hold :
239247 type : approval
240248 requires :
241249 - lint
242250 - test
243- - check-qt-js
244- - samples-tests
251+ - webext-sample-tests
252+ - node-sample-tests
253+ - qt-sample-tests
245254 filters :
246255 branches :
247256 ignore :
0 commit comments