Skip to content

Commit

Permalink
[Hack] Win w/ only HDF5 w/ Zlib dir
Browse files Browse the repository at this point in the history
  • Loading branch information
ax3l committed Mar 29, 2023
1 parent 5ce4e14 commit 6e7013d
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 23 deletions.
41 changes: 21 additions & 20 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ jobs:
fail-fast: false
matrix:
include:
- os: ubuntu-20.04
arch: "x86_64"
#- os: ubuntu-20.04
# arch: "x86_64"

- os: ubuntu-20.04
arch: "i686"
#- os: ubuntu-20.04
# arch: "i686"

# builds faster on Travis-CI:
#- os: ubuntu-20.04
Expand All @@ -34,25 +34,25 @@ jobs:
arch: "AMD64"

# x86 (32bit)
- os: windows-2019
arch: "x86"
env:
CMAKE_GENERATOR: "Visual Studio 16 2019"
CMAKE_GENERATOR_PLATFORM: "Win32"

- os: macos-10.15
arch: "x86_64"
env:
MACOSX_DEPLOYMENT_TARGET: 10.15
#- os: windows-2019
# arch: "x86"
# env:
# CMAKE_GENERATOR: "Visual Studio 16 2019"
# CMAKE_GENERATOR_PLATFORM: "Win32"

#- os: macos-10.15
# arch: "x86_64"
# env:
# MACOSX_DEPLOYMENT_TARGET: 10.15

# Apple Silicon M1/arm64/aarch64 builds:
# https://cibuildwheel.readthedocs.io/en/stable/faq/#apple-silicon
# https://github.com/pypa/cibuildwheel/pull/704
- os: macos-11
arch: "arm64"
env:
CMAKE_OSX_ARCHITECTURES: "arm64"
MACOSX_DEPLOYMENT_TARGET: 11.0
#- os: macos-11
# arch: "arm64"
# env:
# CMAKE_OSX_ARCHITECTURES: "arm64"
# MACOSX_DEPLOYMENT_TARGET: 11.0

# Apple universal builds that contain x86-64 and arm64 binary code
# Needs extra treatment of all librarys that are not CMake
Expand Down Expand Up @@ -134,6 +134,7 @@ jobs:
env:
# (1) Disable PyPy (manylinux image: yum repo issues)
# https://github.com/pypa/manylinux/issues/899
CIBW_BUILD: "cp311-win_amd64"
CIBW_SKIP: "pp*-manylinux*"
CIBW_ARCHS: "${{ matrix.arch }}"
CIBW_PROJECT_REQUIRES_PYTHON: ">=3.7"
Expand All @@ -144,7 +145,7 @@ jobs:
# for the openPMD-api build, CMake shall search for
# static dependencies of HDF5 and ADIOS1 (see setup.py)
CIBW_ENVIRONMENT: HDF5_USE_STATIC_LIBRARIES='ON' ADIOS_USE_STATIC_LIBS='ON' openPMD_CMAKE_openPMD_USE_HDF5='ON' openPMD_CMAKE_openPMD_USE_ADIOS2='ON'
CIBW_ENVIRONMENT_WINDOWS: HDF5_USE_STATIC_LIBRARIES='ON' openPMD_CMAKE_openPMD_USE_HDF5='ON' openPMD_CMAKE_openPMD_USE_ADIOS2='ON' CMAKE_PREFIX_PATH='C:/Program Files (x86)/ADIOS2;C:/Program Files (x86)/blosc;C:/Program Files (x86)/HDF5;C:/Program Files (x86)/ZFP;C:/Program Files (x86)/zlib'
CIBW_ENVIRONMENT_WINDOWS: HDF5_USE_STATIC_LIBRARIES='ON' openPMD_CMAKE_openPMD_USE_HDF5='ON' openPMD_CMAKE_openPMD_USE_ADIOS2='OFF' CMAKE_PREFIX_PATH='C:/Program Files (x86)/ADIOS2;C:/Program Files (x86)/blosc;C:/Program Files (x86)/HDF5;C:/Program Files (x86)/ZFP;C:/Program Files (x86)/zlib'
# C++17 support in macOS 10.13+ (partial) and 10.14+ (std::visit) and 10.15+ (std::filesystem::path)
# https://cibuildwheel.readthedocs.io/en/stable/cpp_standards/#macos-and-deployment-target-versions
# arm64 Python interpreters are built with 11.0
Expand Down
9 changes: 6 additions & 3 deletions library_builders.bat
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ exit /b 0
-DBUILD_SHARED=OFF ^
-DBUILD_STATIC=ON ^
-DBUILD_TESTS=OFF ^
-DPREFER_EXTERNAL_ZLIB=ON ^
-DDEACTIVATE_SNAPPY=ON
if errorlevel 1 exit 1

Expand All @@ -88,11 +89,13 @@ exit /b 0
https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.12/hdf5-1.12.2/src/hdf5-1.12.2.zip
powershell Expand-Archive hdf5-1.12.2.zip -DestinationPath dep-hdf5

set "ZLIB_ROOT=%BUILD_PREFIX:~1,-1%/zlib"
cmake -S dep-hdf5/hdf5-1.12.2 -B build-hdf5 ^
-DCMAKE_BUILD_TYPE=Release ^
-DCMAKE_VERBOSE_MAKEFILE=ON ^
-DBUILD_SHARED_LIBS=OFF ^
-DBUILD_TESTING=OFF ^
-DTEST_SHELL_SCRIPTS=OFF ^
-DHDF5_BUILD_CPP_LIB=OFF ^
-DHDF5_BUILD_EXAMPLES=OFF ^
-DHDF5_BUILD_FORTRAN=OFF ^
Expand Down Expand Up @@ -175,7 +178,7 @@ call :install_buildessentials
call :build_zlib
:: build_bzip2
:: build_szip
call :build_blosc
call :build_zfp
::call :build_blosc
::call :build_zfp
call :build_hdf5
call :build_adios2
::call :build_adios2
1 change: 1 addition & 0 deletions library_builders.sh
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@ function build_blosc {
-DBUILD_BENCHMARKS=OFF \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DCMAKE_INSTALL_PREFIX=${BUILD_PREFIX} \
-DPREFER_EXTERNAL_ZLIB=ON \
../c-blosc-*
make -j${CPU_COUNT}
make install
Expand Down

0 comments on commit 6e7013d

Please sign in to comment.