From 7ea22b432f97814077a1ec625c2f652a3836fc20 Mon Sep 17 00:00:00 2001 From: Eric Larson Date: Sun, 2 Jun 2024 17:01:08 -0400 Subject: [PATCH 01/10] ENH: Build aarch64 linux and simplify matrix --- .github/workflows/cibuildwheel.yml | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/.github/workflows/cibuildwheel.yml b/.github/workflows/cibuildwheel.yml index faf6895c..5ba1f44f 100644 --- a/.github/workflows/cibuildwheel.yml +++ b/.github/workflows/cibuildwheel.yml @@ -2,6 +2,8 @@ name: Wheels on: pull_request: + branches: + - master push: tags: @@ -14,19 +16,17 @@ jobs: strategy: fail-fast: false matrix: - os: ["ubuntu-22.04", "windows-2022", "macos-14"] - arch: ["x86_64", "arm64", "AMD64"] - exclude: - - os: ubuntu-22.04 - arch: arm64 - - os: ubuntu-22.04 - arch: AMD64 - - os: windows-2022 - arch: arm64 - - os: windows-2022 - arch: x86_64 - - os: macos-14 - arch: AMD64 + include: + - os: ubuntu-22.04 + arch: x86_64 + - os: ubuntu-22.04 + arch: aarch64 + - os: windows-2022 + arch: AMD64 + - os: macos-14 + arch: arm64 + - os: macos-13 + arch: x86_64 steps: - uses: actions/checkout@v4 @@ -40,7 +40,7 @@ jobs: CIBW_SKIP: "pp* cp36-* cp37-*" CIBW_ARCHS: ${{ matrix.arch }} CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014 - CIBW_TEST_SKIP: "*_arm64" + CIBW_MANYLINUX_AARCH64_IMAGE: manylinux2014 CIBW_TEST_REQUIRES: pytest CIBW_TEST_COMMAND: > python -c "import cftime; print(f'cftime v{cftime.__version__}')" && From dd3111c7a7a15e219731d01a84fba5bf8da48f13 Mon Sep 17 00:00:00 2001 From: Eric Larson Date: Tue, 4 Jun 2024 17:24:01 -0700 Subject: [PATCH 02/10] FIX: Speed up --- .github/workflows/cibuildwheel.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/cibuildwheel.yml b/.github/workflows/cibuildwheel.yml index b8e4fdcb..b28a1c4a 100644 --- a/.github/workflows/cibuildwheel.yml +++ b/.github/workflows/cibuildwheel.yml @@ -48,6 +48,8 @@ jobs: CIBW_ARCHS: ${{ matrix.arch }} CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014 CIBW_MANYLINUX_AARCH64_IMAGE: manylinux2014 + # Emulated testing is slow, so trust that the Python 3.12 test is good enough on aarch64 + CIBW_TEST_SKIP: "cp38-*_aarch64 cp39-*_aarch64 cp310-*_aarch64 cp311-*_aarch64" CIBW_TEST_REQUIRES: pytest CIBW_TEST_COMMAND: > python -c "import cftime; print(f'cftime v{cftime.__version__}')" && From 05212b75ca60a297452c6f20afc41ff33baae302 Mon Sep 17 00:00:00 2001 From: Eric Larson Date: Tue, 4 Jun 2024 17:24:27 -0700 Subject: [PATCH 03/10] DOC: Comment --- .github/workflows/cibuildwheel.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/cibuildwheel.yml b/.github/workflows/cibuildwheel.yml index b28a1c4a..0e3bacd6 100644 --- a/.github/workflows/cibuildwheel.yml +++ b/.github/workflows/cibuildwheel.yml @@ -49,6 +49,7 @@ jobs: CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014 CIBW_MANYLINUX_AARCH64_IMAGE: manylinux2014 # Emulated testing is slow, so trust that the Python 3.12 test is good enough on aarch64 + # (takes about 5 minutes per wheel to build, and 5 minutes to test) CIBW_TEST_SKIP: "cp38-*_aarch64 cp39-*_aarch64 cp310-*_aarch64 cp311-*_aarch64" CIBW_TEST_REQUIRES: pytest CIBW_TEST_COMMAND: > From c05d1731f58e00f0103041813246c50951e2ea4c Mon Sep 17 00:00:00 2001 From: Eric Larson Date: Tue, 4 Jun 2024 21:37:07 -0700 Subject: [PATCH 04/10] FIX: Faster --- .github/workflows/cibuildwheel.yml | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cibuildwheel.yml b/.github/workflows/cibuildwheel.yml index 0e3bacd6..dad4666c 100644 --- a/.github/workflows/cibuildwheel.yml +++ b/.github/workflows/cibuildwheel.yml @@ -12,7 +12,7 @@ jobs: build_bdist: name: "Build ${{ matrix.os }} (${{ matrix.arch }}) wheels" runs-on: ${{ matrix.os }} - timeout-minutes: 30 # should be long enough, but let's prevent hangs + timeout-minutes: 60 # should be long enough even on tags, but let's prevent hangs strategy: fail-fast: false matrix: @@ -40,11 +40,23 @@ jobs: platforms: all if: runner.os == 'Linux' && matrix.arch == 'aarch64' + + - name: Build just oldest and newest on PRs, all on tags + shell: bash + run: | + if [[ "${{ github.event_name }}" == "pull_request" ]]; then + CIBW_SKIP="pp* cp36-* cp37-* cp39-* cp310-* cp311-*" + else + CIBW_SKIP="pp* cp36-* cp37-*" + fi + echo "CIBW_SKIP=$CIBW_SKIP" >> $GITHUB_ENV + echo "Setting CIBW_SKIP=$CIBW_SKIP" + - name: "Building ${{ matrix.os }} (${{ matrix.arch }}) wheels" uses: pypa/cibuildwheel@v2.18.1 env: # Skips pypy py36,37 - CIBW_SKIP: "pp* cp36-* cp37-*" + CIBW_SKIP: ${{ env.CIBW_SKIP }} CIBW_ARCHS: ${{ matrix.arch }} CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014 CIBW_MANYLINUX_AARCH64_IMAGE: manylinux2014 From e207c9f918fbbc99829416d55b50eb2de1dae214 Mon Sep 17 00:00:00 2001 From: Eric Larson Date: Tue, 4 Jun 2024 22:07:59 -0700 Subject: [PATCH 05/10] FIX: Faster --- .github/workflows/cibuildwheel.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cibuildwheel.yml b/.github/workflows/cibuildwheel.yml index dad4666c..601afbb0 100644 --- a/.github/workflows/cibuildwheel.yml +++ b/.github/workflows/cibuildwheel.yml @@ -45,9 +45,9 @@ jobs: shell: bash run: | if [[ "${{ github.event_name }}" == "pull_request" ]]; then - CIBW_SKIP="pp* cp36-* cp37-* cp39-* cp310-* cp311-*" + CIBW_SKIP="pp* cp36-* cp37-* cp39-* cp310-* cp311-* *musllinux*" else - CIBW_SKIP="pp* cp36-* cp37-*" + CIBW_SKIP="pp* cp36-* cp37-* *musllinux_aarch64" fi echo "CIBW_SKIP=$CIBW_SKIP" >> $GITHUB_ENV echo "Setting CIBW_SKIP=$CIBW_SKIP" From 5dae2be90132035a47ceeda7b3b68495195d92de Mon Sep 17 00:00:00 2001 From: Eric Larson Date: Tue, 4 Jun 2024 22:34:29 -0700 Subject: [PATCH 06/10] FIX: Dont build a NumPy wheel, too --- .github/workflows/cibuildwheel.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cibuildwheel.yml b/.github/workflows/cibuildwheel.yml index 601afbb0..2b19379f 100644 --- a/.github/workflows/cibuildwheel.yml +++ b/.github/workflows/cibuildwheel.yml @@ -43,11 +43,12 @@ jobs: - name: Build just oldest and newest on PRs, all on tags shell: bash + # Always omit musl 3.8 b/c NumPy does not provide wheels for it run: | if [[ "${{ github.event_name }}" == "pull_request" ]]; then - CIBW_SKIP="pp* cp36-* cp37-* cp39-* cp310-* cp311-* *musllinux*" + CIBW_SKIP="pp* cp36-* cp37-* cp38-musllinux* cp39-* cp310-* cp311-* *musllinux*" else - CIBW_SKIP="pp* cp36-* cp37-* *musllinux_aarch64" + CIBW_SKIP="pp* cp36-* cp37-* cp38-musllinux* *musllinux_aarch64" fi echo "CIBW_SKIP=$CIBW_SKIP" >> $GITHUB_ENV echo "Setting CIBW_SKIP=$CIBW_SKIP" From 18bac95d78a341dea32c6791db41bd1dd9e472ad Mon Sep 17 00:00:00 2001 From: Eric Larson Date: Tue, 4 Jun 2024 22:36:41 -0700 Subject: [PATCH 07/10] DOC: why --- .github/workflows/cibuildwheel.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cibuildwheel.yml b/.github/workflows/cibuildwheel.yml index 2b19379f..3ed6687c 100644 --- a/.github/workflows/cibuildwheel.yml +++ b/.github/workflows/cibuildwheel.yml @@ -40,10 +40,11 @@ jobs: platforms: all if: runner.os == 'Linux' && matrix.arch == 'aarch64' - - name: Build just oldest and newest on PRs, all on tags shell: bash - # Always omit musl 3.8 b/c NumPy does not provide wheels for it + # - Always omit musl 3.8 b/c NumPy does not provide wheels for it + # - Omit musllinux on PRs (slow) + # - Omit musllinux_aarch64 because it's slow and niche run: | if [[ "${{ github.event_name }}" == "pull_request" ]]; then CIBW_SKIP="pp* cp36-* cp37-* cp38-musllinux* cp39-* cp310-* cp311-* *musllinux*" From 430e9e2bcd96da52c3ec01b9ee83fce76a65101e Mon Sep 17 00:00:00 2001 From: Eric Larson Date: Tue, 4 Jun 2024 22:45:40 -0700 Subject: [PATCH 08/10] FIX: 3.8 aarch64 skip for PRs --- .github/workflows/cibuildwheel.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/cibuildwheel.yml b/.github/workflows/cibuildwheel.yml index 3ed6687c..0d6695f4 100644 --- a/.github/workflows/cibuildwheel.yml +++ b/.github/workflows/cibuildwheel.yml @@ -43,11 +43,12 @@ jobs: - name: Build just oldest and newest on PRs, all on tags shell: bash # - Always omit musl 3.8 b/c NumPy does not provide wheels for it - # - Omit musllinux on PRs (slow) - # - Omit musllinux_aarch64 because it's slow and niche + # - Always omit musllinux_aarch64 because it's slow and niche + # - On PPs, omit musllinux for speed + # - On PRs, run just oldest and newest Python versions (and omit 3.8 aarch64) run: | if [[ "${{ github.event_name }}" == "pull_request" ]]; then - CIBW_SKIP="pp* cp36-* cp37-* cp38-musllinux* cp39-* cp310-* cp311-* *musllinux*" + CIBW_SKIP="pp* cp36-* cp37-* cp38-musllinux* cp39-* cp310-* cp311-* cp38-*-aarch64 *musllinux*" else CIBW_SKIP="pp* cp36-* cp37-* cp38-musllinux* *musllinux_aarch64" fi From ad196850a8193c017e2812816ae85d736337caec Mon Sep 17 00:00:00 2001 From: Eric Larson Date: Tue, 4 Jun 2024 22:56:38 -0700 Subject: [PATCH 09/10] FIX: Underscore --- .github/workflows/cibuildwheel.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cibuildwheel.yml b/.github/workflows/cibuildwheel.yml index 0d6695f4..785576ca 100644 --- a/.github/workflows/cibuildwheel.yml +++ b/.github/workflows/cibuildwheel.yml @@ -48,7 +48,7 @@ jobs: # - On PRs, run just oldest and newest Python versions (and omit 3.8 aarch64) run: | if [[ "${{ github.event_name }}" == "pull_request" ]]; then - CIBW_SKIP="pp* cp36-* cp37-* cp38-musllinux* cp39-* cp310-* cp311-* cp38-*-aarch64 *musllinux*" + CIBW_SKIP="pp* cp36-* cp37-* cp38-musllinux* cp39-* cp310-* cp311-* cp38-*_aarch64 *musllinux*" else CIBW_SKIP="pp* cp36-* cp37-* cp38-musllinux* *musllinux_aarch64" fi From 0ffa73af56a36fa7261812728660ba8d13847f10 Mon Sep 17 00:00:00 2001 From: Eric Larson Date: Wed, 5 Jun 2024 21:44:43 -0700 Subject: [PATCH 10/10] FIX: What --- Changelog | 1 + 1 file changed, 1 insertion(+) diff --git a/Changelog b/Changelog index 005d209b..210f5bb0 100644 --- a/Changelog +++ b/Changelog @@ -1,5 +1,6 @@ since version 1.6.3 release =========================== + * build aarch64 linux wheels (issue #333). * build musllinux wheels (issue #307). * return empty array if one provided to date2num (issue #315). * numpy 2.0 compatibility (issue #325).