From b5b1941aafc94aaf5776c634bc8e20aa3171e59b Mon Sep 17 00:00:00 2001 From: Philippe Verney Date: Thu, 28 Nov 2024 18:10:55 +0100 Subject: [PATCH] Generate Windows wheels Upgrade Manylinux to build wheels supporting glibc 2.28 Python wheel now targets FESAPI 2.12.0.0 --- .github/workflows/github-actions.yml | 185 ++++++++++++++++----------- cmake/pyproject.toml.in | 2 +- python/CMakeLists.txt | 3 + 3 files changed, 116 insertions(+), 74 deletions(-) diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index e68f591..128e3e7 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -17,9 +17,9 @@ jobs: ((Get-Content -path ${{ runner.temp }}/avro-cpp-1.11.3/CMakeLists.txt -Raw) -replace 'install \(TARGETS avrocpp avrocpp_s','install (TARGETS avrocpp_s') | Set-Content -Path ${{ runner.temp }}/avro-cpp-1.11.3/CMakeLists.txt ((Get-Content -path ${{ runner.temp }}/avro-cpp-1.11.3/CMakeLists.txt -Raw) -replace 'install \(TARGETS avrogencpp RUNTIME DESTINATION bin\)','') | Set-Content -Path ${{ runner.temp }}/avro-cpp-1.11.3/CMakeLists.txt cd ${{ runner.temp }} - mkdir avro-cpp-1.11.3-build - cd avro-cpp-1.11.3-build - cmake -G"Visual Studio 16 2019" -A x64 -T host=x64 -Wno-dev -Wno-deprecated -DBoost_INCLUDE_DIR=${{ runner.temp }}\boost-install -DCMAKE_INSTALL_PREFIX=${{ runner.temp }}/avro-cpp-1.11.3-install ${{ runner.temp }}/avro-cpp-1.11.3 + mkdir avro-cpp-build + cd avro-cpp-build + cmake -G"Visual Studio 16 2019" -A x64 -T host=x64 -Wno-dev -Wno-deprecated -DBoost_INCLUDE_DIR=${{ runner.temp }}\boost-install -DCMAKE_INSTALL_PREFIX=${{ runner.temp }}/avro-cpp-install ${{ runner.temp }}/avro-cpp-1.11.3 cmake --build . --config Release --target avrocpp_s -j2 cmake --install . - name: CMake build and install @@ -27,7 +27,7 @@ jobs: cd ${{ github.workspace }}/.. mkdir build cd build - cmake -G"Visual Studio 16 2019" -A x64 -T host=x64 -Wno-dev -Wno-deprecated -DBoost_INCLUDE_DIR=${{ runner.temp }}\boost-install -DAVRO_ROOT=${{ runner.temp }}/avro-cpp-1.11.3-install -DAVRO_USE_STATIC_LIBS=TRUE -DWITH_ETP_SSL=FALSE ${{ github.workspace }} + cmake -G"Visual Studio 16 2019" -A x64 -T host=x64 -Wno-dev -Wno-deprecated -DBoost_INCLUDE_DIR=${{ runner.temp }}\boost-install -DAVRO_ROOT=${{ runner.temp }}/avro-cpp-install -DAVRO_USE_STATIC_LIBS=TRUE -DWITH_ETP_SSL=FALSE ${{ github.workspace }} cmake --build . --config Release -j2 windows-2019-with-fesapi: runs-on: windows-2019 @@ -45,21 +45,21 @@ jobs: ((Get-Content -path ${{ runner.temp }}/avro-cpp-1.11.3/CMakeLists.txt -Raw) -replace 'install \(TARGETS avrocpp avrocpp_s','install (TARGETS avrocpp_s') | Set-Content -Path ${{ runner.temp }}/avro-cpp-1.11.3/CMakeLists.txt ((Get-Content -path ${{ runner.temp }}/avro-cpp-1.11.3/CMakeLists.txt -Raw) -replace 'install \(TARGETS avrogencpp RUNTIME DESTINATION bin\)','') | Set-Content -Path ${{ runner.temp }}/avro-cpp-1.11.3/CMakeLists.txt cd ${{ runner.temp }} - mkdir avro-cpp-1.11.3-build - cd avro-cpp-1.11.3-build - cmake -G"Visual Studio 16 2019" -A x64 -T host=x64 -Wno-dev -Wno-deprecated -DBoost_INCLUDE_DIR=${{ runner.temp }}\boost-install -DCMAKE_INSTALL_PREFIX=${{ runner.temp }}/avro-cpp-1.11.3-install ${{ runner.temp }}/avro-cpp-1.11.3 + mkdir avro-cpp-build + cd avro-cpp-build + cmake -G"Visual Studio 16 2019" -A x64 -T host=x64 -Wno-dev -Wno-deprecated -DBoost_INCLUDE_DIR=${{ runner.temp }}\boost-install -DCMAKE_INSTALL_PREFIX=${{ runner.temp }}/avro-cpp-install ${{ runner.temp }}/avro-cpp-1.11.3 cmake --build . --config Release --target avrocpp_s -j2 cmake --install . - name: FESAPI install run: | - (New-Object System.Net.WebClient).DownloadFile("https://github.com/F2I-Consulting/fesapi/releases/download/v2.11.0.0/fesapi2_11_0_0-cpp-vs2019-x64-staticfHdf1145-staticZlib131.zip", "${{ runner.temp }}\fesapi.zip") + (New-Object System.Net.WebClient).DownloadFile("https://github.com/F2I-Consulting/fesapi/releases/download/v2.12.0.0/fesapi2_12_0_0-cpp-vs2019-x64.zip", "${{ runner.temp }}\fesapi.zip") 7z x ${{ runner.temp }}\fesapi.zip -o${{ runner.temp }} - name: CMake build and install run: | cd ${{ github.workspace }}/.. mkdir build cd build - cmake -G"Visual Studio 16 2019" -A x64 -T host=x64 -Wno-dev -Wno-deprecated -DBoost_INCLUDE_DIR=${{ runner.temp }}\boost-install -DAVRO_ROOT=${{ runner.temp }}/avro-cpp-1.11.3-install -DAVRO_USE_STATIC_LIBS=TRUE -DWITH_FESAPI=TRUE -DFESAPI_ROOT=${{ runner.temp }}/fesapi2_11_0_0-cpp-vs2019-x64-staticfHdf1145-staticZlib131 -DWITH_ETP_SSL=FALSE ${{ github.workspace }} + cmake -G"Visual Studio 16 2019" -A x64 -T host=x64 -Wno-dev -Wno-deprecated -DBoost_INCLUDE_DIR=${{ runner.temp }}\boost-install -DAVRO_ROOT=${{ runner.temp }}/avro-cpp-install -DAVRO_USE_STATIC_LIBS=TRUE -DWITH_FESAPI=TRUE -DFESAPI_ROOT=${{ runner.temp }}/fesapi2_12_0_0-cpp-vs2019-x64 -DWITH_ETP_SSL=FALSE ${{ github.workspace }} cmake --build . --config Release -j2 ubuntu-22: runs-on: ubuntu-22.04 @@ -76,9 +76,9 @@ jobs: tar xzf avro-cpp-1.11.3.tar.gz sed -i 's/install (TARGETS avrocpp avrocpp_s/install (TARGETS avrocpp_s/' avro-cpp-1.11.3/CMakeLists.txt sed -i 's/install (TARGETS avrogencpp RUNTIME DESTINATION bin)//' avro-cpp-1.11.3/CMakeLists.txt - mkdir avro-cpp-1.11.3-build - cd avro-cpp-1.11.3-build - cmake -Wno-dev -Wno-deprecated -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_INSTALL_PREFIX=${{ runner.temp }}/avro-cpp-1.11.3-install ${{ runner.temp }}/avro-cpp-1.11.3 + mkdir avro-cpp-build + cd avro-cpp-build + cmake -Wno-dev -Wno-deprecated -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_INSTALL_PREFIX=${{ runner.temp }}/avro-cpp-install ${{ runner.temp }}/avro-cpp-1.11.3 cmake --build . -j2 --target avrocpp_s cmake --install . - name: CMake build and install @@ -86,7 +86,7 @@ jobs: cd ${{ github.workspace }}/.. mkdir build cd build - cmake -DAVRO_ROOT=${{ runner.temp }}/avro-cpp-1.11.3-install -DAVRO_USE_STATIC_LIBS=TRUE ${{ github.workspace }} + cmake -DAVRO_ROOT=${{ runner.temp }}/avro-cpp-install -DAVRO_USE_STATIC_LIBS=TRUE ${{ github.workspace }} cmake --build . --config Release -j2 ubuntu-22-java11: runs-on: ubuntu-22.04 @@ -107,9 +107,9 @@ jobs: tar xzf avro-cpp-1.11.3.tar.gz sed -i 's/install (TARGETS avrocpp avrocpp_s/install (TARGETS avrocpp_s/' avro-cpp-1.11.3/CMakeLists.txt sed -i 's/install (TARGETS avrogencpp RUNTIME DESTINATION bin)//' avro-cpp-1.11.3/CMakeLists.txt - mkdir avro-cpp-1.11.3-build - cd avro-cpp-1.11.3-build - cmake -Wno-dev -Wno-deprecated -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_INSTALL_PREFIX=${{ runner.temp }}/avro-cpp-1.11.3-install ${{ runner.temp }}/avro-cpp-1.11.3 + mkdir avro-cpp-build + cd avro-cpp-build + cmake -Wno-dev -Wno-deprecated -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_INSTALL_PREFIX=${{ runner.temp }}/avro-cpp-install ${{ runner.temp }}/avro-cpp-1.11.3 cmake --build . -j2 --target avrocpp_s cmake --install . - name: CMake build and install @@ -117,7 +117,7 @@ jobs: cd ${{ github.workspace }}/.. mkdir build cd build - cmake -DAVRO_ROOT=${{ runner.temp }}/avro-cpp-1.11.3-install -DAVRO_USE_STATIC_LIBS=TRUE -DWITH_JAVA_WRAPPING=TRUE ${{ github.workspace }} + cmake -DAVRO_ROOT=${{ runner.temp }}/avro-cpp-install -DAVRO_USE_STATIC_LIBS=TRUE -DWITH_JAVA_WRAPPING=TRUE ${{ github.workspace }} cmake --build . --config Release -j2 ubuntu-22-java11-with-fesapi: runs-on: ubuntu-22.04 @@ -148,11 +148,11 @@ jobs: sudo apt install -y ${{ matrix.xcc_pkg }} libhdf5-dev libminizip-dev libboost-all-dev - name: FESAPI install run: | - git clone --branch v2.11.0.0 --single-branch https://github.com/F2I-Consulting/fesapi.git ${{ runner.temp }}/fesapi-src + git clone --branch v2.12.0.0 --single-branch https://github.com/F2I-Consulting/fesapi.git ${{ runner.temp }}/fesapi-src cd ${{ runner.temp }} mkdir fesapi-build cd fesapi-build - cmake -DCMAKE_CXX_STANDARD=17 -DMINIZIP_INCLUDE_DIR=/usr/include/minizip -DMINIZIP_LIBRARY_RELEASE=/usr/lib/x86_64-linux-gnu/libminizip.so.1.0.0 -DCMAKE_BUILD_TYPE=Release -DWITH_JAVA_WRAPPING=TRUE -DCMAKE_INSTALL_PREFIX=${{ runner.temp }}/fesapi-install -DCMAKE_C_COMPILER=${{ matrix.cc }} -DCMAKE_CXX_COMPILER=${{ matrix.cxx }} ${{ runner.temp }}/fesapi-src + cmake -DMINIZIP_INCLUDE_DIR=/usr/include/minizip -DMINIZIP_LIBRARY_RELEASE=/usr/lib/x86_64-linux-gnu/libminizip.so.1.0.0 -DCMAKE_BUILD_TYPE=Release -DWITH_JAVA_WRAPPING=TRUE -DCMAKE_INSTALL_PREFIX=${{ runner.temp }}/fesapi-install -DCMAKE_C_COMPILER=${{ matrix.cc }} -DCMAKE_CXX_COMPILER=${{ matrix.cxx }} ${{ runner.temp }}/fesapi-src cmake --build . -j2 cmake --install . - name: AVRO INSTALL @@ -162,9 +162,9 @@ jobs: tar xzf avro-cpp-1.11.3.tar.gz sed -i 's/install (TARGETS avrocpp avrocpp_s/install (TARGETS avrocpp_s/' avro-cpp-1.11.3/CMakeLists.txt sed -i 's/install (TARGETS avrogencpp RUNTIME DESTINATION bin)//' avro-cpp-1.11.3/CMakeLists.txt - mkdir avro-cpp-1.11.3-build - cd avro-cpp-1.11.3-build - cmake -Wno-dev -Wno-deprecated -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_INSTALL_PREFIX=${{ runner.temp }}/avro-cpp-1.11.3-install -DCMAKE_C_COMPILER=${{ matrix.cc }} -DCMAKE_CXX_COMPILER=${{ matrix.cxx }} ${{ runner.temp }}/avro-cpp-1.11.3 + mkdir avro-cpp-build + cd avro-cpp-build + cmake -Wno-dev -Wno-deprecated -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_INSTALL_PREFIX=${{ runner.temp }}/avro-cpp-install -DCMAKE_C_COMPILER=${{ matrix.cc }} -DCMAKE_CXX_COMPILER=${{ matrix.cxx }} ${{ runner.temp }}/avro-cpp-1.11.3 cmake --build . -j2 --target avrocpp_s cmake --install . - name: CMake build and install @@ -172,8 +172,51 @@ jobs: cd ${{ github.workspace }}/.. mkdir build cd build - cmake -DAVRO_ROOT=${{ runner.temp }}/avro-cpp-1.11.3-install -DAVRO_USE_STATIC_LIBS=TRUE -DWITH_FESAPI=TRUE -DFESAPI_ROOT=${{ runner.temp }}/fesapi-install -DFESAPI_JAR=${{ runner.temp }}/fesapi-install/lib/fesapiJava-2.11.0.0.jar -DWITH_JAVA_WRAPPING=TRUE ${{ github.workspace }} -DCMAKE_C_COMPILER=${{ matrix.cc }} -DCMAKE_CXX_COMPILER=${{ matrix.cxx }} + cmake -DAVRO_ROOT=${{ runner.temp }}/avro-cpp-install -DAVRO_USE_STATIC_LIBS=TRUE -DWITH_FESAPI=TRUE -DFESAPI_ROOT=${{ runner.temp }}/fesapi-install -DFESAPI_JAR=${{ runner.temp }}/fesapi-install/lib/fesapiJava-2.12.0.0.jar -DWITH_JAVA_WRAPPING=TRUE ${{ github.workspace }} -DCMAKE_C_COMPILER=${{ matrix.cc }} -DCMAKE_CXX_COMPILER=${{ matrix.cxx }} cmake --build . --config Release -j2 + build_wheels_windows: + name: Build wheels on windows-latest + runs-on: windows-latest + steps: + - uses: actions/checkout@v4 + - name: Stub `setup.py` check + # It will be generated during CMake run + # https://github.com/pypa/cibuildwheel/issues/1139 + run: touch python/setup.py + - name: Build wheels + uses: pypa/cibuildwheel@v2.21.3 + env: + CIBW_BUILD: cp38-win_amd64 cp39-win_amd64 cp310-win_amd64 cp311-win_amd64 cp312-win_amd64 cp313-win_amd64 + CIBW_ARCHS: auto64 + CIBW_BEFORE_ALL: > + %VCPKG_INSTALLATION_ROOT%\vcpkg install boost-uuid minizip hdf5[zlib] && + cd ${{ runner.temp }} && + powershell -Command "(New-Object System.Net.WebClient).DownloadFile('https://github.com/F2I-Consulting/fesapi/archive/refs/tags/v2.12.0.0.tar.gz', '${{ runner.temp }}\fesapi-2.12.0.0.tar.gz')" && + 7z x ${{ runner.temp }}\fesapi-2.12.0.0.tar.gz -o${{ runner.temp }} && + 7z x ${{ runner.temp }}\fesapi-2.12.0.0.tar -o${{ runner.temp }} && + mkdir fesapi-build && + cd fesapi-build && + cmake -DCMAKE_TOOLCHAIN_FILE=%VCPKG_INSTALLATION_ROOT%\scripts\buildsystems\vcpkg.cmake -G"Visual Studio 17 2022" -A x64 -T host=x64 -Wno-dev -Wno-deprecated -DCMAKE_INSTALL_PREFIX=${{ runner.temp }}/fesapi-install ${{ runner.temp }}\fesapi-2.12.0.0 && + cmake --build . --config Release -j2 && + cmake --build . --config Release --target INSTALL && + %VCPKG_INSTALLATION_ROOT%\vcpkg install openssl boost-beast avro-cpp && + cd ${{ runner.temp }} && + mkdir fetpapi-build && + cd fetpapi-build && + cmake -DCMAKE_TOOLCHAIN_FILE=%VCPKG_INSTALLATION_ROOT%\scripts\buildsystems\vcpkg.cmake -G"Visual Studio 17 2022" -A x64 -T host=x64 -Wno-dev -Wno-deprecated -DWITH_FESAPI=TRUE -DFESAPI_ROOT=${{ runner.temp }}/fesapi-install -DWITH_PYTHON_WRAPPING=TRUE -DCMAKE_INSTALL_PREFIX=${{ runner.temp }}/fetpapi-install ${{ github.workspace }} && + cmake --build . --config Release -j2 && + cmake --build . --config Release --target INSTALL && + pip install delvewheel + CIBW_REPAIR_WHEEL_COMMAND_WINDOWS: > + delvewheel repair --add-path ${{ runner.temp }}\fetpapi-build\Release --add-path ${{ runner.temp }}\fesapi-build\Release --namespace-pkg fetpapi -w {dest_dir} {wheel} + CIBW_TEST_COMMAND: python ${{github.workspace}}\python\example\etp_client_example.py + with: + package-dir: ./python + output-dir: wheelhouse + - uses: actions/upload-artifact@v4 + with: + name: cibw-wheels-windows + path: ./wheelhouse/*.whl build_wheels_linux: name: Build wheels on ubuntu-latest runs-on: ubuntu-latest @@ -184,22 +227,25 @@ jobs: # https://github.com/pypa/cibuildwheel/issues/1139 run: touch python/setup.py - name: Build wheels - uses: pypa/cibuildwheel@v2.19.2 + uses: pypa/cibuildwheel@v2.21.3 env: CIBW_BUILD: cp38-manylinux_* cp39-manylinux_* cp310-manylinux_* cp311-manylinux_* cp312-manylinux_* cp313-manylinux_* CIBW_ARCHS: auto64 + CIBW_MANYLINUX_X86_64_IMAGE: manylinux_2_28 CIBW_BEFORE_ALL: > - yum install -y wget gcc-c++ openssl-devel minizip-devel && + yum install -y wget gcc-c++ openssl-devel boost-devel && yum search epel-release && yum info epel-release && yum install -y epel-release && - yum --enablerepo=epel install -y cmake3 && + yum --enablerepo=epel install -y minizip1.2-devel hdf5-devel cmake3 && cd / && - wget https://archives.boost.io/release/1.70.0/source/boost_1_70_0.tar.gz && - tar xf boost_1_70_0.tar.gz && - cd boost_1_70_0 && - ./bootstrap.sh --prefix=/boost-install --with-libraries=filesystem,iostreams,program_options,regex,system && - ./b2 install && + wget https://github.com/F2I-Consulting/fesapi/archive/refs/tags/v2.12.0.0.zip && + unzip v2.12.0.0.zip && + mkdir fesapi-build && + cd fesapi-build && + cmake3 -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX:STRING=/fesapi-install /fesapi-2.12.0.0 && + cmake3 --build . -j2 --config Release && + cmake3 --install . && cd / && wget https://archive.apache.org/dist/avro/avro-1.11.3/cpp/avro-cpp-1.11.3.tar.gz && tar xf avro-cpp-1.11.3.tar.gz && @@ -207,29 +253,13 @@ jobs: sed -i 's/install (TARGETS avrogencpp RUNTIME DESTINATION bin)//' avro-cpp-1.11.3/CMakeLists.txt && mkdir avro-build && cd avro-build && - cmake3 -Wno-dev -Wno-deprecated -DBoost_ROOT=/boost-install -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_INSTALL_PREFIX=/avro-install /avro-cpp-1.11.3 && + cmake3 -Wno-dev -Wno-deprecated -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_INSTALL_PREFIX=/avro-install /avro-cpp-1.11.3 && cmake3 --build . -j2 --target avrocpp_s --config Release && cmake3 --install . && cd / && - wget https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.12/hdf5-1.12.3/src/hdf5-1.12.3.tar.gz && - tar xf hdf5-1.12.3.tar.gz && - mkdir hdf5-build && - cd hdf5-build && - cmake3 -G "Unix Makefiles" -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DBUILD_SHARED_LIBS:BOOL=OFF -DBUILD_TESTING:BOOL=OFF -DHDF5_BUILD_TOOLS:BOOL=OFF -DHDF5_BUILD_EXAMPLES:BOOL=OFF -DHDF5_BUILD_CPP_LIB:BOOL=OFF -DHDF5_BUILD_HL_LIB:BOOL=OFF -DCMAKE_INSTALL_PREFIX:STRING=/hdf5-install ../hdf5-1.12.3 && - cmake3 --build . -j2 --config Release && - cmake3 --install . && - cd / && - wget https://github.com/F2I-Consulting/fesapi/archive/refs/tags/v2.11.0.0.zip && - unzip v2.11.0.0.zip && - mkdir fesapi-build && - cd fesapi-build && - cmake3 -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_STANDARD=17 -DBoost_ROOT=/boost-install -DHDF5_ROOT=/hdf5-install -DHDF5_USE_STATIC_LIBRARIES=TRUE -DCMAKE_INSTALL_PREFIX:STRING=/fesapi-install /fesapi-2.11.0.0 && - cmake3 --build . -j2 --config Release && - cmake3 --install . && - cd / && mkdir build && cd build && - cmake3 -DCMAKE_BUILD_TYPE=Release -DBoost_ROOT=/boost-install -DAVRO_ROOT=/avro-install -DAVRO_USE_STATIC_LIBS=TRUE -DWITH_FESAPI=TRUE -DFESAPI_ROOT=/fesapi-install -DWITH_PYTHON_WRAPPING=TRUE -DCMAKE_INSTALL_PREFIX:STRING=/fetpapi-install {project} && + cmake3 -DCMAKE_BUILD_TYPE=Release -DAVRO_ROOT=/avro-install -DAVRO_USE_STATIC_LIBS=TRUE -DWITH_FESAPI=TRUE -DFESAPI_ROOT=/fesapi-install -DWITH_PYTHON_WRAPPING=TRUE -DCMAKE_INSTALL_PREFIX:STRING=/fetpapi-install {project} && cmake3 --build . -j2 --config Release && cmake3 --install . CIBW_REPAIR_WHEEL_COMMAND_LINUX: > @@ -241,7 +271,7 @@ jobs: output-dir: wheelhouse - uses: actions/upload-artifact@v4 with: - name: cibw-wheels-ubuntu-latest + name: cibw-wheels-manylinux_2_28 path: ./wheelhouse/*.whl build_wheels_mac: name: Build wheels on macos-14 @@ -253,19 +283,20 @@ jobs: # https://github.com/pypa/cibuildwheel/issues/1139 run: touch python/setup.py - name: Build wheels - uses: pypa/cibuildwheel@v2.19.2 + uses: pypa/cibuildwheel@v2.21.3 env: CIBW_BUILD: cp38-macosx_* cp39-macosx_* cp310-macosx_* cp311-macosx_* cp312-macosx_* cp313-macosx_* CIBW_ARCHS: auto64 + # See https://cibuildwheel.pypa.io/en/stable/cpp_standards/#macos-and-deployment-target-versions + MACOSX_DEPLOYMENT_TARGET: 11.0 + # Dont use brew for dependencies https://github.com/pypa/cibuildwheel/issues/1251#issuecomment-1234553537 CIBW_BEFORE_ALL: > - brew install boost swig && cd ${{ github.workspace }}/.. && - wget https://github.com/openssl/openssl/releases/download/openssl-3.4.0/openssl-3.4.0.tar.gz && - tar xf openssl-3.4.0.tar.gz && - cd openssl-3.4.0 && - ./Configure --prefix=${{ github.workspace }}/../openssl-install --openssldir=${{ github.workspace }}/../openssl-install && - make && - make install && + wget https://archives.boost.io/release/1.86.0/source/boost_1_86_0.tar.gz && + tar xf boost_1_86_0.tar.gz && + cd boost_1_86_0 && + ./bootstrap.sh --prefix=${{ github.workspace }}/../boost-install --with-libraries=filesystem,iostreams,program_options,regex && + ./b2 install && git clone https://github.com/F2I-Consulting/Minizip.git ${{ github.workspace }}/../minizip && mkdir ${{ github.workspace }}/../minizip-build && cd ${{ github.workspace }}/../minizip-build && @@ -273,16 +304,6 @@ jobs: cmake --build . -j2 --config Release && cmake --install . && cd ${{ github.workspace }}/.. && - wget https://archive.apache.org/dist/avro/avro-1.11.3/cpp/avro-cpp-1.11.3.tar.gz && - tar xf avro-cpp-1.11.3.tar.gz && - sed -i '' 's/install (TARGETS avrocpp avrocpp_s/install (TARGETS avrocpp_s/' avro-cpp-1.11.3/CMakeLists.txt && - sed -i '' 's/install (TARGETS avrogencpp RUNTIME DESTINATION bin)//' avro-cpp-1.11.3/CMakeLists.txt && - mkdir avro-build && - cd avro-build && - cmake -Wno-dev -Wno-deprecated -DBoost_ROOT=/boost-install -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/../avro-install ${{ github.workspace }}/../avro-cpp-1.11.3 && - cmake --build . -j2 --target avrocpp_s --config Release && - cmake --install . && - cd ${{ github.workspace }}/.. && wget https://github.com/HDFGroup/hdf5/releases/download/hdf5_1.14.5/hdf5-1.14.5.tar.gz && tar xf hdf5-1.14.5.tar.gz && mkdir hdf5-build && @@ -290,17 +311,35 @@ jobs: cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DBUILD_SHARED_LIBS:BOOL=OFF -DBUILD_TESTING:BOOL=OFF -DHDF5_BUILD_TOOLS:BOOL=OFF -DHDF5_BUILD_EXAMPLES:BOOL=OFF -DHDF5_BUILD_CPP_LIB:BOOL=OFF -DHDF5_BUILD_HL_LIB:BOOL=OFF -DCMAKE_INSTALL_PREFIX:STRING=${{ github.workspace }}/../hdf5-install ${{ github.workspace }}/../hdf5-1.14.5 && cmake --build . -j2 --config Release && cmake --install . && + brew install swig && cd ${{ github.workspace }}/.. && - wget https://github.com/F2I-Consulting/fesapi/archive/refs/tags/v2.11.0.0.zip && - unzip v2.11.0.0.zip && + wget https://github.com/F2I-Consulting/fesapi/archive/refs/tags/v2.12.0.0.zip && + unzip v2.12.0.0.zip && mkdir fesapi-build && cd fesapi-build && - cmake -DCMAKE_BUILD_TYPE=Release -DMINIZIP_ROOT=${{ github.workspace }}/../minizip-install -DHDF5_ROOT=${{ github.workspace }}/../hdf5-install -DHDF5_USE_STATIC_LIBRARIES=TRUE -DCMAKE_INSTALL_PREFIX:STRING=${{ github.workspace }}/../fesapi-install ${{ github.workspace }}/../fesapi-2.11.0.0 && + cmake -DCMAKE_BUILD_TYPE=Release -DBOOST_ROOT=${{ github.workspace }}/../boost-install -DMINIZIP_ROOT=${{ github.workspace }}/../minizip-install -DHDF5_ROOT=${{ github.workspace }}/../hdf5-install -DHDF5_USE_STATIC_LIBRARIES=TRUE -DCMAKE_INSTALL_PREFIX:STRING=${{ github.workspace }}/../fesapi-install ${{ github.workspace }}/../fesapi-2.12.0.0 && cmake --build . -j2 --config Release && + cmake --install . && + cd ${{ github.workspace }}/.. && + wget https://github.com/openssl/openssl/releases/download/openssl-3.4.0/openssl-3.4.0.tar.gz && + tar xf openssl-3.4.0.tar.gz && + cd openssl-3.4.0 && + ./Configure --prefix=${{ github.workspace }}/../openssl-install --openssldir=${{ github.workspace }}/../openssl-install && + make && + make install && + cd ${{ github.workspace }}/.. && + wget https://archive.apache.org/dist/avro/avro-1.11.3/cpp/avro-cpp-1.11.3.tar.gz && + tar xf avro-cpp-1.11.3.tar.gz && + sed -i '' 's/install (TARGETS avrocpp avrocpp_s/install (TARGETS avrocpp_s/' avro-cpp-1.11.3/CMakeLists.txt && + sed -i '' 's/install (TARGETS avrogencpp RUNTIME DESTINATION bin)//' avro-cpp-1.11.3/CMakeLists.txt && + mkdir avro-build && + cd avro-build && + cmake -Wno-dev -Wno-deprecated -DBOOST_ROOT=${{ github.workspace }}/../boost-install -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/../avro-install ${{ github.workspace }}/../avro-cpp-1.11.3 && + cmake --build . -j2 --target avrocpp_s --config Release && cmake --install . && mkdir ${{ github.workspace }}/../build && cd ${{ github.workspace }}/../build && - cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_STANDARD=17 -DOPENSSL_ROOT_DIR=${{ github.workspace }}/../openssl-install -DAVRO_ROOT=${{ github.workspace }}/../avro-install -DAVRO_USE_STATIC_LIBS=TRUE -DWITH_FESAPI=TRUE -DFESAPI_ROOT=${{ github.workspace }}/../fesapi-install -DWITH_PYTHON_WRAPPING=TRUE -DCMAKE_INSTALL_PREFIX:STRING=${{ github.workspace }}/../fetpapi-install ${{ github.workspace }} && + cmake -DCMAKE_BUILD_TYPE=Release -DBOOST_ROOT=${{ github.workspace }}/../boost-install -DOPENSSL_ROOT_DIR=${{ github.workspace }}/../openssl-install -DAVRO_ROOT=${{ github.workspace }}/../avro-install -DAVRO_USE_STATIC_LIBS=TRUE -DWITH_FESAPI=TRUE -DFESAPI_ROOT=${{ github.workspace }}/../fesapi-install -DWITH_PYTHON_WRAPPING=TRUE -DCMAKE_INSTALL_PREFIX:STRING=${{ github.workspace }}/../fetpapi-install ${{ github.workspace }} && cmake --build . -j2 --config Release && cmake --install . # See https://cibuildwheel.pypa.io/en/stable/faq/#macos-passing-dyld_library_path-to-delocate @@ -312,5 +351,5 @@ jobs: output-dir: wheelhouse - uses: actions/upload-artifact@v4 with: - name: cibw-wheels-macos-14 + name: cibw-wheels-macosx_arm64 path: ./wheelhouse/*.whl diff --git a/cmake/pyproject.toml.in b/cmake/pyproject.toml.in index bdb85fc..5b24afe 100644 --- a/cmake/pyproject.toml.in +++ b/cmake/pyproject.toml.in @@ -43,7 +43,7 @@ keywords = [ ] requires-python = ">=3.8" dependencies = [ - 'fesapi==2.11.0', + 'fesapi==2.12.0', ] [project.urls] diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt index 287d35e..efbb972 100644 --- a/python/CMakeLists.txt +++ b/python/CMakeLists.txt @@ -40,6 +40,9 @@ if (Boost_SYSTEM_LIBRARY_RELEASE) set(Boost_LIBRARY_DIR_RELEASE ",'${Boost_LIBRARY_DIR_RELEASE}'") #cmake_path(GET Boost_SYSTEM_LIBRARY_RELEASE STEM LAST_ONLY Boost_LIBRARY_RELEASE_WLE) get_filename_component(Boost_LIBRARY_RELEASE_WLE ${Boost_SYSTEM_LIBRARY_RELEASE} NAME_WLE) + if (UNIX) + string(REGEX REPLACE "^lib" "" Boost_LIBRARY_RELEASE_WLE ${Boost_LIBRARY_RELEASE_WLE}) + endif() set (Boost_LIBRARY_RELEASE_WLE ",'${Boost_LIBRARY_RELEASE_WLE}'") endif() if (WITH_FESAPI)