Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
46 changes: 43 additions & 3 deletions .github/workflows/cibuildwheel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
include:
- os: ubuntu-22.04
arch: x86_64
- os: ubuntu-22.04
- os: ubuntu-24.04-arm
arch: aarch64

steps:
Expand Down Expand Up @@ -138,8 +138,48 @@ jobs:
path: ${{ github.workspace }}/wheelhouse/*.whl


build_wheels_windows_arm:
name: Build wheels for ARM64 on Windows
runs-on: windows-11-arm
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0

- uses: actions/setup-python@v6
name: Install Python
with:
python-version: 3.x

- name: Install vcpkg dependencies
shell: pwsh
run: |
# Install vcpkg
git clone https://github.com/Microsoft/vcpkg.git C:\vcpkg
cd C:\vcpkg
.\bootstrap-vcpkg.bat

# Install netcdf and dependencies
.\vcpkg.exe install hdf5:arm64-windows netcdf-c:arm64-windows zlib:arm64-windows

# Set environment variables for build
echo "HDF5_DIR=C:\vcpkg\installed\arm64-windows" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
echo "NETCDF4_DIR=C:\vcpkg\installed\arm64-windows" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append

- name: Build wheels for Windows ARM64
uses: pypa/cibuildwheel@v3.3.0
env:
CIBW_ARCHS: ARM64
CIBW_SKIP: "cp310-* cp314t-*"

- uses: actions/upload-artifact@v5
with:
name: pypi-artifacts-windows-11-arm-ARM64
path: ${{ github.workspace }}/wheelhouse/*.whl


show-artifacts:
needs: [build_bdist, build_sdist, build_wheels_winmac]
needs: [build_bdist, build_sdist, build_wheels_winmac, build_wheels_windows_arm]
name: "Show artifacts"
runs-on: ubuntu-22.04
steps:
Expand All @@ -155,7 +195,7 @@ jobs:


publish-artifacts-pypi:
needs: [build_bdist, build_sdist, build_wheels_winmac]
needs: [build_bdist, build_sdist, build_wheels_winmac, build_wheels_windows_arm]
name: "Publish to PyPI"
runs-on: ubuntu-22.04
# upload to PyPI for every tag starting with 'v'
Expand Down
12 changes: 11 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ classifiers = [
dependencies = [
"cftime",
"certifi",
"numpy",
"numpy>=2.3.0; platform_system == 'Windows' and platform_machine == 'ARM64'",
"numpy>=1.21.2; platform_system != 'Windows' or platform_machine != 'ARM64'",
]
dynamic = ["version"]

Expand Down Expand Up @@ -156,3 +157,12 @@ environment = {MACOSX_DEPLOYMENT_TARGET="14.0",HDF5_DIR="/Users/runner/micromamb
select = "*-win_*"
inherit.environment = "append"
environment = {HDF5_DIR='C:\\\\Users\\runneradmin\\micromamba\\envs\\build\\Library',netCDF4_DIR='C:\\\\Users\\runneradmin\\micromamba\\envs\\build\\Library',PATH='C:\\\\Users\\runneradmin\\micromamba\\envs\\build\\Library\\bin;${PATH}',NETCDF_PLUGIN_DIR='C:\\\\Users\\runneradmin\\micromamba\\envs\\build\\Library\\hdf5\\lib\\plugin'}

[[tool.cibuildwheel.overrides]]
select = "*-win_arm64"
inherit.environment = "append"
environment = { HDF5_DIR = 'C:\\\\vcpkg\\\\installed\\\\arm64-windows', netCDF4_DIR = 'C:\\\\vcpkg\\\\installed\\\\arm64-windows', PATH = 'C:\\\\vcpkg\\\\installed\\\\arm64-windows\\\\bin;${PATH}', NO_CDL = '1' }
repair-wheel-command = [
"delvewheel show {wheel}",
"delvewheel repair -w {dest_dir} {wheel}",
]