Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 14 additions & 14 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,15 @@ jobs:
CMAKE_GENERATOR: "Visual Studio 17 2022"
CMAKE_GENERATOR_PLATFORM: "Win32"

- os: macos-13
- os: macos-15-intel
arch: "x86_64"
env:
MACOSX_DEPLOYMENT_TARGET: 11.0

# Apple Silicon M1/arm64/aarch64 builds:
# https://cibuildwheel.readthedocs.io/en/stable/faq/#apple-silicon
# https://github.com/pypa/cibuildwheel/pull/704
- os: macos-13
- os: macos-14
arch: "arm64"
env:
CMAKE_OSX_ARCHITECTURES: "arm64"
Expand All @@ -60,7 +60,7 @@ jobs:
# https://developer.apple.com/documentation/apple-silicon/building-a-universal-macos-binary
# ADIOS1 tricky to build and HDF5 even with CMake as well (as of 1.12)
# We could build them twice and use `lipo` to combine the lib artifacts.
#- os: macos-13
#- os: macos-15-intel
# arch: "universal2"
# env:
# CMAKE_OSX_ARCHITECTURES: "arm64;x86_64"
Expand All @@ -70,7 +70,7 @@ jobs:
- uses: actions/checkout@v4
with:
path: 'src'
ref: '0.16.1'
ref: '0.17.0'

- uses: actions/checkout@v4
with:
Expand All @@ -87,12 +87,12 @@ jobs:
python -m pip install cibuildwheel==3.2.1

# 0.16.1.post1 bump
- name: Download Patch 1/1
uses: suisei-cn/actions-download-file@818d6b7dc8fe73f2f924b6241f2b1134ca1377d9 # 1.6.0
id: setupversion
with:
url: "https://github.com/openPMD/openPMD-api/commit/f94a1d48eefbc81784a9c25f61c913cf30fe2ece.patch"
target: src/.patch/
# - name: Download Patch 1/1
# uses: suisei-cn/actions-download-file@818d6b7dc8fe73f2f924b6241f2b1134ca1377d9 # 1.6.0
# id: setupversion
# with:
# url: "https://github.com/openPMD/openPMD-api/commit/f94a1d48eefbc81784a9c25f61c913cf30fe2ece.patch"
# target: src/.patch/

# # Patch: Fix versioning
# - name: Download Patch 1/2
Expand All @@ -110,10 +110,10 @@ jobs:
# url: "https://github.com/openPMD/openPMD-api/pull/1684.patch"
# target: src/.patch/

- name: Apply Patches
run: |
cd src
git apply .patch/f94a1d48eefbc81784a9c25f61c913cf30fe2ece.patch
# - name: Apply Patches
# run: |
# cd src
# git apply .patch/f94a1d48eefbc81784a9c25f61c913cf30fe2ece.patch

- name: Build wheel
env:
Expand Down
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ branches:

env:
global:
- OPENPMD_GIT_REF="0.16.1"
- OPENPMD_GIT_REF="0.17.0"

- CIBW_PROJECT_REQUIRES_PYTHON=">=3.10"
# Install dependencies on Linux and OSX
Expand Down
76 changes: 54 additions & 22 deletions library_builders.bat
Original file line number Diff line number Diff line change
Expand Up @@ -17,29 +17,13 @@ exit /b 0

:build_adios2
if exist adios2-stamp exit /b 0
curl -sLo adios2-2.10.2.zip ^
https://github.com/ornladios/ADIOS2/archive/v2.10.2.zip
powershell Expand-Archive adios2-2.10.2.zip -DestinationPath dep-adios2

curl -sLo dep-adios2/ADIOS2-2.10.2/patch.diff https://github.com/franzpoeschel/ADIOS2/commit/patches-fix-32-bit-builds.patch

:: Use git-am for applying the patch,
:: for some reason, python -m patch just silently does nothing.
:: git-am requires a Git repository to apply a patch, but the release zip
:: strips away any Git info, so we just quickly initialize a repository.
cd dep-adios2/ADIOS2-2.10.2
git init
git config user.email "tooling@tools.com"
git config user.name "Tooling"
git add .
git commit --message="Initial commit so we can use git-am"
git am patch.diff
cd ..
cd ..
curl -sLo adios2-2.11.0.zip ^
https://github.com/ornladios/ADIOS2/archive/v2.11.0.zip
powershell Expand-Archive adios2-2.11.0.zip -DestinationPath dep-adios2

