Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
a1e2dfe
MAINT: Switch to GHA cibuildwheel
larsoner Jun 11, 2024
c435823
FIX: More
larsoner Jun 11, 2024
9868e0d
FIX: Where
larsoner Jun 11, 2024
1d65366
FIX: Select
larsoner Jun 11, 2024
33b43aa
FIX: More
larsoner Jun 11, 2024
9f14895
FIX: Need
larsoner Jun 11, 2024
042c9f1
FIX: Syntax
larsoner Jun 11, 2024
c931d7e
FIX: Closer
larsoner Jun 11, 2024
927405d
FIX: Path
larsoner Jun 11, 2024
84f5c12
FIX: More
larsoner Jun 11, 2024
ca1c9c1
FIX: Pass
larsoner Jun 11, 2024
1fdc617
FIX: Pass through manually
larsoner Jun 11, 2024
372a023
FIX: Pass it on
larsoner Jun 11, 2024
d05e61e
FIX: Try another
larsoner Jun 11, 2024
d8406bc
FIX: Try another
larsoner Jun 11, 2024
8af2c85
FIX: Fix macOS
larsoner Jun 11, 2024
87cf54c
WIP: Test fix
larsoner Jun 11, 2024
7865d7f
FIX: Windows
larsoner Jun 11, 2024
1293287
FIX: Need coverage
larsoner Jun 11, 2024
d6e5c27
FIX: Windows
larsoner Jun 11, 2024
18ff07a
FIX: Selector
larsoner Jun 11, 2024
64b38e9
FIX: Order
larsoner Jun 11, 2024
51bb92d
FIX: Try installing a usable 3.8
larsoner Jun 11, 2024
c575df4
FIX: Path
larsoner Jun 11, 2024
8b09400
FIX: More
larsoner Jun 11, 2024
b01ea11
FIX: Quote
larsoner Jun 11, 2024
d6a921c
FIX: Archs
larsoner Jun 11, 2024
c0c4ca0
FIX: Speed up aarch64
larsoner Jun 11, 2024
41b2ae8
TST: Test pip-pre [pip-pre]
larsoner Jun 11, 2024
27e7828
FIX: Need wheel [pip-pre]
larsoner Jun 11, 2024
4e91be9
FIX: Shell
larsoner Jun 11, 2024
b527565
FIX: Skip [pip-pre]
larsoner Jun 11, 2024
707c04a
MAINT: Remove [pip-pre]
larsoner Jun 12, 2024
6eba64b
MAINT: Remove better [pip-pre]
larsoner Jun 12, 2024
a6593f1
TST: Test aarch [aarch64]
larsoner Jun 12, 2024
7c5f36b
TST: Regular PR mode
larsoner Jun 12, 2024
6e67427
TST: Dev [pip-pre]
larsoner Jun 12, 2024
e4e92a8
TST: aarch64 [aarch64]
larsoner Jun 12, 2024
cafbdde
FIX: Just one dev is enough
larsoner Jun 13, 2024
ae2f10c
Update setup_configure.py
larsoner Jun 13, 2024
d8d4d19
FIX: Tweak test
larsoner Jun 13, 2024
1c07912
FIX: Correct test
larsoner Jun 13, 2024
4e67388
WIP: Reenable failing test and debug it
larsoner Jun 14, 2024
6f835e3
FIX: Restore
larsoner Jun 14, 2024
a8db9a6
ENH: Add Python 3.13 to nightly [pip-pre]
larsoner Jun 20, 2024
31d63b9
Merge remote-tracking branch 'upstream/master' into gha
larsoner Jun 24, 2024
d4af36f
MAINT: Catch up with prerelease [pip-pre]
larsoner Jun 24, 2024
da89e0d
TST: Maybe too fast? [pip-pre]
larsoner Jun 24, 2024
fae1e0f
TST: Just checking in
larsoner Jul 12, 2024
a60d567
FIX: Oh right 11 is gone
larsoner Jul 12, 2024
16b019f
Apply suggestions from code review
larsoner Jul 15, 2024
88e6b6c
DOC: Docs
larsoner Jul 15, 2024
cd92e07
FIX: Comment
larsoner Jul 16, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
181 changes: 181 additions & 0 deletions .github/workflows/build_wheels.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,181 @@
---
name: Build
concurrency:
group: ${{ github.workflow }}-${{ github.event.number }}-${{ github.event.ref }}
cancel-in-progress: true

