5959 arch : aarch64
6060 - os : macos-14
6161 arch : arm64
62- CIBW_ENVIRONMENT : MACOSX_DEPLOYMENT_TARGET=14.0
6362 - os : macos-13
6463 arch : x86_64
65- CIBW_ENVIRONMENT : MACOSX_DEPLOYMENT_TARGET=13.0
6664
6765 steps :
6866 - uses : actions/checkout@v5
@@ -80,33 +78,20 @@ jobs:
8078 shell : bash
8179 # On PRs we run only oldest and newest Python versions to reduce CI load.
8280 # Skips pypy and musllinux everywhere.
83- # We are buiding 38 and 312 for now.
81+ # We are building 39, 311 and 314 for now.
82+ # (3.11 is the oldest version for which we support abi3 wheels)
8483 # These needs to rotate every new Python release.
8584 run : |
86- if [[ "${{ github.event_name }}" == "pull_request" ]]; then
87- CIBW_SKIP="pp* cp36-* cp37-* cp38-* cp314t-* *-musllinux* cp39-* cp310-* cp311-* cp312-* cp313-*"
88- else
89- CIBW_SKIP="pp* cp36-* cp37-* cp38-* cp314t-* *-musllinux*"
90- fi
91- echo "CIBW_SKIP=$CIBW_SKIP" >> $GITHUB_ENV
92- echo "Setting CIBW_SKIP=$CIBW_SKIP"
85+ set -x
86+ echo "CIBW_BUILD=cp39-* cp311-* cp314-*" >> $GITHUB_ENV
87+ set +x
88+
89+ if : ${{ github.event_name }} == "pull_request"
9390
9491 - name : " Building ${{ matrix.os }} (${{ matrix.arch }}) wheels"
9592 uses : pypa/cibuildwheel@v3.1.4
9693 env :
97- CIBW_SKIP : ${{ env.CIBW_SKIP }}
9894 CIBW_ARCHS : ${{ matrix.arch }}
99- CIBW_BUILD_FRONTEND : build
100- CIBW_MANYLINUX_X86_64_IMAGE : ghcr.io/ocefpaf/manylinux_2_28_x86_64-netcdf
101- CIBW_MANYLINUX_AARCH64_IMAGE : ghcr.io/ocefpaf/manylinux_2_28_aarch64-netcdf
102- # Emulation testing is slow, testing only latest Python.
103- CIBW_TEST_SKIP : " cp39-*_aarch64 cp310-*_aarch64 cp311-*_aarch64 cp312-*_aarch64"
104- CIBW_ENVIRONMENT : ${{ matrix.CIBW_ENVIRONMENT }}
105- CIBW_BEFORE_BUILD_MACOS : brew install hdf5 netcdf
106- CIBW_TEST_REQUIRES : pytest cython packaging typing-extensions
107- CIBW_TEST_COMMAND : >
108- python -c "import netCDF4; print(f'netCDF4 v{netCDF4.__version__}')"
109- && pytest -s -rxs -v {project}/test
11095
11196 - uses : actions/upload-artifact@v4
11297 with :
@@ -120,7 +105,7 @@ jobs:
120105 strategy :
121106 matrix :
122107 os : [windows-latest]
123- arch : [win_amd64 ]
108+ arch : [AMD64 ]
124109
125110 steps :
126111 - uses : actions/checkout@v5
@@ -140,25 +125,12 @@ jobs:
140125 create-args : >-
141126 python=${{ matrix.python-version }} libnetcdf=4.9.2 --channel conda-forge
142127
143- - name : Install cibuildwheel
144- run : |
145- python -m pip install --upgrade cibuildwheel delvewheel
146-
147128 - name : Build wheels for Windows (${{ matrix.arch }})
148- run : cibuildwheel --output-dir wheelhouse
129+ uses : pypa/ cibuildwheel@v3.1.4
149130 env :
150- CIBW_BUILD : " cp39-${{ matrix.arch }} cp310-${{ matrix.arch }} cp311-${{ matrix.arch }} cp312-${{ matrix.arch }} cp313-${{ matrix.arch }}"
151- CIBW_ENVIRONMENT_WINDOWS : >
152- HDF5_DIR="C:\\Users\\runneradmin\\micromamba\\envs\\build\\Library"
153- netCDF4_DIR="C:\\Users\\runneradmin\\micromamba\\envs\\build\\Library"
154- PATH="C:\\Users\\runneradmin\\micromamba\\envs\\build\\Library\\bin;${PATH}"
155- CIBW_REPAIR_WHEEL_COMMAND_WINDOWS : >
156- delvewheel show {wheel}
157- && delvewheel repair -w {dest_dir} {wheel}
158- CIBW_TEST_REQUIRES : pytest cython packaging typing-extensions
159- CIBW_TEST_COMMAND : >
160- python -c "import netCDF4; print(f'netCDF4 v{netCDF4.__version__}')"
161- && pytest -s -rxs -v {project}\\test
131+ CIBW_ARCHS : ${{ matrix.arch }}
132+ # cannot build cftime for this target (missing a wheel at the time of writing)
133+ CIBW_SKIP : " cp314*"
162134
163135 - uses : actions/upload-artifact@v4
164136 with :
0 commit comments