|
18 | 18 | - run: |
19 | 19 | name: Run linter |
20 | 20 | command: npm --prefix ./glean run lint |
21 | | - # Disabled because of bug 1704794. |
22 | | - # - run: |
23 | | - # name: Run circular dependencies checker |
24 | | - # command: npm --prefix ./glean run lint:circular-deps |
| 21 | + - run: |
| 22 | + name: Run circular dependencies checker |
| 23 | + command: npm --prefix ./glean run lint:circular-deps |
25 | 24 |
|
26 | 25 | unit-tests: |
27 | 26 | docker: |
@@ -78,22 +77,41 @@ jobs: |
78 | 77 |
|
79 | 78 | check-qt-js: |
80 | 79 | docker: |
81 | | - - image: circleci/python:latest |
| 80 | + - image: cimg/python:3.9.4-node |
82 | 81 | steps: |
83 | 82 | - checkout |
84 | 83 | - run: |
85 | 84 | name: Install Javascript dependencies and build Glean.js for Qt |
86 | 85 | command: | |
87 | | - # We are on the CircleCI python docker image, so let's install npm and node. |
88 | | - curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.37.0/install.sh | bash |
89 | | - export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")" |
90 | | - [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" |
91 | | - nvm install node |
92 | 86 | npm --prefix ./glean install |
93 | 87 | npm --prefix ./glean run build:qt |
94 | 88 | - run: |
95 | | - name: Verify no Javascript errors found in Qt |
96 | | - command: bin/qt-js-check.sh |
| 89 | + name: Setup Qt dependency |
| 90 | + command: | |
| 91 | + # The following commands are copied from the VPN Qt setup for Linux |
| 92 | + # See: https://github.com/mozilla-mobile/mozilla-vpn-client/blob/main/.github/workflows/linux.yaml#L18-L21 |
| 93 | + # |
| 94 | + # Add external PPA, latest version of QT is 5.12.x for Ubuntu 20.04 |
| 95 | + sudo add-apt-repository ppa:beineri/opt-qt-5.15.2-focal -y |
| 96 | + sudo apt update |
| 97 | + 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 |
| 98 | + - run: |
| 99 | + name: Run the Qt sample app and check for errors |
| 100 | + command: | |
| 101 | + cd samples/qt-qml-app |
| 102 | + python3 -m venv venv |
| 103 | + source venv/bin/activate |
| 104 | + pip install -r requirements.txt |
| 105 | +
|
| 106 | + sudo apt-get install xvfb |
| 107 | + xvfb-run python main.py &> qml.log & |
| 108 | + # Wait for app to start |
| 109 | + sleep 10 |
| 110 | + if ! grep -q "Initialized Glean succesfully." "qml.log"; then |
| 111 | + echo "\n\n\033[1;91m** Failed to initialize Glean in Qt! See more logs below. **\033[0m\n\n" |
| 112 | + cat qml.log |
| 113 | + exit 1 |
| 114 | + fi |
97 | 115 |
|
98 | 116 | publish: |
99 | 117 | docker: |
|
0 commit comments