ci: Bump PySide6 to 6.11.1 #657
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| on: [push, pull_request] | |
| jobs: | |
| build_src: | |
| name: Build sdist | |
| runs-on: ubuntu-latest | |
| outputs: | |
| pyside_ver: ${{ steps.version.outputs.pyside_ver }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v4 | |
| with: | |
| submodules: recursive | |
| - name: Set PySide version | |
| id: version | |
| run: echo "pyside_ver=$(cat .pyside-version)" >> $GITHUB_OUTPUT | |
| - name: Build sdist | |
| env: | |
| PYSIDE6_QTADS_NO_HARD_PYSIDE_REQUIREMENT: 1 | |
| run: | | |
| python -m pip install --user build | |
| python -m build --sdist | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v4 | |
| with: | |
| name: source | |
| path: dist/*.tar.gz | |
| # FIXME: Automate minimum Python, manylinux, and custom auditwheel lib filter | |
| build_wheels: | |
| needs: build_src | |
| name: Build wheel ${{ matrix.wheel }} for PySide ${{ matrix.pyside_ver }} on ${{ matrix.os }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| include: | |
| - os: windows-latest | |
| pyside_ver: ${{ needs.build_src.outputs.pyside_ver }} | |
| wheel: cp310-win_amd64 | |
| arch: x86_64 | |
| - os: windows-11-arm | |
| pyside_ver: ${{ needs.build_src.outputs.pyside_ver }} | |
| wheel: cp310-win_arm64 | |
| arch: arm64 | |
| - os: ubuntu-latest | |
| pyside_ver: ${{ needs.build_src.outputs.pyside_ver }} | |
| wheel: cp310-manylinux_x86_64 | |
| arch: x86_64 | |
| - os: macos-15-intel | |
| pyside_ver: ${{ needs.build_src.outputs.pyside_ver }} | |
| wheel: cp310-macosx_x86_64 | |
| arch: x86_64 | |
| - os: macos-latest | |
| pyside_ver: ${{ needs.build_src.outputs.pyside_ver }} | |
| wheel: cp310-macosx_arm64 | |
| arch: arm64 | |
| steps: | |
| - name: Download sdist | |
| uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v4 | |
| with: | |
| name: source | |
| - name: Unpack sdist | |
| shell: bash | |
| run: tar --strip-components 1 -xvf *.tar.gz | |
| - name: Setup Qt vars | |
| shell: bash | |
| run: | | |
| QT_VERSION=$(echo ${{ matrix.pyside_ver }} | cut -d. -f-3) | |
| if [[ "$RUNNER_OS" == "Windows" ]]; then | |
| QT_BASE_DIR=${GITHUB_WORKSPACE}\\Qt | |
| if [[ "${{ matrix.arch }}" == "arm64" ]]; then | |
| QT6_DIR=$QT_BASE_DIR\\$QT_VERSION\\msvc2022_arm64 | |
| QT_PLATFORM=windows_arm64 | |
| QT_ARCH=win64_msvc2022_arm64 | |
| else | |
| QT6_DIR=$QT_BASE_DIR\\$QT_VERSION\\msvc2022_64 | |
| QT_PLATFORM=windows | |
| QT_ARCH=win64_msvc2022_64 | |
| fi | |
| echo "QT_PLATFORM=$QT_PLATFORM" >> $GITHUB_ENV | |
| echo "QT_ARCH=$QT_ARCH" >> $GITHUB_ENV | |
| echo "CC=cl.exe" >> $GITHUB_ENV | |
| echo "CXX=cl.exe" >> $GITHUB_ENV | |
| elif [[ "$RUNNER_OS" == "macOS" ]]; then | |
| QT_BASE_DIR=${GITHUB_WORKSPACE}/Qt | |
| QT6_DIR=$QT_BASE_DIR/$QT_VERSION/macos | |
| elif [[ "$RUNNER_OS" == "Linux" ]]; then | |
| QT_BASE_DIR=${GITHUB_WORKSPACE}/Qt | |
| QT6_DIR=$QT_BASE_DIR/$QT_VERSION/gcc_64 | |
| else | |
| echo "Unsupported runner OS $RUNNER_OS" | |
| exit 1 | |
| fi | |
| echo "QT_VERSION=$QT_VERSION" >> $GITHUB_ENV | |
| echo "QT_BASE_DIR=$QT_BASE_DIR" >> $GITHUB_ENV | |
| echo "QT6_DIR=$QT6_DIR" >> $GITHUB_ENV | |
| - uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1 | |
| if: runner.os == 'Windows' | |
| with: | |
| arch: ${{ matrix.arch }} | |
| # XXX: Install headers compatible with shiboken's older libclang | |
| # C:\llvm\lib\clang\20\include\arm_vector_types.h:20:9: error: unknown type name '__mfp8' | |
| - name: Install LLVM and Clang | |
| if: matrix.os == 'windows-11-arm' | |
| uses: KyleMayes/install-llvm-action@ebc0426251bc40c7cd31162802432c68818ab8f0 # v2 | |
| with: | |
| version: "19" | |
| directory: "C:\\llvm" | |
| - name: Build wheels | |
| uses: pypa/cibuildwheel@8d2b08b68458a16aeb24b64e68a09ab1c8e82084 # v3.4.1 | |
| with: | |
| output-dir: wheelhouse | |
| env: | |
| CIBW_ENVIRONMENT_LINUX: > | |
| CMAKE_PREFIX_PATH=${{ env.QT6_DIR }}/lib/cmake | |
| LD_LIBRARY_PATH=${{ env.QT6_DIR }}/lib | |
| VERBOSE=1 | |
| CIBW_ENVIRONMENT_MACOS: > | |
| MACOSX_DEPLOYMENT_TARGET=13.0 | |
| CMAKE_OSX_ARCHITECTURES=${{ matrix.arch }} | |
| CMAKE_PREFIX_PATH=${QT6_DIR}/lib/cmake | |
| VERBOSE=1 | |
| CIBW_ENVIRONMENT_WINDOWS: > | |
| CLANG_INSTALL_DIR="${LLVM_PATH}" | |
| CMAKE_PREFIX_PATH="${QT6_DIR}\\lib\\cmake" | |
| VERBOSE=1 | |
| CIBW_BEFORE_BUILD_LINUX: > | |
| yum install -y mesa-libGL libxslt llvm clang clang-devel libxkbcommon-devel | |
| && python3 -m pip install --user "aqtinstall!=3.2.1" auditwheel | |
| && python3 -m aqt install-qt linux desktop ${{ env.QT_VERSION }} --outputdir ${{ env.QT_BASE_DIR }} --base http://mirrors.ocf.berkeley.edu/qt/ | |
| && python3 ./scripts/set-qt-constraint.py ${{ matrix.pyside_ver }} | |
| CIBW_BEFORE_BUILD_MACOS: > | |
| python3 -m pip install "aqtinstall!=3.2.1" | |
| && python3 -m aqt install-qt mac desktop ${{ env.QT_VERSION }} --outputdir ${{ env.QT_BASE_DIR }} --base http://mirrors.ocf.berkeley.edu/qt/ | |
| && python3 ./scripts/set-qt-constraint.py ${{ matrix.pyside_ver }} | |
| # Installing aqtinstall from Git for https://github.com/miurahr/aqtinstall/pull/1000 | |
| CIBW_BEFORE_BUILD_WINDOWS: > | |
| python3 -m pip install git+https://github.com/miurahr/aqtinstall.git | |
| && python3 -m aqt install-qt ${{ env.QT_PLATFORM }} desktop ${{ env.QT_VERSION }} ${{ env.QT_ARCH }} --outputdir ${{ env.QT_BASE_DIR }} --base http://mirrors.ocf.berkeley.edu/qt/ | |
| && python3 ./scripts/set-qt-constraint.py ${{ matrix.pyside_ver }} | |
| CIBW_MANYLINUX_X86_64_IMAGE: manylinux_2_34 | |
| CIBW_ARCHS_MACOS: x86_64 arm64 | |
| CIBW_BUILD_VERBOSITY: 3 | |
| CIBW_BUILD: ${{ matrix.wheel }} | |
| CIBW_REPAIR_WHEEL_COMMAND_LINUX: > | |
| python ./scripts/custom-auditwheel.py repair -w {dest_dir} --only-plat --plat manylinux_2_34_x86_64 {wheel} | |
| CIBW_REPAIR_WHEEL_COMMAND_MACOS: | |
| CIBW_REPAIR_WHEEL_COMMAND_WINDOWS: | |
| CIBW_TEST_COMMAND: python -m unittest discover -v -s {package}/tests | |
| CIBW_TEST_COMMAND_LINUX: QT_QPA_PLATFORM=minimal:enable_fonts python -m unittest discover -v -s {package}/tests | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v4 | |
| with: | |
| name: wheel-${{ matrix.wheel }} | |
| path: ./wheelhouse/*.whl | |
| build_aarch64_wheel: | |
| name: Build wheel ${{ matrix.wheel }} for PySide ${{ matrix.pyside_ver }} on ${{ matrix.os }} | |
| needs: build_src | |
| strategy: | |
| matrix: | |
| include: | |
| - os: ubuntu-24.04-arm | |
| pyside_ver: ${{ needs.build_src.outputs.pyside_ver }} | |
| wheel: cp310-manylinux_aarch64 | |
| arch: aarch64 | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - name: Download sdist | |
| uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v4 | |
| with: | |
| name: source | |
| - name: Unpack sdist | |
| shell: bash | |
| run: tar --strip-components 1 -xvf *.tar.gz | |
| - name: Install dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y \ | |
| build-essential \ | |
| libgl1-mesa-dev \ | |
| libxslt1-dev git \ | |
| libglib2.0-dev \ | |
| patchelf \ | |
| python-is-python3 \ | |
| python3 \ | |
| python3-venv \ | |
| python3-pip \ | |
| libxkbcommon-dev | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v6 | |
| with: | |
| python-version: "3.10" | |
| activate-environment: true | |
| - name: Install Python dependencies | |
| run: uv pip install "aqtinstall!=3.2.1" PySide6 auditwheel | |
| - name: Setup Qt vars | |
| shell: bash | |
| run: echo QT_VERSION=$(echo ${{ matrix.pyside_ver }} | cut -d. -f-3) >> $GITHUB_ENV | |
| - name: Install Qt | |
| run: aqt install-qt linux_arm64 desktop ${{ env.QT_VERSION }} --outputdir qt | |
| - name: Build | |
| env: | |
| LD_LIBRARY_PATH: ${{ github.workspace }}/qt/${{ env.QT_VERSION }}/gcc_arm64/lib | |
| CMAKE_PREFIX_PATH: ${{ github.workspace }}/qt/${{ env.QT_VERSION }}/gcc_arm64/lib/cmake | |
| run: uv build --verbose --wheel . | |
| - name: Fixup wheel | |
| env: | |
| LD_LIBRARY_PATH: ${{ env.VIRTUAL_ENV }}/lib/python3.12/site-packages/PySide6/ | |
| run: | | |
| mkdir dist-repaired | |
| python ./scripts/custom-auditwheel.py repair -w dist-repaired --only-plat --plat manylinux_2_39_aarch64 ./dist/pyside6_qtads-*.whl | |
| - name: Test wheel | |
| run: | | |
| uv pip install ./dist-repaired/*.whl | |
| cd tests | |
| python -m unittest discover | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v4 | |
| with: | |
| name: wheel-${{ matrix.wheel }} | |
| path: ./dist-repaired/*.whl | |
| upload_pypi: | |
| needs: [build_wheels, build_aarch64_wheel, build_src] | |
| runs-on: ubuntu-latest | |
| # upload to PyPI on every tag starting with 'v' | |
| if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v') | |
| steps: | |
| - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v4 | |
| with: | |
| name: source | |
| path: dist | |
| - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v4 | |
| with: | |
| pattern: wheel-* | |
| path: dist | |
| merge-multiple: true | |
| - uses: pypa/gh-action-pypi-publish@release/v1 | |
| with: | |
| user: __token__ | |
| password: ${{ secrets.PYPI_TOKEN }} |