Skip to content

Commit f15effe

Browse files
authored
Add workflow using generated code (MeVisLab#151)
* generated code is used for PythonQt build * add CI for the Qt5. 12 and 5.15
1 parent 099eb92 commit f15effe

File tree

2 files changed

+80
-3
lines changed

2 files changed

+80
-3
lines changed

.github/workflows/build.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ jobs:
5757
CONFIG+=sanitizer CONFIG+=sanitize_undefined CONFIG+=sanitize_address \
5858
PYTHON_VERSION=$(python3 --version | cut -d " " -f 2 | cut -d "." -f1,2) \
5959
PYTHON_DIR=$(which python3 | xargs dirname | xargs dirname)
60-
make -j 2
60+
make -j $(nproc)
6161
UBSAN_OPTIONS="halt_on_error=1" ASAN_OPTIONS="detect_leaks=0:detect_stack_use_after_return=1:fast_unwind_on_malloc=0" \
6262
make check TESTARGS="-platform offscreen"
6363
@@ -120,7 +120,7 @@ jobs:
120120
qmake-qt5 -r PythonQt.pro CONFIG+=${{ matrix.configuration }} \
121121
PYTHON_VERSION=$(python${PYTHON_VERSION_SUFFIX} --version | cut -d " " -f 2 | cut -d "." -f1,2) \
122122
PYTHON_DIR=$(which python${PYTHON_VERSION_SUFFIX} | xargs dirname | xargs dirname)
123-
make -j 2 && make check TESTARGS="-platform offscreen"
123+
make -j $(nproc) && make check TESTARGS="-platform offscreen"
124124
125125
- name: Generate Wrappers
126126
run: |
@@ -203,7 +203,7 @@ jobs:
203203
PYTHON_DIR="$pythonLocation" \
204204
PKGCONFIG+=$PYTHON_PKGCONFIG_NAME \
205205
-r PythonQt.pro
206-
make -j 2
206+
make -j $(nproc)
207207
UBSAN_OPTIONS="halt_on_error=1" ASAN_OPTIONS="detect_leaks=0:detect_stack_use_after_return=1:fast_unwind_on_malloc=0" \
208208
make check TESTARGS="-platform offscreen"
209209

.github/workflows/build_latest.yml

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
name: Qt5 check generated_cpp
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.12.*', '5.15.*' ]
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+
archives: 'qtmultimedia qtlinuxextras qtbase qttools icu qtwayland'
28+
29+
- name: Setup Python ${{ matrix.python-version }}
30+
uses: actions/setup-python@v4
31+
with:
32+
python-version: '${{ matrix.python-version }}'
33+
34+
- name: Checkout PythonQt
35+
uses: actions/checkout@v3
36+
37+
- name: Set environment
38+
run: |
39+
QT_VERSION_MAJOR=$(cut -f 1 -d . <<< "${{matrix.qt-version}}")
40+
echo "QT_VERSION_MAJOR=$QT_VERSION_MAJOR" >> $GITHUB_ENV
41+
QTDIR=$(eval echo "\$Qt${QT_VERSION_MAJOR}_DIR")
42+
echo "QTDIR=$QTDIR" >> $GITHUB_ENV
43+
echo "$QTDIR/bin" >> $GITHUB_PATH
44+
echo "$pythonLocation/bin" >> $GITHUB_PATH
45+
46+
- name: Build generator
47+
run: |
48+
cd generator
49+
qmake -r generator.pro CONFIG+=release CONFIG+=force_debug_info \
50+
CONFIG+=sanitizer CONFIG+=sanitize_undefined CONFIG+=sanitize_address
51+
make -j $(nproc)
52+
53+
- name: Generate Wrappers
54+
run: |
55+
cd generator
56+
UBSAN_OPTIONS="halt_on_error=1" \
57+
ASAN_OPTIONS="detect_leaks=0:detect_stack_use_after_return=1:fast_unwind_on_malloc=0" \
58+
./pythonqt_generator
59+
60+
- name: Upload Wrappers
61+
uses: actions/upload-artifact@v3
62+
with:
63+
name: wrappers_ubuntu_5-latest
64+
path: generated_cpp
65+
66+
- name: Build PythonQt
67+
run: |
68+
echo ======= SYSTEM INFO ========
69+
uname -a; gcc --version | grep "gcc"; python3 --version; qmake --version
70+
echo ============================
71+
qmake -r PythonQt.pro CONFIG+=release CONFIG+=force_debug_info \
72+
CONFIG+=sanitizer CONFIG+=sanitize_undefined CONFIG+=sanitize_address \
73+
PYTHON_VERSION=$(python3 --version | cut -d " " -f 2 | cut -d "." -f1,2) \
74+
PYTHON_DIR=$(which python3 | xargs dirname | xargs dirname)
75+
make -j $(nproc)
76+
UBSAN_OPTIONS="halt_on_error=1" ASAN_OPTIONS="detect_leaks=0:detect_stack_use_after_return=1:fast_unwind_on_malloc=0" \
77+
make check TESTARGS="-platform offscreen"

0 commit comments

Comments
 (0)