Skip to content

Commit

Permalink
build netcdf-c
Browse files Browse the repository at this point in the history
  • Loading branch information
ocefpaf committed Oct 23, 2023
1 parent 371dc0f commit 63eae57
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 4 deletions.
28 changes: 28 additions & 0 deletions .ci/build_deps.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/usr/bin/bash

set -ex


download_and_build_netcdf() {
if [ ! -d "netcdf-c" ]; then
netcdf_url=https://github.com/Unidata/netcdf-c
netcdf_src=netcdf-c
netcdf_build=netcdf-build

git clone ${netcdf_url} -b v4.9.2 ${netcdf_src}

cmake ${netcdf_src} -B ${netcdf_build} \
-DENABLE_NETCDF4=on \
-DENABLE_HDF5=on \
-DENABLE_DAP=on \
-DENABLE_TESTS=off \
-DENABLE_PLUGIN_INSTALL=off \
-DBUILD_SHARED_LIBS=on \
-DCMAKE_BUILD_TYPE=Release

cmake --build ${netcdf_build} \
--target install
fi
}

download_and_build_netcdf
9 changes: 5 additions & 4 deletions .github/workflows/cibuildwheel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,6 @@ jobs:

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: "Building ${{ matrix.os }} (${{ matrix.arch }}) wheels"
uses: pypa/[email protected]
Expand All @@ -65,8 +63,11 @@ jobs:
CIBW_SKIP: "pp* cp36-* cp37-* *-musllinux*"
CIBW_ARCHS: ${{ matrix.arch }}
CIBW_BUILD_FRONTEND: build
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014
CIBW_BEFORE_BUILD_LINUX: yum install -y hdf5-devel netcdf-devel
CIBW_MANYLINUX_X86_64_IMAGE: manylinux_2_28
CIBW_BEFORE_BUILD_LINUX: >
dnf install -y epel-release
&& dnf install -y hdf5-devel libcurl-devel
&& sh .ci/build_deps.sh
CIBW_BEFORE_BUILD_MACOS: brew install hdf5 netcdf
CIBW_TEST_SKIP: "*_arm64"
CIBW_TEST_REQUIRES: pytest cython
Expand Down

0 comments on commit 63eae57

Please sign in to comment.