From 948c1477d9b978f8307a101f62945ccc263124d5 Mon Sep 17 00:00:00 2001 From: scaramallion Date: Fri, 2 May 2025 08:16:24 +1000 Subject: [PATCH 1/8] Test building wheels --- .github/workflows/release-wheels.yml | 46 ++++++++++++++-------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/.github/workflows/release-wheels.yml b/.github/workflows/release-wheels.yml index 95dc10f..e9d50dd 100644 --- a/.github/workflows/release-wheels.yml +++ b/.github/workflows/release-wheels.yml @@ -3,9 +3,9 @@ name: release-deploy on: release: types: [ published ] - # push: - # branches: [ main ] - # pull_request: + push: + branches: [ main ] + pull_request: jobs: build-sdist: @@ -157,7 +157,7 @@ jobs: run: | python -m pip install -U pip python -m pip install -U setuptools-rust - python -m pip install cibuildwheel==2.16.2 + python -m pip install cibuildwheel>=2.23 - name: Build wheels env: @@ -233,22 +233,22 @@ jobs: # The pypi upload fails with non-linux containers, so grab the uploaded # artifacts and run using those # See: https://github.com/pypa/gh-action-pypi-publish/discussions/15 - deploy: - name: Upload wheels to PyPI - needs: [ test-package ] - runs-on: ubuntu-latest - environment: - name: pypi - url: https://pypi.org/project/pylibjpeg-rle/ - permissions: - id-token: write - - steps: - - name: Download the wheels - uses: actions/download-artifact@v4 - with: - path: dist/ - merge-multiple: true - - - name: Publish package to PyPi - uses: pypa/gh-action-pypi-publish@release/v1 + # deploy: + # name: Upload wheels to PyPI + # needs: [ test-package ] + # runs-on: ubuntu-latest + # environment: + # name: pypi + # url: https://pypi.org/project/pylibjpeg-rle/ + # permissions: + # id-token: write + # + # steps: + # - name: Download the wheels + # uses: actions/download-artifact@v4 + # with: + # path: dist/ + # merge-multiple: true + # + # - name: Publish package to PyPi + # uses: pypa/gh-action-pypi-publish@release/v1 From a78705f97e9c54d97b0c32df057d278427489ffb Mon Sep 17 00:00:00 2001 From: scaramallion Date: Fri, 2 May 2025 08:26:54 +1000 Subject: [PATCH 2/8] Test fix 1 --- .github/workflows/release-wheels.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release-wheels.yml b/.github/workflows/release-wheels.yml index e9d50dd..ff27ad9 100644 --- a/.github/workflows/release-wheels.yml +++ b/.github/workflows/release-wheels.yml @@ -167,7 +167,10 @@ jobs: CIBW_MANYLINUX_I686_IMAGE: ${{ matrix.manylinux_image }} CIBW_BUILD_VERBOSITY: 1 CIBW_BEFORE_ALL: | - curl -sSf https://sh.rustup.rs | sh -s -- --default-toolchain stable -y && rustup target add i686-pc-windows-msvc && rustup target add aarch64-apple-darwin + curl -sSf https://sh.rustup.rs | sh -s -- --default-toolchain stable -y && \ + rustup target add i686-pc-windows-msvc && \ + rustup target add aarch64-apple-darwin && \ + rustup target add x86_64-apple-darwin CIBW_ENVIRONMENT: 'PATH="$PATH:$HOME/.cargo/bin"' run: | python --version From e35b6c8b3000dd03da4108650ff2703793bc6409 Mon Sep 17 00:00:00 2001 From: scaramallion Date: Fri, 2 May 2025 08:28:28 +1000 Subject: [PATCH 3/8] Test fix 2 --- .github/workflows/release-wheels.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release-wheels.yml b/.github/workflows/release-wheels.yml index ff27ad9..9a7db62 100644 --- a/.github/workflows/release-wheels.yml +++ b/.github/workflows/release-wheels.yml @@ -168,9 +168,9 @@ jobs: CIBW_BUILD_VERBOSITY: 1 CIBW_BEFORE_ALL: | curl -sSf https://sh.rustup.rs | sh -s -- --default-toolchain stable -y && \ - rustup target add i686-pc-windows-msvc && \ - rustup target add aarch64-apple-darwin && \ - rustup target add x86_64-apple-darwin + rustup target add i686-pc-windows-msvc && \ + rustup target add aarch64-apple-darwin && \ + rustup target add x86_64-apple-darwin CIBW_ENVIRONMENT: 'PATH="$PATH:$HOME/.cargo/bin"' run: | python --version From 2910fe8a0b5509557e8dc0e073778b627dee9608 Mon Sep 17 00:00:00 2001 From: scaramallion Date: Fri, 2 May 2025 08:30:08 +1000 Subject: [PATCH 4/8] Test fix 3 --- .github/workflows/release-wheels.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/release-wheels.yml b/.github/workflows/release-wheels.yml index 9a7db62..8a8a306 100644 --- a/.github/workflows/release-wheels.yml +++ b/.github/workflows/release-wheels.yml @@ -167,10 +167,7 @@ jobs: CIBW_MANYLINUX_I686_IMAGE: ${{ matrix.manylinux_image }} CIBW_BUILD_VERBOSITY: 1 CIBW_BEFORE_ALL: | - curl -sSf https://sh.rustup.rs | sh -s -- --default-toolchain stable -y && \ - rustup target add i686-pc-windows-msvc && \ - rustup target add aarch64-apple-darwin && \ - rustup target add x86_64-apple-darwin + curl -sSf https://sh.rustup.rs | sh -s -- --default-toolchain stable -y && rustup target add i686-pc-windows-msvc && rustup target add aarch64-apple-darwin && rustup target add x86_64-apple-darwin CIBW_ENVIRONMENT: 'PATH="$PATH:$HOME/.cargo/bin"' run: | python --version From 75133429413199021c1c7a7d27fd73f835089af8 Mon Sep 17 00:00:00 2001 From: scaramallion Date: Fri, 2 May 2025 08:37:42 +1000 Subject: [PATCH 5/8] Test fix 4 --- pyproject.toml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index 859c0af..9c9c2db 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -71,3 +71,7 @@ ignore_missing_imports = true disallow_untyped_calls = true disallow_untyped_defs = true disallow_incomplete_defs = true + + +[tool.cibuildwheel.macos.environment] +MACOSX_DEPLOYMENT_TARGET = "10.12" # required for rustc From 0a1597ae0863d91f73a9d95500db5c6acfa34a4d Mon Sep 17 00:00:00 2001 From: scaramallion Date: Fri, 2 May 2025 08:40:50 +1000 Subject: [PATCH 6/8] Test fix 5 --- .github/workflows/release-wheels.yml | 2 +- pyproject.toml | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/release-wheels.yml b/.github/workflows/release-wheels.yml index 8a8a306..ac43967 100644 --- a/.github/workflows/release-wheels.yml +++ b/.github/workflows/release-wheels.yml @@ -168,7 +168,7 @@ jobs: CIBW_BUILD_VERBOSITY: 1 CIBW_BEFORE_ALL: | curl -sSf https://sh.rustup.rs | sh -s -- --default-toolchain stable -y && rustup target add i686-pc-windows-msvc && rustup target add aarch64-apple-darwin && rustup target add x86_64-apple-darwin - CIBW_ENVIRONMENT: 'PATH="$PATH:$HOME/.cargo/bin"' + CIBW_ENVIRONMENT: PATH="$PATH:$HOME/.cargo/bin" MACOSX_DEPLOYMENT_target='10.12' run: | python --version python -m cibuildwheel --output-dir dist diff --git a/pyproject.toml b/pyproject.toml index 9c9c2db..859c0af 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -71,7 +71,3 @@ ignore_missing_imports = true disallow_untyped_calls = true disallow_untyped_defs = true disallow_incomplete_defs = true - - -[tool.cibuildwheel.macos.environment] -MACOSX_DEPLOYMENT_TARGET = "10.12" # required for rustc From 628a672e76704e93f75a34c878acc4f0f104971f Mon Sep 17 00:00:00 2001 From: scaramallion Date: Fri, 2 May 2025 08:42:23 +1000 Subject: [PATCH 7/8] Test fix 6 --- .github/workflows/release-wheels.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release-wheels.yml b/.github/workflows/release-wheels.yml index ac43967..3a389b9 100644 --- a/.github/workflows/release-wheels.yml +++ b/.github/workflows/release-wheels.yml @@ -168,7 +168,7 @@ jobs: CIBW_BUILD_VERBOSITY: 1 CIBW_BEFORE_ALL: | curl -sSf https://sh.rustup.rs | sh -s -- --default-toolchain stable -y && rustup target add i686-pc-windows-msvc && rustup target add aarch64-apple-darwin && rustup target add x86_64-apple-darwin - CIBW_ENVIRONMENT: PATH="$PATH:$HOME/.cargo/bin" MACOSX_DEPLOYMENT_target='10.12' + CIBW_ENVIRONMENT: PATH="$PATH:$HOME/.cargo/bin" MACOSX_DEPLOYMENT_TARGET='10.12' run: | python --version python -m cibuildwheel --output-dir dist From c5cca637c39cfbe8936014b814fe3f0692413180 Mon Sep 17 00:00:00 2001 From: scaramallion Date: Fri, 2 May 2025 08:45:05 +1000 Subject: [PATCH 8/8] Finalise --- .github/workflows/release-wheels.yml | 44 ++++++++++++++-------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/.github/workflows/release-wheels.yml b/.github/workflows/release-wheels.yml index 3a389b9..c8c878d 100644 --- a/.github/workflows/release-wheels.yml +++ b/.github/workflows/release-wheels.yml @@ -3,9 +3,9 @@ name: release-deploy on: release: types: [ published ] - push: - branches: [ main ] - pull_request: + # push: + # branches: [ main ] + # pull_request: jobs: build-sdist: @@ -233,22 +233,22 @@ jobs: # The pypi upload fails with non-linux containers, so grab the uploaded # artifacts and run using those # See: https://github.com/pypa/gh-action-pypi-publish/discussions/15 - # deploy: - # name: Upload wheels to PyPI - # needs: [ test-package ] - # runs-on: ubuntu-latest - # environment: - # name: pypi - # url: https://pypi.org/project/pylibjpeg-rle/ - # permissions: - # id-token: write - # - # steps: - # - name: Download the wheels - # uses: actions/download-artifact@v4 - # with: - # path: dist/ - # merge-multiple: true - # - # - name: Publish package to PyPi - # uses: pypa/gh-action-pypi-publish@release/v1 + deploy: + name: Upload wheels to PyPI + needs: [ test-package ] + runs-on: ubuntu-latest + environment: + name: pypi + url: https://pypi.org/project/pylibjpeg-rle/ + permissions: + id-token: write + + steps: + - name: Download the wheels + uses: actions/download-artifact@v4 + with: + path: dist/ + merge-multiple: true + + - name: Publish package to PyPi + uses: pypa/gh-action-pypi-publish@release/v1