diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 69364651f5..3b75945354 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -40,19 +40,19 @@ 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 + MACOSX_DEPLOYMENT_TARGET: 15.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" - MACOSX_DEPLOYMENT_TARGET: 11.0 + MACOSX_DEPLOYMENT_TARGET: 14.0 # Apple universal builds that contain x86-64 and arm64 binary code # Needs extra treatment of all librarys that are not CMake @@ -60,17 +60,17 @@ 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" - # MACOSX_DEPLOYMENT_TARGET: 11.0 + # MACOSX_DEPLOYMENT_TARGET: 14.0 steps: - uses: actions/checkout@v4 with: path: 'src' - ref: '0.16.1' + ref: '0.17.0' - uses: actions/checkout@v4 with: @@ -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 @@ -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: diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 50b60cdebf..41de0b5a96 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -13,6 +13,7 @@ # See https://pre-commit.com for more information # See https://pre-commit.com/hooks.html for more hooks +exclude: ^.*\.patch$ repos: - repo: https://github.com/pre-commit/pre-commit-hooks rev: v2.4.0 diff --git a/.travis.yml b/.travis.yml index f32efa93db..49ae65c7f7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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 diff --git a/library_builders.bat b/library_builders.bat index 35baffd75e..fcec669d0e 100644 --- a/library_builders.bat +++ b/library_builders.bat @@ -17,17 +17,19 @@ 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 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 - curl -sLo dep-adios2/ADIOS2-2.10.2/patch.diff https://github.com/franzpoeschel/ADIOS2/commit/patches-fix-32-bit-builds.patch + :: Patch Win32 on ADIOS 2.11.0 https://github.com/ornladios/ADIOS2/issues/4808 + curl -sLo dep-adios2/ADIOS2-2.11.0/patch.diff https://github.com/franzpoeschel/ADIOS2/commit/13e9747799e32841b29f166c2bcdfd82ee915f1a.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 + + cd dep-adios2/ADIOS2-2.11.0 git init git config user.email "tooling@tools.com" git config user.name "Tooling" @@ -39,7 +41,7 @@ exit /b 0 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 ^ @@ -49,7 +51,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 ^ @@ -58,7 +60,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 @@ -160,6 +163,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$<$: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 @@ -225,6 +274,7 @@ exit /b 0 :main call :install_buildessentials call :build_zlib +call :build_sqlite :: build_bzip2 :: build_szip call :build_zfp diff --git a/library_builders.sh b/library_builders.sh index fc65b96864..6f85a1f5ba 100644 --- a/library_builders.sh +++ b/library_builders.sh @@ -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 { @@ -75,11 +77,24 @@ 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 - file adios2*.tar.gz - tar -xzf adios2*.tar.gz - rm adios2*.tar.gz + # static build of macOS on ADIOS 2.11.0 + # https://github.com/ornladios/ADIOS2/issues/4807 + if [ "$(uname -s)" = "Darwin" ] + then + git clone https://github.com/ornladios/ADIOS2 ADIOS2-2.11.0 + cd ADIOS2-2.11.0 + git checkout 7a21e4ef2f5def6659e67084b5210a66582d4b1a + curl -sLo 4820.diff https://github.com/ornladios/ADIOS2/pull/4820/commits/c7961dd9e12d72b279db75fd184d2b3b4f151560.diff + GIT_COMMITTER_NAME="Greg Eisenhauer" GIT_COMMITTER_EMAIL="eisen@cc.gatech.edu" \ + patch -p1 < 4820.diff + cd .. + else + 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 + fi # build mkdir build-adios2 @@ -94,7 +109,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 \ @@ -112,11 +127,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 - @@ -163,7 +178,7 @@ function build_blosc2 { "${architecture_specific_flags[@]}" \ ../c-blosc2-* make -j${CPU_COUNT} - make install + ${SUDO} make install cd - rm -rf build-blosc2 @@ -171,6 +186,32 @@ function 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 @@ -192,7 +233,7 @@ function build_zfp { -DCMAKE_INSTALL_PREFIX=${BUILD_PREFIX} \ ../zfp-* make -j${CPU_COUNT} - make install + ${SUDO} make install cd - rm -rf build-zfp @@ -220,8 +261,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 @@ -292,7 +333,7 @@ function build_hdf5 { fi make -j${CPU_COUNT} - make install + ${SUDO} make install cd .. touch hdf5-stamp @@ -314,6 +355,7 @@ fi install_buildessentials build_zlib +build_sqlite build_zfp build_blosc2 build_hdf5