# Adapted from https://github.com/matplotlib/matplotlib/blob/main/.github/workflows/nightlies.yml
# and https://cibuildwheel.pypa.io/en/stable/setup/#github-actions

# 1. Move as much as possible to pyproject.toml instead of using env vars
# 2. Use native compiling for macOS via -13 (Intel) and -14 (arm) runners
# 3. For aarch64, only ever test py312 and skip testing other python versions
# (for speed).
# 4. Split aarch64 python version builds over jobs, for all other systems/archs build
# wheels for all Python versions in a single job (for speed).
# 5. On pushes, build and test all wheels and push as release artifacts (in
# draft mode for main branch pushes).
# 6. On scheduled runs, build and test all wheels against
# scientific-python-nightly-wheels NumPy dev, then upload the resulting wheels there.
# 7. On PRs, only build one aarch64 wheel (for speed).
# 8. On PRs, build against NumPy dev if [pip-pre] is in the commit message.
# 9. On PRs, build all aarch64 variants if [aarch64] is in the commit message.

on:
# Run daily at 1:23 UTC to upload nightly wheels to Anaconda Cloud
schedule:
- cron: '23 1 * * *'
# Run on demand with workflow dispatch
workflow_dispatch:
# Run on all PRs
pull_request:
# Run on tags
push:
branches:
- master
tags:
- '*'

permissions:
actions: read
contents: write

jobs:
build_wheels:
name: 'Wheels: ${{ matrix.os }} ${{ matrix.arch }} ${{ matrix.python }}'
runs-on: ${{ matrix.os }}
continue-on-error: true
strategy:
matrix:
# Wheel builds are fast except for aarch64, so split that into multiple jobs,
# one for each Python version
os: [ubuntu-latest]
arch: [aarch64]
python: ["3.8", "3.9", "3.10", "3.11", "3.12"]
include:
- os: ubuntu-latest
arch: x86_64
- os: windows-latest
arch: AMD64
- os: macos-14
arch: arm64
- os: macos-13
arch: x86_64
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # get the non-merge commit for PRs

# Get HDF5 outside of cibuildwheel so that we can set env vars via GITHUB_ENV
# inside the HDF5-getting scripts and have them be in effect for the
# cibuildwheel step.

# Cache HDF5
- name: Cache built HDF5
uses: actions/cache@v4
with:
key: ${{ matrix.os }}-${{ matrix.arch }}-6
path: cache/hdf5

# Windows HDF5
- uses: nuget/setup-nuget@v2
if: runner.os == 'Windows'
- uses: actions/setup-python@v5
with:
python-version: 3.12
if: runner.os == 'Windows'
- run: bash ./ci/cibw_before_all_windows.sh "${{ github.workspace }}"
if: runner.os == 'Windows'

# macOS HDF5
- run: bash ./ci/cibw_before_all_macos.sh "${{ github.workspace }}"
if: runner.os == 'macOS'
# Hack for 3.8 bug (https://github.com/pypa/cibuildwheel/pull/1871#issuecomment-2161613619)
- uses: actions/setup-python@v5
with:
python-version: 3.8
if: runner.os == 'macOS' && matrix.arch == 'arm64'

# Linux emulation for aarch64 support
# https://cibuildwheel.pypa.io/en/stable/faq/#emulation
- uses: docker/setup-qemu-action@v3
with:
platforms: all
if: runner.os == 'Linux' && matrix.arch == 'aarch64'

# Triage build, and set outputs.skip = 1 if on aarch64 and we don't want to build the wheel
- run: bash ./ci/triage_build.sh "${{ matrix.arch }}" "${{ github.event.pull_request.head.sha || github.sha }}" "${{ matrix.python }}"
id: triage

