From c94a1ad6ac423c416183b52d8b524b5eeb791af6 Mon Sep 17 00:00:00 2001 From: Paul McCarthy Date: Thu, 2 Nov 2023 18:39:02 +0000 Subject: [PATCH 1/3] CI: Add test release workflow. Add hack to allow numpy to be built from sourve without BLAS being present --- .ci/build_wheels.sh | 5 ++ .github/workflows/release.yaml | 7 +- .github/workflows/test_release.yaml | 110 ++++++++++++++++++++++++++++ 3 files changed, 119 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/test_release.yaml diff --git a/.ci/build_wheels.sh b/.ci/build_wheels.sh index 2ce9a7ee..d356775c 100755 --- a/.ci/build_wheels.sh +++ b/.ci/build_wheels.sh @@ -21,6 +21,11 @@ export CIBW_TEST_REQUIRES="cython pytest numpy nibabel coverage cython-coverage # history [GHA logs of failing builds deleted]). export CIBW_SKIP="pp*" +# Make sure numpy can be built without BLAS being present +# (it may end up being built from source on some platforms) +# https://github.com/numpy/numpy/issues/24703#issuecomment-1722379388 +export PIP_CONFIG_SETTINGS='setup-args="-Dallow-noblas=true"' + # Skip i686 tests - I have experienced hangs on these # platforms, which I traced to a trivial numpy operation - # "numpy.linalg.det(numpy.eye(3))". This occurs when numpy diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index b2641e42..8e3f0dcc 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -1,6 +1,7 @@ -# This workflow builds binary wheels for indexed_gzip, -# for different platforms and different Python versions, -# using cibuildwheel. It is triggered manually. +# This workflow builds binary wheels for indexed_gzip, for +# different platforms and different Python versions, using +# cibuildwheel. It is triggered manually. The built wheels +# are published to PyPi. on: workflow_dispatch diff --git a/.github/workflows/test_release.yaml b/.github/workflows/test_release.yaml new file mode 100644 index 00000000..85e48d11 --- /dev/null +++ b/.github/workflows/test_release.yaml @@ -0,0 +1,110 @@ +# This workflow builds binary wheels for indexed_gzip, +# for different platforms and different Python versions, +# using cibuildwheel. It is triggered manually. + +on: + workflow_dispatch + +defaults: + run: + shell: bash + +jobs: + + build_sdist: + name: Build source distribution + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + - uses: actions/setup-python@v2 + name: Install Python + with: + python-version: "3.10" + + - name: Build sdist + run: python setup.py sdist + + - uses: actions/upload-artifact@v2 + with: + name: sdist + path: ./dist/*.tar.gz + + build_macos_wheels: + name: Build macos wheels + runs-on: macos-latest + + env: + PLATFORM: ${{ matrix.os }} + CIBW_ARCHS_MACOS: "x86_64 arm64 universal2" + + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-python@v2 + name: Install Python + with: + python-version: "3.10" + + - name: Build wheels + run: bash ./.ci/build_wheels.sh + + - uses: actions/upload-artifact@v2 + with: + name: wheels + path: ./dist/*.whl + + build_windows_wheels: + name: Build Windows ${{ matrix.arch }} wheels + runs-on: windows-latest + + strategy: + matrix: + arch: ["AMD64", "x86"] + + env: + PLATFORM: windows-latest + CIBW_ARCHS_WINDOWS: ${{ matrix.arch }} + + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-python@v2 + name: Install Python + with: + python-version: "3.10" + - name: Download zlib + run: bash ./.ci/download_zlib.sh + - name: Build wheels + run: bash ./.ci/build_wheels.sh + - uses: actions/upload-artifact@v2 + with: + name: wheels + path: ./dist/*.whl + + build_linux_wheels: + # Typo left in for hilarity + name: Build Linux ${{ matrix.arch }} eels + runs-on: ubuntu-latest + + strategy: + matrix: + arch: ["x86_64", "i686", "aarch64"] + + env: + PLATFORM: ubuntu-latest + CIBW_ARCHS_LINUX: ${{ matrix.arch }} + + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-python@v2 + name: Install Python + with: + python-version: "3.10" + - name: Set up QEMU for emulated (e.g. ARM) builds + if: ${{ matrix.arch == 'aarch64' }} + uses: docker/setup-qemu-action@v1 + - name: Build wheels + run: bash ./.ci/build_wheels.sh + - uses: actions/upload-artifact@v2 + with: + name: wheels + path: ./dist/*.whl From 42fbda7b139c927ab8c051643e69715551463055 Mon Sep 17 00:00:00 2001 From: Paul McCarthy Date: Thu, 2 Nov 2023 18:39:29 +0000 Subject: [PATCH 2/3] DOC: CHangelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7533be51..4714bf83 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,7 @@ # `indexed_gzip` changelog -## 1.8.6 (November 2nd 2023) +## 1.8.7 (November 2nd 2023) * Enable Python 3.12 and `musllinux` builds (#139). From 696ca09e7e72abb5426925596755ce0cdc67ac97 Mon Sep 17 00:00:00 2001 From: Paul McCarthy Date: Thu, 2 Nov 2023 18:39:41 +0000 Subject: [PATCH 3/3] MNT: Version --- indexed_gzip/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indexed_gzip/__init__.py b/indexed_gzip/__init__.py index a9d25c4e..328b3c58 100644 --- a/indexed_gzip/__init__.py +++ b/indexed_gzip/__init__.py @@ -19,4 +19,4 @@ """ -__version__ = '1.8.6' +__version__ = '1.8.7'