-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Alexis Jeandet <alexis.jeandet@member.fsf.org>
- Loading branch information
Showing
6 changed files
with
118 additions
and
212 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,116 @@ | ||
name: GH Actions | ||
|
||
on: | ||
release: | ||
types: [published] | ||
push: | ||
pull_request: | ||
|
||
env: | ||
PYSIDE_VERSION: 6.6.2 | ||
PIP_EXTRA_INDEX_URL: "https://download.qt.io/official_releases/QtForPython/" | ||
|
||
jobs: | ||
build_sdist: | ||
name: Build source distribution | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Build sdist | ||
run: | | ||
sudo apt update && sudo apt install -y libgl-dev | ||
pip install aqtinstall | ||
aqt install-qt -O "$GITHUB_WORKSPACE"/Qt linux desktop ${{ env.PYSIDE_VERSION }} | ||
PATH="$GITHUB_WORKSPACE"/Qt/${{ env.PYSIDE_VERSION }}/gcc_64/bin:$PATH" LD_LIBRARY_PATH="$GITHUB_WORKSPACE"/Qt/${{ env.PYSIDE_VERSION }}/gcc_64/lib:$LD_LIBRARY_PATH" pipx run build --sdist | ||
- name: Upload artifact | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: cibw-sdist | ||
path: dist/*.tar.gz | ||
|
||
build_wheels: | ||
name: Build wheels on ${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
include: | ||
- os: ubuntu-latest7 | ||
arch: x86_64 | ||
- os: windows-latest | ||
arch: x86_64 | ||
- os: macos-13 # Intel | ||
arch: x86_64 | ||
- os: macos-14 # Apple Silicon | ||
arch: arm64 | ||
steps: | ||
- uses: ilammy/msvc-dev-cmd@v1 | ||
if: runner.os == 'Windows' | ||
with: | ||
arch: amd64 | ||
- uses: actions/checkout@v4 | ||
- name: Forward GITHUB_WORKSPACE env var | ||
shell: bash | ||
run: | | ||
echo "GITHUB_WORKSPACE=$GITHUB_WORKSPACE" >> $GITHUB_ENV | ||
- name: Build wheels | ||
uses: pypa/cibuildwheel@v2.16.5 | ||
env: | ||
PYSIDE_VERSION: ${{ env.PYSIDE_VERSION }} | ||
PIP_EXTRA_INDEX_URL: ${{ env.PIP_EXTRA_INDEX_URL }} | ||
CIBW_ENVIRONMENT_WINDOWS: PYSIDE_VERSION=${{ env.PYSIDE_VERSION }} PIP_EXTRA_INDEX_URL=${{ env.PIP_EXTRA_INDEX_URL }} PATH="${{ env.GITHUB_WORKSPACE }}\\Qt\\${{ env.PYSIDE_VERSION }}\\windows\\bin;$PATH" | ||
CIBW_ENVIRONMENT_MACOS: PYSIDE_VERSION=${{ env.PYSIDE_VERSION }} MACOSX_DEPLOYMENT_TARGET='11.0' PATH=${{ env.GITHUB_WORKSPACE }}/Qt/${{ env.PYSIDE_VERSION }}/macos/bin:$PATH | ||
CIBW_ENVIRONMENT_LINUX: PYSIDE_VERSION=${{ env.PYSIDE_VERSION }} PIP_EXTRA_INDEX_URL=${{ env.PIP_EXTRA_INDEX_URL }} PATH=$GITHUB_WORKSPACE/Qt/${{ env.PYSIDE_VERSION }}/gcc_64/bin:$PATH LD_LIBRARY_PATH=${{ env.GITHUB_WORKSPACE }}/Qt/${{ env.PYSIDE_VERSION }}/gcc_64/lib:$LD_LIBRARY_PATH | ||
CIBW_BEFORE_BUILD_WINDOWS: > | ||
pip install "aqtinstall" | ||
&& aqt install-qt -O ${{ env.GITHUB_WORKSPACE }}\\Qt windows desktop ${{ env.PYSIDE_VERSION }} win64_msvc2019_64 | ||
CIBW_BEFORE_BUILD_MACOS: > | ||
pip install "aqtinstall" | ||
&& aqt install-qt -O "${{ env.GITHUB_WORKSPACE }}/Qt" mac desktop ${{ env.PYSIDE_VERSION }} | ||
CIBW_BEFORE_BUILD_LINUX: > | ||
dnf install -y /usr/lib64/libxkbcommon.so.0 /usr/lib64/libxslt.so.1 /usr/bin/llvm-config clang | ||
&& pip install "aqtinstall" && aqt install-qt -O "${{ env.GITHUB_WORKSPACE }}/Qt" linux desktop ${{ env.PYSIDE_VERSION }} | ||
CIBW_MANYLINUX_X86_64_IMAGE: manylinux_2_28 | ||
CIBW_SKIP: "*-win32 *i686 *38-macosx*" | ||
CIBW_BUILD_VERBOSITY: 3 | ||
CIBW_ARCH: ${{ matrix.arch }} | ||
|
||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }} | ||
path: ./wheelhouse/*.whl | ||
|
||
|
||
upload_pypi: | ||
needs: [build_sdist, build_wheels] | ||
runs-on: ubuntu-latest | ||
# upload to PyPI only on github releases | ||
if: github.event_name == 'release' && github.event.action == 'published' && github.repository_owner == 'SciQLop' | ||
steps: | ||
- uses: actions/download-artifact@v4 | ||
with: | ||
pattern: cibw-* | ||
path: dist | ||
merge-multiple: true | ||
- uses: pypa/gh-action-pypi-publish@release/v1 | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.PYPI_PASSWORD }} | ||
skip-existing: true | ||
|
||
upload_test_pypi: | ||
needs: [build_sdist, build_wheels] | ||
runs-on: ubuntu-latest | ||
# upload to test PyPI on github pushes | ||
if: github.event_name == 'push' && github.repository_owner == 'SciQLop' | ||
steps: | ||
- uses: actions/download-artifact@v4 | ||
with: | ||
pattern: cibw-* | ||
path: dist | ||
merge-multiple: true | ||
- uses: pypa/gh-action-pypi-publish@release/v1 | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.PYPI_TEST_PASSWORD }} | ||
repository-url: https://test.pypi.org/legacy/ | ||
skip-existing: true |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains 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
This file contains 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