Skip to content

Commit bd8f6bf

Browse files
committed
Add CI for the latest Qt5 and Qt6
1 parent 9259d27 commit bd8f6bf

File tree

1 file changed

+71
-0
lines changed

1 file changed

+71
-0
lines changed

.github/workflows/build_latest.yml

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
name: Latest Qt5/6
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
9+
defaults:
10+
run:
11+
shell: bash
12+
13+
jobs:
14+
ubuntu:
15+
strategy:
16+
fail-fast: false
17+
matrix:
18+
qt-version: [ '5.*', '6.*']
19+
python-version: [ '3.12' ]
20+
runs-on: ubuntu-latest
21+
steps:
22+
23+
- name: Install Qt ${{matrix.qt-version}}
24+
uses: jurplel/install-qt-action@v3
25+
with:
26+
version: ${{ matrix.qt-version }}
27+
modules: ${{startsWith(matrix.qt-version, '6') && 'qt5compat' || '' }}
28+
archives: 'qtmultimedia qtlinuxextras qtbase qttools icu qtwayland'
29+
30+
- name: Setup Python ${{ matrix.python-version }}
31+
uses: actions/setup-python@v4
32+
with:
33+
python-version: '${{ matrix.python-version }}'
34+
35+
- name: Checkout PythonQt
36+
uses: actions/checkout@v3
37+
38+
- name: Set environment
39+
run: |
40+
QT_VERSION_MAJOR=$(cut -f 1 -d . <<< "${{matrix.qt-version}}")
41+
echo "QT_VERSION_MAJOR=$QT_VERSION_MAJOR" >> $GITHUB_ENV
42+
QTDIR=$(eval echo "\$Qt${QT_VERSION_MAJOR}_DIR")
43+
echo "QTDIR=$QTDIR" >> $GITHUB_ENV
44+
echo "$QTDIR/bin" >> $GITHUB_PATH
45+
echo "$pythonLocation/bin" >> $GITHUB_PATH
46+
47+
- name: Build PythonQt
48+
run: |
49+
echo ======= SYSTEM INFO ========
50+
uname -a; gcc --version | grep "gcc"; python3 --version; qmake --version
51+
echo ============================
52+
qmake -r PythonQt.pro CONFIG+=release CONFIG+=force_debug_info \
53+
CONFIG+=sanitizer CONFIG+=sanitize_undefined CONFIG+=sanitize_address \
54+
PYTHON_VERSION=$(python3 --version | cut -d " " -f 2 | cut -d "." -f1,2) \
55+
PYTHON_DIR=$(which python3 | xargs dirname | xargs dirname)
56+
make -j $(nproc)
57+
UBSAN_OPTIONS="halt_on_error=1" ASAN_OPTIONS="detect_leaks=0:detect_stack_use_after_return=1:fast_unwind_on_malloc=0" \
58+
make check TESTARGS="-platform offscreen"
59+
60+
- name: Generate Wrappers
61+
run: |
62+
cd generator
63+
UBSAN_OPTIONS="halt_on_error=1" \
64+
ASAN_OPTIONS="detect_leaks=0:detect_stack_use_after_return=1:fast_unwind_on_malloc=0" \
65+
./pythonqt_generator
66+
67+
- name: Upload Wrappers
68+
uses: actions/upload-artifact@v3
69+
with:
70+
name: wrappers_ubuntu_${{startsWith(matrix.qt-version, '6') && '6' || '5' }}-latest
71+
path: generated_cpp

0 commit comments

Comments
 (0)