Skip to content

Commit

Permalink
Add workflow using generated code (#151)
Browse files Browse the repository at this point in the history
* generated code is used for PythonQt build
* add CI for the  Qt5. 12 and 5.15
  • Loading branch information
YuriUfimtsev authored Nov 17, 2023
1 parent 099eb92 commit f15effe
Show file tree
Hide file tree
Showing 2 changed files with 80 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
CONFIG+=sanitizer CONFIG+=sanitize_undefined CONFIG+=sanitize_address \
PYTHON_VERSION=$(python3 --version | cut -d " " -f 2 | cut -d "." -f1,2) \
PYTHON_DIR=$(which python3 | xargs dirname | xargs dirname)
make -j 2
make -j $(nproc)
UBSAN_OPTIONS="halt_on_error=1" ASAN_OPTIONS="detect_leaks=0:detect_stack_use_after_return=1:fast_unwind_on_malloc=0" \
make check TESTARGS="-platform offscreen"
Expand Down Expand Up @@ -120,7 +120,7 @@ jobs:
qmake-qt5 -r PythonQt.pro CONFIG+=${{ matrix.configuration }} \
PYTHON_VERSION=$(python${PYTHON_VERSION_SUFFIX} --version | cut -d " " -f 2 | cut -d "." -f1,2) \
PYTHON_DIR=$(which python${PYTHON_VERSION_SUFFIX} | xargs dirname | xargs dirname)
make -j 2 && make check TESTARGS="-platform offscreen"
make -j $(nproc) && make check TESTARGS="-platform offscreen"
- name: Generate Wrappers
run: |
Expand Down Expand Up @@ -203,7 +203,7 @@ jobs:
PYTHON_DIR="$pythonLocation" \
PKGCONFIG+=$PYTHON_PKGCONFIG_NAME \
-r PythonQt.pro
make -j 2
make -j $(nproc)
UBSAN_OPTIONS="halt_on_error=1" ASAN_OPTIONS="detect_leaks=0:detect_stack_use_after_return=1:fast_unwind_on_malloc=0" \
make check TESTARGS="-platform offscreen"
Expand Down
77 changes: 77 additions & 0 deletions .github/workflows/build_latest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
name: Qt5 check generated_cpp

on:
push:
branches:
- master
pull_request:

defaults:
run:
shell: bash

jobs:
ubuntu:
strategy:
fail-fast: false
matrix:
qt-version: [ '5.12.*', '5.15.*' ]
python-version: [ '3.12' ]
runs-on: ubuntu-latest
steps:

- name: Install Qt ${{matrix.qt-version}}
uses: jurplel/install-qt-action@v3
with:
version: ${{ matrix.qt-version }}
archives: 'qtmultimedia qtlinuxextras qtbase qttools icu qtwayland'

- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: '${{ matrix.python-version }}'

- name: Checkout PythonQt
uses: actions/checkout@v3

- name: Set environment
run: |
QT_VERSION_MAJOR=$(cut -f 1 -d . <<< "${{matrix.qt-version}}")
echo "QT_VERSION_MAJOR=$QT_VERSION_MAJOR" >> $GITHUB_ENV
QTDIR=$(eval echo "\$Qt${QT_VERSION_MAJOR}_DIR")
echo "QTDIR=$QTDIR" >> $GITHUB_ENV
echo "$QTDIR/bin" >> $GITHUB_PATH
echo "$pythonLocation/bin" >> $GITHUB_PATH
- name: Build generator
run: |
cd generator
qmake -r generator.pro CONFIG+=release CONFIG+=force_debug_info \
CONFIG+=sanitizer CONFIG+=sanitize_undefined CONFIG+=sanitize_address
make -j $(nproc)
- name: Generate Wrappers
run: |
cd generator
UBSAN_OPTIONS="halt_on_error=1" \
ASAN_OPTIONS="detect_leaks=0:detect_stack_use_after_return=1:fast_unwind_on_malloc=0" \
./pythonqt_generator
- name: Upload Wrappers
uses: actions/upload-artifact@v3
with:
name: wrappers_ubuntu_5-latest
path: generated_cpp

- name: Build PythonQt
run: |
echo ======= SYSTEM INFO ========
uname -a; gcc --version | grep "gcc"; python3 --version; qmake --version
echo ============================
qmake -r PythonQt.pro CONFIG+=release CONFIG+=force_debug_info \
CONFIG+=sanitizer CONFIG+=sanitize_undefined CONFIG+=sanitize_address \
PYTHON_VERSION=$(python3 --version | cut -d " " -f 2 | cut -d "." -f1,2) \
PYTHON_DIR=$(which python3 | xargs dirname | xargs dirname)
make -j $(nproc)
UBSAN_OPTIONS="halt_on_error=1" ASAN_OPTIONS="detect_leaks=0:detect_stack_use_after_return=1:fast_unwind_on_malloc=0" \
make check TESTARGS="-platform offscreen"

0 comments on commit f15effe

Please sign in to comment.