diff --git a/.github/workflows/publish-sdist-wheels.yml b/.github/workflows/publish-sdist-wheels.yml index e0cd8010..4785ce63 100644 --- a/.github/workflows/publish-sdist-wheels.yml +++ b/.github/workflows/publish-sdist-wheels.yml @@ -4,7 +4,7 @@ on: [pull_request, push] env: CIBW_BUILD_VERBOSITY: 3 CIBW_BUILD: 'cp*' - CIBW_SKIP: 'cp35-* cp36-* *-musllinux_* *-manylinux_i686' + CIBW_SKIP: 'cp35-* cp36-* cp37-* *-musllinux_* *-manylinux_i686' CIBW_TEST_COMMAND: ( cd {project}/python/tests; python -m unittest -v ) jobs: @@ -34,46 +34,10 @@ jobs: - name: Build wheels on Linux if: runner.os == 'Linux' - env: - CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014 - CIBW_BEFORE_ALL: | - AEC_VERSION="1.0.4" - HDF5_VERSION="1.12.1" - - yum update -y - yum -y install zlib-devel - pushd /tmp - - echo "Downloading & unpacking aec ${AEC_VERSION}" - curl -fsSLO https://gitlab.dkrz.de/k202009/libaec/uploads/ea0b7d197a950b0c110da8dfdecbb71f/libaec-${AEC_VERSION}.tar.gz - tar zxf libaec-$AEC_VERSION.tar.gz - - echo "Building & installing libaec" - pushd libaec-$AEC_VERSION - ./configure - make -j 2 - make install - ldconfig - popd - - echo "Downloading & unpacking HDF5 ${HDF5_VERSION}" - curl -fsSLO "https://www.hdfgroup.org/ftp/HDF5/releases/hdf5-${HDF5_VERSION%.*}/hdf5-$HDF5_VERSION/src/hdf5-$HDF5_VERSION.tar.gz" - tar -xzvf hdf5-$HDF5_VERSION.tar.gz - - echo "Building & installing HDF5" - pushd hdf5-$HDF5_VERSION - ./configure \ - --prefix=/usr \ - --enable-build-mode=production \ - --with-szlib \ - --enable-tools=no \ - --enable-tests=no - make -j 2 - make install - ldconfig - popd run: | - python -m cibuildwheel --output-dir dist + # note: config is stored in pyproject.toml now + CIBW_MANYLINUX_X86_64_IMAGE=manylinux2014 python -m cibuildwheel --output-dir dist + CIBW_MANYLINUX_X86_64_IMAGE=manylinux_2_28 python -m cibuildwheel --output-dir dist - name: Build wheels Mac OS if: runner.os == 'macOS' diff --git a/ci/ci-buildwheel-prepare-linux.sh b/ci/ci-buildwheel-prepare-linux.sh new file mode 100644 index 00000000..3867d0d8 --- /dev/null +++ b/ci/ci-buildwheel-prepare-linux.sh @@ -0,0 +1,35 @@ +AEC_VERSION="1.0.4" +HDF5_VERSION="1.12.1" + +yum update -y +yum -y install zlib-devel +pushd /tmp + +echo "Downloading & unpacking aec ${AEC_VERSION}" +curl -fsSLO https://gitlab.dkrz.de/k202009/libaec/uploads/ea0b7d197a950b0c110da8dfdecbb71f/libaec-${AEC_VERSION}.tar.gz +tar zxf libaec-$AEC_VERSION.tar.gz + +echo "Building & installing libaec" +pushd libaec-$AEC_VERSION +./configure +make -j 2 +make install +ldconfig +popd + +echo "Downloading & unpacking HDF5 ${HDF5_VERSION}" +curl -fsSLO "https://www.hdfgroup.org/ftp/HDF5/releases/hdf5-${HDF5_VERSION%.*}/hdf5-$HDF5_VERSION/src/hdf5-$HDF5_VERSION.tar.gz" +tar -xzvf hdf5-$HDF5_VERSION.tar.gz + +echo "Building & installing HDF5" +pushd hdf5-$HDF5_VERSION +./configure \ + --prefix=/usr \ + --enable-build-mode=production \ + --with-szlib \ + --enable-tools=no \ + --enable-tests=no +make -j 2 +make install +ldconfig +popd diff --git a/pyproject.toml b/pyproject.toml index 706c3962..cea9c008 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,3 +6,6 @@ requires = [ "wheel", ] build-backend = "setuptools.build_meta" + +[tool.cibuildwheel.linux] +before-all = "bash ci/ci-buildwheel-prepare-linux.sh"