Skip to content

Commit a60a004

Browse files
committed
adding windows arm build
1 parent e652579 commit a60a004

2 files changed

Lines changed: 46 additions & 2 deletions

File tree

.github/workflows/cibuildwheel.yml

Lines changed: 41 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,8 +138,47 @@ jobs:
138138
path: ${{ github.workspace }}/wheelhouse/*.whl
139139

140140

141+
build_wheels_windows_arm:
142+
name: Build wheels for ARM64 on Windows
143+
runs-on: windows-11-arm
144+
steps:
145+
- uses: actions/checkout@v6
146+
with:
147+
fetch-depth: 0
148+
149+
- uses: actions/setup-python@v6
150+
name: Install Python
151+
with:
152+
python-version: 3.x
153+
154+
- name: Install vcpkg dependencies
155+
shell: pwsh
156+
run: |
157+
# Install vcpkg
158+
git clone https://github.com/Microsoft/vcpkg.git C:\vcpkg
159+
cd C:\vcpkg
160+
.\bootstrap-vcpkg.bat
161+
162+
# Install netcdf and dependencies
163+
.\vcpkg.exe install hdf5:arm64-windows netcdf-c:arm64-windows zlib:arm64-windows
164+
165+
# Set environment variables for build
166+
echo "HDF5_DIR=C:\vcpkg\installed\arm64-windows" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
167+
echo "NETCDF4_DIR=C:\vcpkg\installed\arm64-windows" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
168+
169+
- name: Build wheels for Windows ARM64
170+
uses: pypa/cibuildwheel@v3.3.0
171+
env:
172+
CIBW_ARCHS: ARM64
173+
174+
- uses: actions/upload-artifact@v5
175+
with:
176+
name: pypi-artifacts-windows-11-arm-ARM64
177+
path: ${{ github.workspace }}/wheelhouse/*.whl
178+
179+
141180
show-artifacts:
142-
needs: [build_bdist, build_sdist, build_wheels_winmac]
181+
needs: [build_bdist, build_sdist, build_wheels_winmac, build_wheels_windows_arm]
143182
name: "Show artifacts"
144183
runs-on: ubuntu-22.04
145184
steps:
@@ -155,7 +194,7 @@ jobs:
155194
156195
157196
publish-artifacts-pypi:
158-
needs: [build_bdist, build_sdist, build_wheels_winmac]
197+
needs: [build_bdist, build_sdist, build_wheels_winmac, build_wheels_windows_arm]
159198
name: "Publish to PyPI"
160199
runs-on: ubuntu-22.04
161200
# upload to PyPI for every tag starting with 'v'

pyproject.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,3 +156,8 @@ environment = {MACOSX_DEPLOYMENT_TARGET="14.0",HDF5_DIR="/Users/runner/micromamb
156156
select = "*-win_*"
157157
inherit.environment = "append"
158158
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'}
159+
160+
[[tool.cibuildwheel.overrides]]
161+
select = "*-win_arm64"
162+
inherit.environment = "append"
163+
environment = { HDF5_DIR = 'C:\\\\vcpkg\\installed\\arm64-windows', netCDF4_DIR = 'C:\\\\vcpkg\\installed\\arm64-windows', PATH = 'C:\\\\vcpkg\\installed\\arm64-windows\\bin;${PATH}' }

0 commit comments

Comments
 (0)