@@ -11,209 +11,6 @@ defaults:
11
11
shell : bash
12
12
13
13
jobs :
14
- ubuntu :
15
- strategy :
16
- fail-fast : false
17
- matrix :
18
- container :
19
- - ' ubuntu:20.04'
20
- - ' ubuntu:22.04'
21
- runs-on : ubuntu-latest
22
- container : ${{ matrix.container }}
23
- steps :
24
- - name : Install Qt
25
- run : |
26
- apt-get update
27
- DEBIAN_FRONTEND=noninteractive apt-get install -y --force-yes \
28
- build-essential \
29
- python3 \
30
- python3-dev \
31
- libpython3-dev \
32
- qtbase5-dev \
33
- qtbase5-private-dev \
34
- qt5-qmake \
35
- qtbase5-dev-tools \
36
- qttools5-dev \
37
- qtdeclarative5-dev \
38
- libqt5svg5* \
39
- libqt5xmlpatterns5* \
40
- libqt5multimedia5* \
41
- libqt5multimediawidgets5* \
42
- libqt5qml5* \
43
- libqt5quickwidgets5* \
44
- qtmultimedia5-dev
45
- apt-get clean
46
-
47
- - name : Checkout PythonQt
48
- uses : actions/checkout@v3
49
-
50
- - name : Build PythonQt
51
- run : |
52
- export QT_SELECT=qt5
53
- echo ======= SYSTEM INFO ========
54
- uname -a; gcc --version | grep "gcc"; python3 --version; qmake --version
55
- echo ============================
56
- qmake -r PythonQt.pro CONFIG+=release CONFIG+=sanitizer CONFIG+=sanitize_undefined \
57
- PYTHON_VERSION=$(python3 --version | cut -d " " -f 2 | cut -d "." -f1,2) \
58
- PYTHON_PATH=$(which python3 | xargs dirname)
59
- make -j 2 && make check TESTARGS="-platform offscreen"
60
-
61
- - name : Generate Wrappers
62
- run : |
63
- # workaround to allow to find the Qt include dirs for installed standard qt packages
64
- mkdir /usr/include/qt5; ln -s /usr/include/x86_64-linux-gnu/qt5 /usr/include/qt5/include
65
- export QTDIR=/usr/include/qt5
66
- cd generator
67
- ./pythonqt_generator
68
-
69
- - name : Upload Wrappers
70
- uses : actions/upload-artifact@v3
71
- if : ${{ matrix.container }} == 'ubuntu:20.04'
72
- with :
73
- name : wrappers_ubuntu_20_04
74
- path : generated_cpp
75
-
76
- - name : Upload Wrappers
77
- uses : actions/upload-artifact@v3
78
- if : ${{ matrix.container }} == 'ubuntu:22.04'
79
- with :
80
- name : wrappers_ubuntu_22_04
81
- path : generated_cpp
82
-
83
- centos :
84
- strategy :
85
- fail-fast : false
86
- matrix :
87
- container :
88
- - ' centos:7'
89
- runs-on : ubuntu-latest
90
- container : ${{ matrix.container }}
91
- steps :
92
- - name : Install Qt
93
- run : |
94
- yum update -y
95
- yum groupinstall "Development Tools" -y
96
- yum install -y \
97
- which \
98
- python-debug \
99
- qt5-qtbase-* \
100
- qt5-qttools* \
101
- qt5-qtsvg \
102
- qt5-qtxmlpatterns \
103
- qt5-qtmultimedia \
104
- qt5-qt3d \
105
- qt5-*-devel
106
-
107
- - name : Checkout PythonQt
108
- uses : actions/checkout@v3
109
-
110
- - name : Build PythonQt
111
- run : |
112
- export QT_SELECT=qt5
113
- echo ======= SYSTEM INFO ========
114
- uname -a; gcc --version | grep "gcc"; python --version; qmake-qt5 --version
115
- echo ============================
116
- qmake-qt5 -r PythonQt.pro CONFIG+=release \
117
- PYTHON_VERSION=$(python --version | cut -d " " -f 2 | cut -d "." -f1,2) \
118
- PYTHON_PATH=$(which python | xargs dirname)
119
- make -j 2 && make check TESTARGS="-platform offscreen"
120
-
121
- - name : Generate Wrappers
122
- run : |
123
- # workaround to allow to find the Qt include dirs for installed standard qt packages
124
- mkdir /usr/include/qt5ln; ln -s /usr/include/qt5 /usr/include/qt5ln/include
125
- export QTDIR=/usr/include/qt5ln
126
- cd generator
127
- ./pythonqt_generator
128
-
129
- - name : Upload Wrappers
130
- uses : actions/upload-artifact@v3
131
- with :
132
- name : wrappers_centos7
133
- path : generated_cpp
134
-
135
- macOS :
136
- strategy :
137
- fail-fast : false
138
- matrix :
139
- macos-version : ['10.15']
140
- python-version : ['2.7']
141
- qt-version : ['5.9.*']
142
- include :
143
- - macos-version : ' 11'
144
- python-version : ' 3.6'
145
- qt-version : ' 5.11.*'
146
- - macos-version : ' 12'
147
- python-version : ' 3.11'
148
- qt-version : ' 5.12.*'
149
- runs-on : macos-${{ matrix.macos-version }}
150
- steps :
151
- - name : Install Qt
152
- uses : jurplel/install-qt-action@v3
153
- with :
154
- aqtversion : ' ==2.1.*'
155
- version : ${{ matrix.qt-version }}
156
- host : ' mac'
157
- target : ' desktop'
158
- arch : ' clang_64'
159
- modules : ' qtscript'
160
- archives : ' qtmultimedia qtmacextras qtbase qttools'
161
-
162
- - name : Setup Python ${{ matrix.python-version }}
163
- uses : actions/setup-python@v4
164
- with :
165
- python-version : ' ${{ matrix.python-version }}'
166
-
167
- - name : Checkout PythonQt
168
- uses : actions/checkout@v3
169
-
170
- - name : Detect exact versions
171
- id : versions
172
- run : |
173
- set -eu
174
- PYTHON_VERSION_FULL=$(python --version 2>&1 | cut -f 2 -d ' ')
175
- PYTHON_VERSION_SHORT=$(cut -f 1,2 -d . <<< $PYTHON_VERSION_FULL)
176
- QT_VERSION_FULL=$($Qt5_Dir/bin/qmake -query QT_VERSION)
177
- QT_VERSION_SHORT=$(cut -f 1,2 -d . <<< $QT_VERSION_FULL)
178
- MACOS_VERSION_FULL=$(sw_vers -productVersion)
179
- MACOS_VERSION_SHORT=$(cut -f 1,2 -d . <<< $MACOS_VERSION_FULL)
180
-
181
- echo "PYTHON_VERSION_FULL=$PYTHON_VERSION_FULL" | tee -a $GITHUB_OUTPUT
182
- echo "PYTHON_VERSION_SHORT=$PYTHON_VERSION_SHORT" | tee -a $GITHUB_OUTPUT
183
- echo "QT_VERSION_FULL=$QT_VERSION_FULL" | tee -a $GITHUB_OUTPUT
184
- echo "QT_VERSION_SHORT=$QT_VERSION_SHORT" | tee -a $GITHUB_OUTPUT
185
- echo "MACOS_VERSION_FULL=$MACOS_VERSION_FULL" | tee -a $GITHUB_OUTPUT
186
- echo "MACOS_VERSION_SHORT=$MACOS_VERSION_SHORT" | tee -a $GITHUB_OUTPUT
187
-
188
- - name : Build PythonQt
189
- run : |
190
- set -ue
191
- echo ======= SYSTEM INFO ========
192
- uname -a; gcc --version | head -n 1; python --version; qmake --version
193
- echo ============================
194
- PYTHON_VERSION_MAJOR=$(cut -d . -f1 <<< ${{ steps.versions.outputs.PYTHON_VERSION_SHORT }})
195
- for i in "python${{ steps.versions.outputs.PYTHON_VERSION_SHORT }}-embed" "python${{ steps.versions.outputs.PYTHON_VERSION_SHORT }}" \
196
- "python${PYTHON_VERSION_MAJOR}-embed" "python${PYTHON_VERSION_MAJOR}"
197
- do if pkg-config --exists "$i"; then PYTHON_PKGCONFIG_NAME="$i"; break; fi; done
198
- qmake CONFIG+=release CONFIG+=sanitizer CONFIG+=sanitize_undefined \
199
- PYTHON_VERSION=${{ steps.versions.outputs.PYTHON_VERSION_SHORT }} \
200
- PYTHON_PATH="$pythonLocation/bin" \
201
- PKGCONFIG+=$PYTHON_PKGCONFIG_NAME \
202
- -r PythonQt.pro
203
- make -j 2 && make check TESTARGS="-platform offscreen"
204
-
205
- - name : Generate Wrappers
206
- run : |
207
- cd generator
208
- # workaround to allow to find the Qt include dirs for installed standard qt packages
209
- QTDIR=-UNDEFINED- ./pythonqt_generator --include-paths=$Qt5_Dir/lib
210
-
211
- - name : Upload Wrappers
212
- uses : actions/upload-artifact@v3
213
- with :
214
- name : wrappers_macos${{ steps.versions.outputs.MACOS_VERSION_SHORT }}_qt${{ steps.versions.outputs.QT_VERSION_SHORT }}
215
- path : generated_cpp
216
-
217
14
windows :
218
15
strategy :
219
16
fail-fast : false
266
63
target : ' desktop'
267
64
arch : ${{ matrix.qt-arch }}
268
65
modules : ' qtscript'
269
- archives : ' qtmultimedia qtbase qttools'
270
- tools : ${{ contains(matrix.qt-arch, 'mingw') && format('qt.tools.{0}0', matrix.qt-arch) || '' }}
66
+ archives : ' qtwinextras qtmultimedia qtbase qttools'
67
+ tools : ${{ contains(matrix.qt-arch, 'mingw') && format('tools_mingw, qt.tools.{0}0', matrix.qt-arch) || '' }}
271
68
272
69
- name : Setup Python ${{ matrix.python-version }}
273
70
uses : actions/setup-python@v4
@@ -285,13 +82,14 @@ jobs:
285
82
QT_VERSION_SHORT=$(cut -f 1,2 -d . <<< $QT_VERSION_FULL)
286
83
echo "QT_VERSION_FULL=$QT_VERSION_FULL" | tee -a $GITHUB_OUTPUT
287
84
echo "QT_VERSION_SHORT=$QT_VERSION_SHORT" | tee -a $GITHUB_OUTPUT
85
+ echo "CL=/MP" | tee -a $GITHUB_ENV #multicore parallel build for cl.exe
288
86
289
87
- name : Build PythonQt
290
88
shell : cmd
291
89
run : |
292
- set PATH
293
- qmake -Wall -d CONFIG+=release "PYTHON_PATH=%pythonLocation%" -after "QMAKE_SH=" PythonQt.pro
294
- make -j 2 && make check "TESTARGS=-platform offscreen" || nmake && nmake check "TESTARGS=-platform offscreen"
90
+ ${{ contains(matrix.qt-arch, 'mingw') && format('FOR /F "tokens=1,2 delims=_" %%I IN ("{0}") DO SET " PATH=%PATH%;%IQTA_TOOLS%\%%J0_{1}\bin', matrix.qt-arch, contains(matrix.qt-arch, 'win32') && '32' || '64') || '' }}
91
+ qmake -Wall -d CONFIG+=release "PYTHON_PATH=%pythonLocation%" -after "QMAKE_SH=" "QMAKE_LINK_OBJECT_MAX=100" PythonQt.pro
92
+ mingw32- make -j 2 && mingw32- make check "TESTARGS=-platform offscreen" || nmake && nmake check "TESTARGS=-platform offscreen"
295
93
296
94
- name : Generate Wrappers
297
95
shell : cmd
0 commit comments