# Now actually build the wheels
- uses: pypa/[email protected]
env:
# Note that tool.cibuildwheel "skip" in pyproject.toml also limits what gets built
CIBW_ARCHS: ${{ matrix.arch }}
CIBW_BUILD: ${{ env.CIBW_BUILD }}
CIBW_SKIP: ${{ env.CIBW_SKIP }}
CIBW_BEFORE_BUILD: ${{ env.CIBW_BEFORE_BUILD }}
CIBW_BUILD_FRONTEND: ${{ env.CIBW_BUILD_FRONTEND }}
TOX_TEST_LIMITED: ${{ env.TOX_TEST_LIMITED }}
CIBW_PRERELEASE_PYTHONS: ${{ env.CIBW_PRERELEASE_PYTHONS }}
CIBW_BEFORE_TEST: ${{ env.CIBW_BEFORE_TEST }}
if: steps.triage.outputs.skip != '1'

# And upload the results
- uses: actions/upload-artifact@v4
with:
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}
path: ./wheelhouse/*.whl
if: steps.triage.outputs.skip != '1'

upload_wheels:
name: Upload wheels
needs: build_wheels
runs-on: ubuntu-latest
defaults:
run:
shell: bash -el {0}
steps:
- uses: actions/download-artifact@v4
with:
pattern: cibw-wheels-*
merge-multiple: true
path: dist
- run: pwd && ls -alt . && ls -alt dist/
# If it's a PR, do nothing else.
# If it's a scheduled run, it was built with nightly NumPy, push to scientific-python:
- name: Upload wheels to Anaconda Cloud as nightlies
uses: scientific-python/upload-nightly-action@b67d7fcc0396e1128a474d1ab2b48aa94680f9fc # 0.5.0
with:
artifacts_path: dist
anaconda_nightly_upload_token: ${{ secrets.ANACONDA_ORG_UPLOAD_TOKEN }}
if: github.repository_owner == 'h5py' && github.event_name == 'schedule'
# If it's a push to master, create a (private) draft release;
# If it's a tag, publish it to the existing public release, knowing that the tag name
# is the same as th release name:
- name: Set release variables
id: vars
run: |
set -eo pipefail
if [[ "${{ github.ref_type }}" == "tag" ]]; then
RELEASE_NAME="" # will use the tag name, which we always set to the release name
GENERATE=false
else
RELEASE_NAME=dev
GENERATE=true
fi
echo "release_name=$RELEASE_NAME" >> $GITHUB_OUTPUT
echo "generate=$GENERATE" >> $GITHUB_OUTPUT

- name: Upload to GitHub releases
uses: softprops/action-gh-release@v2
# https://github.com/softprops/action-gh-release?tab=readme-ov-file#inputs
with:
name: ${{ steps.vars.outputs.release_name }}
# Note that draft releases are not public
draft: ${{ github.ref_type != 'tag' }}
prerelease: ${{ github.ref_type != 'tag' }}
generate_release_notes: ${{ steps.vars.outputs.generate }}
files: |
dist/*.whl
if: github.repository_owner == 'h5py' && github.event_name == 'push'
107 changes: 0 additions & 107 deletions .github/workflows/nightlies.yml

This file was deleted.

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ MANIFEST
coverage.xml
.vscode/
.mypy_cache/
/cache/

# Rever
rever/
Expand Down
13 changes: 0 additions & 13 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,19 +34,6 @@ jobs:
- HDF5_VERSION=1.10.5
- HDF5_DIR=$HDF5_CACHE_DIR/$HDF5_VERSION
- H5PY_ENFORCE_COVERAGE=yes
- arch: arm64
services: docker
python: 3.9
virt: vm
env:
- TOXENV=py39-test-deps
- TOX_OPTS=""
- HDF5_VERSION=1.10.5
- HDF5_DIR=$HDF5_CACHE_DIR/$HDF5_VERSION
- H5PY_ENFORCE_COVERAGE=yes
- CIBW_BUILD: cp3*-manylinux*
- CIBW_MANYLINUX_AARCH64_IMAGE: ghcr.io/h5py/manylinux2014_aarch64-hdf5
- CIBW_ARCHS: aarch64
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a couple more aarch64-specific bits further down in this file, which could be cleaned up now that we're only using Travis for ppc64le.

before_install:
# - export PATH=/usr/lib/ccache:$PATH
- ccache -s
Expand Down
Loading