cmake --version

cmake -S dep-adios2/ADIOS2-2.10.2 -B build-adios2 ^
cmake -S dep-adios2/ADIOS2-2.11.0 -B build-adios2 ^
-DCMAKE_BUILD_TYPE=Release ^
-DCMAKE_DISABLE_FIND_PACKAGE_LibFFI=TRUE ^
-DBUILD_SHARED_LIBS=OFF ^
Expand All @@ -49,7 +33,7 @@ exit /b 0
-DADIOS2_Blosc2_PREFER_SHARED=OFF ^
-DADIOS2_USE_Blosc2=ON ^
-DADIOS2_USE_BZip2=OFF ^
-DADIOS2_USE_Campaign=OFF ^
-DADIOS2_USE_Campaign=ON ^
-DADIOS2_USE_Fortran=OFF ^
-DADIOS2_USE_HDF5=OFF ^
-DADIOS2_USE_MHS=OFF ^
Expand All @@ -58,7 +42,8 @@ exit /b 0
-DADIOS2_USE_Python=OFF ^
-DADIOS2_USE_ZeroMQ=OFF ^
-DADIOS2_USE_ZFP=ON ^
-DADIOS2_RUN_INSTALL_TEST=OFF
-DADIOS2_RUN_INSTALL_TEST=OFF ^
-DSQLite3_ROOT=%BUILD_PREFIX%/SQLite3
if errorlevel 1 exit 1
:: TODO: Could NOT find HDF5 (missing: HDF5_LIBRARIES C)
:: -DADIOS2_USE_HDF5=ON
Expand Down Expand Up @@ -160,6 +145,52 @@ exit /b 0
if errorlevel 1 exit 1
exit /b 0

:build_sqlite
if exist sqlite-stamp exit /b 0

set SQLITE_VERSION="3510200"

curl -sLo sqlite-amalgamation-%SQLITE_VERSION%.zip ^
https://www.sqlite.org/2026/sqlite-amalgamation-%SQLITE_VERSION%.zip
if errorlevel 1 exit 1

powershell Expand-Archive sqlite-amalgamation-%SQLITE_VERSION%.zip -DestinationPath '.'
if errorlevel 1 exit 1

cd sqlite-amalgamation-%SQLITE_VERSION%
if errorlevel 1 exit 1

REM Create a minimal CMakeLists.txt
(
echo cmake_minimum_required(VERSION 3.10^)
echo project(sqlite3 C^)
echo add_library(sqlite3 STATIC sqlite3.c^)
echo target_compile_definitions(sqlite3 PRIVATE SQLITE_ENABLE_FTS3 SQLITE_ENABLE_FTS5 SQLITE_ENABLE_RTREE SQLITE_ENABLE_DBSTAT_VTAB SQLITE_ENABLE_RBU SQLITE_ENABLE_SESSION^)
echo set_property(TARGET sqlite3 PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>"^)
echo install(TARGETS sqlite3 ARCHIVE DESTINATION lib^)
echo install(FILES sqlite3.h DESTINATION include^)
) > CMakeLists.txt

:: build and install
cmake -S . -B build ^
-DCMAKE_INSTALL_PREFIX=%BUILD_PREFIX%/SQLite3
if errorlevel 1 exit 1

cmake --build build --config Release
if errorlevel 1 exit 1

cmake --install build --config Release
if errorlevel 1 exit 1

:: cleanup
cd ..
rmdir /s /q sqlite-amalgamation-%SQLITE_VERSION%
if errorlevel 1 exit 1

break > sqlite-stamp
if errorlevel 1 exit 1
exit /b 0

:build_zfp
if exist zfp-stamp exit /b 0

Expand Down Expand Up @@ -225,6 +256,7 @@ exit /b 0
:main
call :install_buildessentials
call :build_zlib
call :build_sqlite
:: build_bzip2
:: build_szip
call :build_zfp
Expand Down
49 changes: 39 additions & 10 deletions library_builders.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@ BUILD_PREFIX="${BUILD_PREFIX:-/usr/local}"
if [ "$(uname -s)" = "Darwin" ]
then
CPU_COUNT="${CPU_COUNT:-3}"
SUDO="sudo"
else
CPU_COUNT="${CPU_COUNT:-2}"
SUDO=""
fi

function install_buildessentials {
Expand Down Expand Up @@ -75,8 +77,8 @@ function install_buildessentials {
function build_adios2 {
if [ -e adios2-stamp ]; then return; fi

curl -sLo adios2-2.10.2.tar.gz \
https://github.com/ornladios/ADIOS2/archive/v2.10.2.tar.gz
curl -sLo adios2-2.11.0.tar.gz \
https://github.com/ornladios/ADIOS2/archive/v2.11.0.tar.gz
file adios2*.tar.gz
tar -xzf adios2*.tar.gz
rm adios2*.tar.gz
Expand All @@ -94,7 +96,7 @@ function build_adios2 {
-DADIOS2_Blosc2_PREFER_SHARED=OFF \
-DADIOS2_USE_BZip2=OFF \
-DADIOS2_USE_Blosc2=ON \
-DADIOS2_USE_Campaign=OFF \
-DADIOS2_USE_Campaign=ON \
-DADIOS2_USE_Fortran=OFF \
-DADIOS2_USE_HDF5=OFF \
-DADIOS2_USE_MHS=OFF \
Expand All @@ -112,11 +114,11 @@ function build_adios2 {
-DCMAKE_INSTALL_PREFIX=${BUILD_PREFIX} ../ADIOS2-*

make -j${CPU_COUNT}
make install
${SUDO} make install

# CMake Config package of C-Blosc 2.10.1+ only
# https://github.com/ornladios/ADIOS2/issues/3903
rm -rf ${BUILD_PREFIX}/lib*/cmake/adios2/FindBlosc2.cmake
${SUDO} rm -rf ${BUILD_PREFIX}/lib*/cmake/adios2/FindBlosc2.cmake

cd -

Expand Down Expand Up @@ -163,14 +165,40 @@ function build_blosc2 {
"${architecture_specific_flags[@]}" \
../c-blosc2-*
make -j${CPU_COUNT}
make install
${SUDO} make install
cd -

rm -rf build-blosc2

touch blosc-stamp2
}

function build_sqlite {
if [ -e sqlite-stamp ]; then return; fi

SQLITE_VERSION="3510200" # "3.51.2"

curl -sLO https://www.sqlite.org/2026/sqlite-autoconf-${SQLITE_VERSION}.tar.gz
file sqlite-autoconf*.tar.gz
tar xzf sqlite-autoconf-${SQLITE_VERSION}.tar.gz
rm sqlite-autoconf*.tar.gz

cd sqlite-autoconf-${SQLITE_VERSION}

./configure \
--disable-shared \
--prefix=${BUILD_PREFIX} \
--all \
--disable-readline
make
${SUDO} make install

cd -
rm -rf sqlite-autoconf*

touch sqlite-stamp
}

function build_zfp {
if [ -e zfp-stamp ]; then return; fi

Expand All @@ -192,7 +220,7 @@ function build_zfp {
-DCMAKE_INSTALL_PREFIX=${BUILD_PREFIX} \
../zfp-*
make -j${CPU_COUNT}
make install
${SUDO} make install
cd -

rm -rf build-zfp
Expand Down Expand Up @@ -220,8 +248,8 @@ function build_zlib {
-DCMAKE_INSTALL_PREFIX=${BUILD_PREFIX}

PATH=${CMAKE_BIN}:${PATH} cmake --build build-zlib --parallel ${CPU_COUNT}
PATH=${CMAKE_BIN}:${PATH} cmake --build build-zlib --target install
rm -rf ${BUILD_PREFIX}/lib/libz.*dylib ${BUILD_PREFIX}/lib/libz.*so
PATH=${CMAKE_BIN}:${PATH} ${SUDO} cmake --build build-zlib --target install
${SUDO} rm -rf ${BUILD_PREFIX}/lib/libz.*dylib ${BUILD_PREFIX}/lib/libz.*so

rm -rf build-zlib

Expand Down Expand Up @@ -292,7 +320,7 @@ function build_hdf5 {
fi

make -j${CPU_COUNT}
make install
${SUDO} make install
cd ..

touch hdf5-stamp
Expand All @@ -314,6 +342,7 @@ fi

install_buildessentials
build_zlib
build_sqlite
build_zfp
build_blosc2
build_hdf5
Expand Down
Loading