From 0677d020b35dc9e91dc95efdff29992c08f34587 Mon Sep 17 00:00:00 2001 From: Hendrik Muhs Date: Sun, 20 Oct 2024 19:27:11 +0200 Subject: [PATCH 01/27] use macos-14 --- .github/workflows/python-cibuildwheel.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/python-cibuildwheel.yml b/.github/workflows/python-cibuildwheel.yml index e978498e6..81c220503 100644 --- a/.github/workflows/python-cibuildwheel.yml +++ b/.github/workflows/python-cibuildwheel.yml @@ -13,19 +13,19 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-22.04, macos-12] + os: [ubuntu-22.04, macos-14] # separate archs, so they use individual caches arch: [ 'x86_64', 'arm64' ] flavor: ['cpython', 'pypy'] # separate musl and many on linux, for mac we just skip one of those target: [ 'many', 'musl' ] exclude: - - os: macos-12 + - os: macos-14 target: musl - os: ubuntu-22.04 target: musl flavor: pypy - - os: macos-12 + - os: macos-14 arch: arm64 flavor: pypy steps: @@ -97,7 +97,7 @@ jobs: PACKAGES=( icu4c xz lz4 zstd zlib snappy boost ) for PACKAGE in "${PACKAGES[@]}" do - response=$(arm64-homebrew/bin/brew fetch --force --bottle-tag=arm64_monterey $PACKAGE | grep Downloaded ) + response=$(arm64-homebrew/bin/brew fetch --force --bottle-tag=arm64_sonoma $PACKAGE | grep Downloaded ) download_path=$(echo $response | xargs -n 1 | tail -1) arm64-homebrew/bin/brew reinstall -vd $download_path done From 97d8c2ecedd4f78361a840a3a4170869199cc1f7 Mon Sep 17 00:00:00 2001 From: Hendrik Muhs Date: Sun, 20 Oct 2024 21:57:54 +0200 Subject: [PATCH 02/27] update docker images, FindSnappy --- .../python-dockerimages-cibuildwheel.yml | 33 ++++++ cmake_modules/FindSnappy.cmake | 20 ++-- cmake_modules/LibFindMacros.cmake | 103 ------------------ docker/manylinux-builder/Dockerfile | 21 ++-- docker/manylinux-builder/build_and_push.sh | 10 +- 5 files changed, 57 insertions(+), 130 deletions(-) create mode 100644 .github/workflows/python-dockerimages-cibuildwheel.yml delete mode 100644 cmake_modules/LibFindMacros.cmake diff --git a/.github/workflows/python-dockerimages-cibuildwheel.yml b/.github/workflows/python-dockerimages-cibuildwheel.yml new file mode 100644 index 000000000..6fab8ebf2 --- /dev/null +++ b/.github/workflows/python-dockerimages-cibuildwheel.yml @@ -0,0 +1,33 @@ +name: Python docker cibuildwheel + +on: + push: + branches: [ master, release-* ] + paths: + - 'docker/*/Dockerfile' + pull_request: + branches: [ master ] + #paths: + #- 'docker/*/Dockerfile' + workflow_dispatch: + +jobs: + build_docker: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: docker/setup-buildx-action@v3 + - name: Log in to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKER_USER }} + password: ${{ secrets.DOCKER_TOKEN }} + - name: Build and push manylinux docker image + uses: docker/build-push-action@v6 + with: + file: docker/manylinux-builder/Dockerfile + push: true + #push: ${{ github.event_name != 'pull_request' }} + build-args: | + - baseimage="quay.io/pypa/manylinux_2_28_x86_64" + tags: keyvidev/manylinux-builder-x86_64 \ No newline at end of file diff --git a/cmake_modules/FindSnappy.cmake b/cmake_modules/FindSnappy.cmake index 18b6f1ca9..8e8f13bb0 100644 --- a/cmake_modules/FindSnappy.cmake +++ b/cmake_modules/FindSnappy.cmake @@ -1,16 +1,16 @@ # Snappy, a fast compressor/decompressor -include(LibFindMacros) +find_path(Snappy_INCLUDE_DIR NAMES snappy.h) -find_path(Snappy_INCLUDE_DIR - NAMES snappy.h -) +find_library(Snappy_LIBRARY NAMES snappy) -find_library(Snappy_LIBRARY - NAMES snappy -) +include(SelectLibraryConfigurations) +SELECT_LIBRARY_CONFIGURATIONS(SNAPPY) -set(Snappy_PROCESS_INCLUDES Snappy_INCLUDE_DIR) -set(Snappy_PROCESS_LIBS Snappy_LIBRARY) +include(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS( + Snappy DEFAULT_MSG + Snappy_LIBRARY Snappy_INCLUDE_DIR +) -libfind_process(Snappy) +mark_as_advanced(Snappy_INCLUDE_DIR Snappy_LIBRARY) \ No newline at end of file diff --git a/cmake_modules/LibFindMacros.cmake b/cmake_modules/LibFindMacros.cmake deleted file mode 100644 index 9c5824f7a..000000000 --- a/cmake_modules/LibFindMacros.cmake +++ /dev/null @@ -1,103 +0,0 @@ -# Version 1.0 (2013-04-12) -# Public Domain, originally written by Lasse Kärkkäinen -# Published at http://www.cmake.org/Wiki/CMake:How_To_Find_Libraries - -# Works the same as find_package, but forwards the "REQUIRED" and "QUIET" arguments -# used for the current package. For this to work, the first parameter must be the -# prefix of the current package, then the prefix of the new package etc, which are -# passed to find_package. -macro (libfind_package PREFIX) - set (LIBFIND_PACKAGE_ARGS ${ARGN}) - if (${PREFIX}_FIND_QUIETLY) - set (LIBFIND_PACKAGE_ARGS ${LIBFIND_PACKAGE_ARGS} QUIET) - endif (${PREFIX}_FIND_QUIETLY) - if (${PREFIX}_FIND_REQUIRED) - set (LIBFIND_PACKAGE_ARGS ${LIBFIND_PACKAGE_ARGS} REQUIRED) - endif (${PREFIX}_FIND_REQUIRED) - find_package(${LIBFIND_PACKAGE_ARGS}) -endmacro (libfind_package) - -# CMake developers made the UsePkgConfig system deprecated in the same release (2.6) -# where they added pkg_check_modules. Consequently I need to support both in my scripts -# to avoid those deprecated warnings. Here's a helper that does just that. -# Works identically to pkg_check_modules, except that no checks are needed prior to use. -macro (libfind_pkg_check_modules PREFIX PKGNAME) - if (${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} EQUAL 4) - include(UsePkgConfig) - pkgconfig(${PKGNAME} ${PREFIX}_INCLUDE_DIRS ${PREFIX}_LIBRARY_DIRS ${PREFIX}_LDFLAGS ${PREFIX}_CFLAGS) - else (${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} EQUAL 4) - find_package(PkgConfig) - if (PKG_CONFIG_FOUND) - pkg_check_modules(${PREFIX} ${PKGNAME}) - endif (PKG_CONFIG_FOUND) - endif (${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} EQUAL 4) -endmacro (libfind_pkg_check_modules) - -# Do the final processing once the paths have been detected. -# If include dirs are needed, ${PREFIX}_PROCESS_INCLUDES should be set to contain -# all the variables, each of which contain one include directory. -# Ditto for ${PREFIX}_PROCESS_LIBS and library files. -# Will set ${PREFIX}_FOUND, ${PREFIX}_INCLUDE_DIRS and ${PREFIX}_LIBRARIES. -# Also handles errors in case library detection was required, etc. -macro (libfind_process PREFIX) - # Skip processing if already processed during this run - if (NOT ${PREFIX}_FOUND) - # Start with the assumption that the library was found - set (${PREFIX}_FOUND TRUE) - - # Process all includes and set _FOUND to false if any are missing - foreach (i ${${PREFIX}_PROCESS_INCLUDES}) - if (${i}) - set (${PREFIX}_INCLUDE_DIRS ${${PREFIX}_INCLUDE_DIRS} ${${i}}) - mark_as_advanced(${i}) - else (${i}) - set (${PREFIX}_FOUND FALSE) - endif (${i}) - endforeach (i) - - # Process all libraries and set _FOUND to false if any are missing - foreach (i ${${PREFIX}_PROCESS_LIBS}) - if (${i}) - set (${PREFIX}_LIBRARIES ${${PREFIX}_LIBRARIES} ${${i}}) - mark_as_advanced(${i}) - else (${i}) - set (${PREFIX}_FOUND FALSE) - endif (${i}) - endforeach (i) - - # Print message and/or exit on fatal error - if (${PREFIX}_FOUND) - if (NOT ${PREFIX}_FIND_QUIETLY) - message (STATUS "Found ${PREFIX} ${${PREFIX}_VERSION}") - endif (NOT ${PREFIX}_FIND_QUIETLY) - else (${PREFIX}_FOUND) - if (${PREFIX}_FIND_REQUIRED) - foreach (i ${${PREFIX}_PROCESS_INCLUDES} ${${PREFIX}_PROCESS_LIBS}) - message("${i}=${${i}}") - endforeach (i) - message (FATAL_ERROR "Required library ${PREFIX} NOT FOUND.\nInstall the library (dev version) and try again. If the library is already installed, use ccmake to set the missing variables manually.") - endif (${PREFIX}_FIND_REQUIRED) - endif (${PREFIX}_FOUND) - endif (NOT ${PREFIX}_FOUND) -endmacro (libfind_process) - -macro(libfind_library PREFIX basename) - set(TMP "") - if(MSVC80) - set(TMP -vc80) - endif(MSVC80) - if(MSVC90) - set(TMP -vc90) - endif(MSVC90) - set(${PREFIX}_LIBNAMES ${basename}${TMP}) - if(${ARGC} GREATER 2) - set(${PREFIX}_LIBNAMES ${basename}${TMP}-${ARGV2}) - string(REGEX REPLACE "\\." "_" TMP ${${PREFIX}_LIBNAMES}) - set(${PREFIX}_LIBNAMES ${${PREFIX}_LIBNAMES} ${TMP}) - endif(${ARGC} GREATER 2) - find_library(${PREFIX}_LIBRARY - NAMES ${${PREFIX}_LIBNAMES} - PATHS ${${PREFIX}_PKGCONF_LIBRARY_DIRS} - ) -endmacro(libfind_library) - diff --git a/docker/manylinux-builder/Dockerfile b/docker/manylinux-builder/Dockerfile index d9acf435c..46786f8c4 100644 --- a/docker/manylinux-builder/Dockerfile +++ b/docker/manylinux-builder/Dockerfile @@ -5,10 +5,7 @@ RUN \ if which yum; then \ yum -y update && \ yum clean all && \ - yum -y install bzip2-devel snappy-devel python-devel && \ - if [ $AUDITWHEEL_ARCH != "aarch64" ]; then \ - yum -y install hiredis-devel libzstd-devel; \ - fi && \ + yum -y install bzip2-devel snappy-devel xxhash-devel libzstd-devel python3-devel && \ yum clean all; \ elif which apk; then \ apk upgrade --no-cache && \ @@ -18,12 +15,12 @@ RUN \ exit 1; \ fi -ENV ZLIB_MAJOR=1 ZLIB_MINOR=3 +ENV ZLIB_MAJOR=1 ZLIB_MINOR=3 ZLIB_PATCH=1 -RUN curl https://zlib.net/zlib-${ZLIB_MAJOR}.${ZLIB_MINOR}.tar.gz --output zlib-${ZLIB_MAJOR}.${ZLIB_MINOR}.tar.gz && \ - tar -xvf zlib-${ZLIB_MAJOR}.${ZLIB_MINOR}.tar.gz && \ - cd zlib-${ZLIB_MAJOR}.${ZLIB_MINOR} && ./configure && make -j`nproc` && make install && \ - cd .. && rm -rf zlib-${ZLIB_MAJOR}.${ZLIB_MINOR} zlib-${ZLIB_MAJOR}.${ZLIB_MINOR}.tar.gz +RUN curl https://zlib.net/zlib-${ZLIB_MAJOR}.${ZLIB_MINOR}.${ZLIB_PATCH}.tar.gz --output zlib-${ZLIB_MAJOR}.${ZLIB_MINOR}.${ZLIB_PATCH}.tar.gz && \ + tar -xvf zlib-${ZLIB_MAJOR}.${ZLIB_MINOR}.${ZLIB_PATCH}.tar.gz && \ + cd zlib-${ZLIB_MAJOR}.${ZLIB_MINOR}.${ZLIB_PATCH} && ./configure && make -j`nproc` && make install && \ + cd .. && rm -rf zlib-${ZLIB_MAJOR}.${ZLIB_MINOR}.${ZLIB_PATCH} zlib-${ZLIB_MAJOR}.${ZLIB_MINOR}.${ZLIB_PATCH}.tar.gz ENV BOOST_MAJOR=1 BOOST_MINOR=83 BOOST_PATCH=0 ENV BOOST_URL="https://boostorg.jfrog.io/artifactory/main/release/${BOOST_MAJOR}.${BOOST_MINOR}.${BOOST_PATCH}/source/boost_${BOOST_MAJOR}_${BOOST_MINOR}_${BOOST_PATCH}.tar.gz" @@ -44,14 +41,14 @@ RUN curl -sSL https://cmake.org/files/v${CMAKE_MAJOR}.${CMAKE_MINOR}/cmake-${CMA cd cmake-${CMAKE_MAJOR}.${CMAKE_MINOR}.${CMAKE_PATCH} && ./bootstrap --parallel=`nproc` -- -DCMAKE_USE_OPENSSL=OFF && make -j`nproc` && make install && \ cd .. && rm -rf cmake-${CMAKE_MAJOR}.${CMAKE_MINOR}.${CMAKE_PATCH} -ENV CCACHE_MAJOR=4 CCACHE_MINOR=8 CCACHE_PATCH=3 +ENV CCACHE_MAJOR=4 CCACHE_MINOR=10 CCACHE_PATCH=2 RUN \ if [ $AUDITWHEEL_ARCH == "aarch64" ] && [ $AUDITWHEEL_POLICY == "manylinux2014" ]; then \ echo "skiping ccache, not available for this platform"; \ else \ curl -sSL https://github.com/ccache/ccache/archive/refs/tags/v${CCACHE_MAJOR}.${CCACHE_MINOR}.${CCACHE_PATCH}.tar.gz | tar -xz && \ - cd ccache-${CCACHE_MAJOR}.${CCACHE_MINOR}.${CCACHE_PATCH} && mkdir build && cd build && cmake -DCMAKE_BUILD_TYPE=Release .. && make -j`nproc` && make install && \ + cd ccache-${CCACHE_MAJOR}.${CCACHE_MINOR}.${CCACHE_PATCH} && mkdir build && cd build && cmake -D ENABLE_TESTING=OFF -D REDIS_STORAGE_BACKEND=OFF -D CMAKE_BUILD_TYPE=Release .. && make -j`nproc` && make install && \ cd ../.. && rm -rf ccache-${CCACHE_MAJOR}.${CCACHE_MINOR}.${CCACHE_PATCH}; \ fi @@ -60,4 +57,4 @@ RUN ln -s /usr/local/bin/ccache /usr/local/bin/gcc && \ ln -s /usr/local/bin/ccache /usr/local/bin/cc && \ ln -s /usr/local/bin/ccache /usr/local/bin/c++ && \ ln -s /usr/local/bin/ccache /usr/local/bin/clang && \ - ln -s /usr/local/bin/ccache /usr/local/bin/clang++ \ No newline at end of file + ln -s /usr/local/bin/ccache /usr/local/bin/clang++ diff --git a/docker/manylinux-builder/build_and_push.sh b/docker/manylinux-builder/build_and_push.sh index b6daf232a..7f417b06f 100755 --- a/docker/manylinux-builder/build_and_push.sh +++ b/docker/manylinux-builder/build_and_push.sh @@ -2,14 +2,14 @@ set -euxo pipefail -docker build . \ - -f Dockerfile \ - --build-arg base_image="quay.io/pypa/manylinux2014_x86_64" \ - -t keyvidev/manylinux-builder-x86_64 +#docker build . \ +# -f Dockerfile \ +# --build-arg base_image="quay.io/pypa/manylinux_2_28_x86_64" \ +# -t keyvidev/manylinux-builder-x86_64 docker build . \ -f Dockerfile \ - --build-arg base_image="quay.io/pypa/manylinux2014_aarch64" \ + --build-arg base_image="quay.io/pypa/manylinux_2_28_aarch64" \ -t keyvidev/manylinux-builder-aarch64 docker build . \ From ee46a3e4477cc6a00ba7f0568f3038e0ed132c6a Mon Sep 17 00:00:00 2001 From: Hendrik Muhs Date: Sun, 20 Oct 2024 22:38:50 +0200 Subject: [PATCH 03/27] only login to docker on push --- .github/workflows/python-dockerimages-cibuildwheel.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/python-dockerimages-cibuildwheel.yml b/.github/workflows/python-dockerimages-cibuildwheel.yml index 6fab8ebf2..1451b9023 100644 --- a/.github/workflows/python-dockerimages-cibuildwheel.yml +++ b/.github/workflows/python-dockerimages-cibuildwheel.yml @@ -18,6 +18,7 @@ jobs: - uses: actions/checkout@v4 - uses: docker/setup-buildx-action@v3 - name: Log in to Docker Hub + if: github.event_name == 'push' uses: docker/login-action@v3 with: username: ${{ secrets.DOCKER_USER }} From b46e4ec402a9325817265d9649a0a0637cc03fbf Mon Sep 17 00:00:00 2001 From: Hendrik Muhs Date: Sun, 20 Oct 2024 22:55:18 +0200 Subject: [PATCH 04/27] use context --- .github/workflows/python-dockerimages-cibuildwheel.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-dockerimages-cibuildwheel.yml b/.github/workflows/python-dockerimages-cibuildwheel.yml index 1451b9023..a2ba13422 100644 --- a/.github/workflows/python-dockerimages-cibuildwheel.yml +++ b/.github/workflows/python-dockerimages-cibuildwheel.yml @@ -26,7 +26,7 @@ jobs: - name: Build and push manylinux docker image uses: docker/build-push-action@v6 with: - file: docker/manylinux-builder/Dockerfile + context: docker/manylinux-builder push: true #push: ${{ github.event_name != 'pull_request' }} build-args: | From ea735fa63ca8e9c81d8768bbe8ec04a1a79a9696 Mon Sep 17 00:00:00 2001 From: Hendrik Muhs Date: Sun, 20 Oct 2024 23:01:47 +0200 Subject: [PATCH 05/27] fix argument --- .github/workflows/python-dockerimages-cibuildwheel.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-dockerimages-cibuildwheel.yml b/.github/workflows/python-dockerimages-cibuildwheel.yml index a2ba13422..3823264f1 100644 --- a/.github/workflows/python-dockerimages-cibuildwheel.yml +++ b/.github/workflows/python-dockerimages-cibuildwheel.yml @@ -30,5 +30,5 @@ jobs: push: true #push: ${{ github.event_name != 'pull_request' }} build-args: | - - baseimage="quay.io/pypa/manylinux_2_28_x86_64" + - base_image="quay.io/pypa/manylinux_2_28_x86_64" tags: keyvidev/manylinux-builder-x86_64 \ No newline at end of file From 86d3383643573168833dd30cd69f995a8d1bc011 Mon Sep 17 00:00:00 2001 From: Hendrik Muhs Date: Sun, 20 Oct 2024 23:05:27 +0200 Subject: [PATCH 06/27] remove - --- .github/workflows/python-dockerimages-cibuildwheel.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-dockerimages-cibuildwheel.yml b/.github/workflows/python-dockerimages-cibuildwheel.yml index 3823264f1..d960a4bf3 100644 --- a/.github/workflows/python-dockerimages-cibuildwheel.yml +++ b/.github/workflows/python-dockerimages-cibuildwheel.yml @@ -30,5 +30,5 @@ jobs: push: true #push: ${{ github.event_name != 'pull_request' }} build-args: | - - base_image="quay.io/pypa/manylinux_2_28_x86_64" + base_image="quay.io/pypa/manylinux_2_28_x86_64" tags: keyvidev/manylinux-builder-x86_64 \ No newline at end of file From d0c603ebfe82a3d639e012e1594c437b8ce52c00 Mon Sep 17 00:00:00 2001 From: Hendrik Muhs Date: Sun, 20 Oct 2024 23:08:29 +0200 Subject: [PATCH 07/27] remove quotes --- .github/workflows/python-dockerimages-cibuildwheel.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-dockerimages-cibuildwheel.yml b/.github/workflows/python-dockerimages-cibuildwheel.yml index d960a4bf3..259af1ccb 100644 --- a/.github/workflows/python-dockerimages-cibuildwheel.yml +++ b/.github/workflows/python-dockerimages-cibuildwheel.yml @@ -30,5 +30,5 @@ jobs: push: true #push: ${{ github.event_name != 'pull_request' }} build-args: | - base_image="quay.io/pypa/manylinux_2_28_x86_64" + base_image=quay.io/pypa/manylinux_2_28_x86_64 tags: keyvidev/manylinux-builder-x86_64 \ No newline at end of file From 581fe2cfdc80d94ff07662ae345846971dd4256d Mon Sep 17 00:00:00 2001 From: Hendrik Muhs Date: Sun, 20 Oct 2024 23:15:07 +0200 Subject: [PATCH 08/27] debug snappy --- cmake_modules/FindSnappy.cmake | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cmake_modules/FindSnappy.cmake b/cmake_modules/FindSnappy.cmake index 8e8f13bb0..d9537b2b8 100644 --- a/cmake_modules/FindSnappy.cmake +++ b/cmake_modules/FindSnappy.cmake @@ -4,6 +4,8 @@ find_path(Snappy_INCLUDE_DIR NAMES snappy.h) find_library(Snappy_LIBRARY NAMES snappy) +message("${Snappy_INCLUDE_DIR} -- ${Snappy_LIBRARY}") + include(SelectLibraryConfigurations) SELECT_LIBRARY_CONFIGURATIONS(SNAPPY) From d8654ed05c222a2b8c3a40e2b34484e258bde305 Mon Sep 17 00:00:00 2001 From: Hendrik Muhs Date: Mon, 21 Oct 2024 07:12:46 +0200 Subject: [PATCH 09/27] try macos 15 --- .github/workflows/python-cibuildwheel.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/python-cibuildwheel.yml b/.github/workflows/python-cibuildwheel.yml index 81c220503..2dc1a2d4c 100644 --- a/.github/workflows/python-cibuildwheel.yml +++ b/.github/workflows/python-cibuildwheel.yml @@ -13,19 +13,19 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-22.04, macos-14] + os: [ubuntu-22.04, macos-15] # separate archs, so they use individual caches arch: [ 'x86_64', 'arm64' ] flavor: ['cpython', 'pypy'] # separate musl and many on linux, for mac we just skip one of those target: [ 'many', 'musl' ] exclude: - - os: macos-14 + - os: macos-15 target: musl - os: ubuntu-22.04 target: musl flavor: pypy - - os: macos-14 + - os: macos-15 arch: arm64 flavor: pypy steps: From 08febf326ba91c4c0fb30f4dc72a39e03a2b06ca Mon Sep 17 00:00:00 2001 From: Hendrik Muhs Date: Mon, 21 Oct 2024 07:14:40 +0200 Subject: [PATCH 10/27] change arm64 bottle tag --- .github/workflows/python-cibuildwheel.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-cibuildwheel.yml b/.github/workflows/python-cibuildwheel.yml index 2dc1a2d4c..44bca279c 100644 --- a/.github/workflows/python-cibuildwheel.yml +++ b/.github/workflows/python-cibuildwheel.yml @@ -97,7 +97,7 @@ jobs: PACKAGES=( icu4c xz lz4 zstd zlib snappy boost ) for PACKAGE in "${PACKAGES[@]}" do - response=$(arm64-homebrew/bin/brew fetch --force --bottle-tag=arm64_sonoma $PACKAGE | grep Downloaded ) + response=$(arm64-homebrew/bin/brew fetch --force --bottle-tag=arm64_sequoia $PACKAGE | grep Downloaded ) download_path=$(echo $response | xargs -n 1 | tail -1) arm64-homebrew/bin/brew reinstall -vd $download_path done From c34ad4658f3980d8e98dfe430c4d941ddd86a9d9 Mon Sep 17 00:00:00 2001 From: Hendrik Muhs Date: Mon, 21 Oct 2024 07:30:41 +0200 Subject: [PATCH 11/27] use macosx-13 runner --- .github/workflows/python-cibuildwheel.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/python-cibuildwheel.yml b/.github/workflows/python-cibuildwheel.yml index 44bca279c..55f686361 100644 --- a/.github/workflows/python-cibuildwheel.yml +++ b/.github/workflows/python-cibuildwheel.yml @@ -13,19 +13,19 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-22.04, macos-15] + os: [ubuntu-22.04, macos-13] # separate archs, so they use individual caches arch: [ 'x86_64', 'arm64' ] flavor: ['cpython', 'pypy'] # separate musl and many on linux, for mac we just skip one of those target: [ 'many', 'musl' ] exclude: - - os: macos-15 + - os: macos-13 target: musl - os: ubuntu-22.04 target: musl flavor: pypy - - os: macos-15 + - os: macos-13 arch: arm64 flavor: pypy steps: @@ -97,7 +97,7 @@ jobs: PACKAGES=( icu4c xz lz4 zstd zlib snappy boost ) for PACKAGE in "${PACKAGES[@]}" do - response=$(arm64-homebrew/bin/brew fetch --force --bottle-tag=arm64_sequoia $PACKAGE | grep Downloaded ) + response=$(arm64-homebrew/bin/brew fetch --force --bottle-tag=arm64_ventura $PACKAGE | grep Downloaded ) download_path=$(echo $response | xargs -n 1 | tail -1) arm64-homebrew/bin/brew reinstall -vd $download_path done From 359f818b58b919daa827d502389e335eb6ad2fdc Mon Sep 17 00:00:00 2001 From: Hendrik Muhs Date: Mon, 21 Oct 2024 07:31:50 +0200 Subject: [PATCH 12/27] push docker image only for push events --- .github/workflows/python-dockerimages-cibuildwheel.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/python-dockerimages-cibuildwheel.yml b/.github/workflows/python-dockerimages-cibuildwheel.yml index 259af1ccb..ca14943c9 100644 --- a/.github/workflows/python-dockerimages-cibuildwheel.yml +++ b/.github/workflows/python-dockerimages-cibuildwheel.yml @@ -27,8 +27,7 @@ jobs: uses: docker/build-push-action@v6 with: context: docker/manylinux-builder - push: true - #push: ${{ github.event_name != 'pull_request' }} + push: ${{ github.event_name == 'push' }} build-args: | base_image=quay.io/pypa/manylinux_2_28_x86_64 tags: keyvidev/manylinux-builder-x86_64 \ No newline at end of file From 3a0aab67fbbc169240cb85f078db49390183dc66 Mon Sep 17 00:00:00 2001 From: Hendrik Muhs Date: Mon, 21 Oct 2024 08:31:20 +0200 Subject: [PATCH 13/27] adapt deployment target --- .github/workflows/python-cibuildwheel.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-cibuildwheel.yml b/.github/workflows/python-cibuildwheel.yml index 55f686361..b2454fa9a 100644 --- a/.github/workflows/python-cibuildwheel.yml +++ b/.github/workflows/python-cibuildwheel.yml @@ -90,7 +90,7 @@ jobs: if: ${{ (runner.os == 'macOS') && (matrix.arch == 'arm64') }} run: | set -e - echo "MACOSX_DEPLOYMENT_TARGET=12.3.0" >> $GITHUB_ENV + echo "MACOSX_DEPLOYMENT_TARGET=13.0" >> $GITHUB_ENV echo "_CMAKE_PREFIX_PATH=${{ github.workspace }}/arm64-homebrew" >> $GITHUB_ENV echo "CIBW_REPAIR_WHEEL_COMMAND_MACOS=DYLD_LIBRARY_PATH=${{ github.workspace }}/arm64-homebrew delocate-wheel --require-archs {delocate_archs} -w {dest_dir} -v {wheel}" >> $GITHUB_ENV mkdir arm64-homebrew && curl -L https://github.com/Homebrew/brew/tarball/master | tar xz --strip 1 -C arm64-homebrew From 9ac3443d6c68dd814f66249ba5c8fcb7cce8a9ed Mon Sep 17 00:00:00 2001 From: Hendrik Muhs Date: Mon, 21 Oct 2024 21:00:29 +0200 Subject: [PATCH 14/27] update docker images --- .../python-dockerimages-cibuildwheel.yml | 18 +++++++++++++++--- docker/manylinux-builder/Dockerfile | 8 ++++---- 2 files changed, 19 insertions(+), 7 deletions(-) diff --git a/.github/workflows/python-dockerimages-cibuildwheel.yml b/.github/workflows/python-dockerimages-cibuildwheel.yml index ca14943c9..b6115b3fd 100644 --- a/.github/workflows/python-dockerimages-cibuildwheel.yml +++ b/.github/workflows/python-dockerimages-cibuildwheel.yml @@ -1,4 +1,4 @@ -name: Python docker cibuildwheel +name: Python Linux docker cibuildwheel on: push: @@ -14,6 +14,10 @@ on: jobs: build_docker: runs-on: ubuntu-latest + strategy: + matrix: + base_image: [many, musl] + arch: [x86_64, aarch64] steps: - uses: actions/checkout@v4 - uses: docker/setup-buildx-action@v3 @@ -23,11 +27,19 @@ jobs: with: username: ${{ secrets.DOCKER_USER }} password: ${{ secrets.DOCKER_TOKEN }} - - name: Build and push manylinux docker image + - name: Sets env for manylinux + run: | + echo "BASE_IMAGE=quay.io/pypa/manylinux_2_28_${{ matrix.arch }}" >> $GITHUB_ENV + if: matrix.base_image == 'many' + - name: Sets env for musllinux + run: | + echo "BASE_IMAGE=quay.io/pypa/musllinux_1_1_${{ matrix.arch }}" >> $GITHUB_ENV + if: matrix.base_image == 'musl' + - name: Build and push ${{ matrix.base_image }}-${{ matrix.arch }} docker image uses: docker/build-push-action@v6 with: context: docker/manylinux-builder push: ${{ github.event_name == 'push' }} build-args: | - base_image=quay.io/pypa/manylinux_2_28_x86_64 + base_image=${{ env.BASE_IMAGE }} tags: keyvidev/manylinux-builder-x86_64 \ No newline at end of file diff --git a/docker/manylinux-builder/Dockerfile b/docker/manylinux-builder/Dockerfile index 46786f8c4..1aad0e558 100644 --- a/docker/manylinux-builder/Dockerfile +++ b/docker/manylinux-builder/Dockerfile @@ -5,11 +5,11 @@ RUN \ if which yum; then \ yum -y update && \ yum clean all && \ - yum -y install bzip2-devel snappy-devel xxhash-devel libzstd-devel python3-devel && \ + yum -y install bzip2-devel snappy-devel xxhash-devel libzstd-devel python3-devel openssl-devel && \ yum clean all; \ elif which apk; then \ apk upgrade --no-cache && \ - apk add --no-cache procps bzip2-dev snappy-dev python3-dev hiredis-dev zstd-dev; \ + apk add --no-cache procps bzip2-dev snappy-dev python3-dev zstd-dev xxhash-dev openssl-dev; \ else \ echo "unsupported os"; \ exit 1; \ @@ -35,10 +35,10 @@ RUN cd boost_${BOOST_MAJOR}_${BOOST_MINOR}_${BOOST_PATCH} && \ cd .. && \ rm -rf boost_* -ENV CMAKE_MAJOR=3 CMAKE_MINOR=27 CMAKE_PATCH=7 +ENV CMAKE_MAJOR=3 CMAKE_MINOR=30 CMAKE_PATCH=5 RUN curl -sSL https://cmake.org/files/v${CMAKE_MAJOR}.${CMAKE_MINOR}/cmake-${CMAKE_MAJOR}.${CMAKE_MINOR}.${CMAKE_PATCH}.tar.gz | tar -xz && \ - cd cmake-${CMAKE_MAJOR}.${CMAKE_MINOR}.${CMAKE_PATCH} && ./bootstrap --parallel=`nproc` -- -DCMAKE_USE_OPENSSL=OFF && make -j`nproc` && make install && \ + cd cmake-${CMAKE_MAJOR}.${CMAKE_MINOR}.${CMAKE_PATCH} && ./bootstrap --parallel=`nproc` -- && make -j`nproc` && make install && \ cd .. && rm -rf cmake-${CMAKE_MAJOR}.${CMAKE_MINOR}.${CMAKE_PATCH} ENV CCACHE_MAJOR=4 CCACHE_MINOR=10 CCACHE_PATCH=2 From 5ee3244de6213f30239165958ea324d9e9c9d5b1 Mon Sep 17 00:00:00 2001 From: Hendrik Muhs Date: Mon, 21 Oct 2024 21:11:28 +0200 Subject: [PATCH 15/27] fix tag --- .github/workflows/python-dockerimages-cibuildwheel.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-dockerimages-cibuildwheel.yml b/.github/workflows/python-dockerimages-cibuildwheel.yml index b6115b3fd..718054e6c 100644 --- a/.github/workflows/python-dockerimages-cibuildwheel.yml +++ b/.github/workflows/python-dockerimages-cibuildwheel.yml @@ -42,4 +42,4 @@ jobs: push: ${{ github.event_name == 'push' }} build-args: | base_image=${{ env.BASE_IMAGE }} - tags: keyvidev/manylinux-builder-x86_64 \ No newline at end of file + tags: keyvidev/${{ matrix.base_image }}linux-builder-${{ matrix.arch }} \ No newline at end of file From 9bde8becea1e408274af656484142d10389f2a21 Mon Sep 17 00:00:00 2001 From: Hendrik Muhs Date: Mon, 21 Oct 2024 21:37:27 +0200 Subject: [PATCH 16/27] add qemu --- .github/workflows/python-dockerimages-cibuildwheel.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/python-dockerimages-cibuildwheel.yml b/.github/workflows/python-dockerimages-cibuildwheel.yml index 718054e6c..a394c2b06 100644 --- a/.github/workflows/python-dockerimages-cibuildwheel.yml +++ b/.github/workflows/python-dockerimages-cibuildwheel.yml @@ -20,6 +20,11 @@ jobs: arch: [x86_64, aarch64] steps: - uses: actions/checkout@v4 + - name: Set up QEMU + if: ${{ matrix.arch == 'aarch64' }} + uses: docker/setup-qemu-action@v3 + with: + platforms: all - uses: docker/setup-buildx-action@v3 - name: Log in to Docker Hub if: github.event_name == 'push' From 5744d0cb31ab71bb72b7c55d3d6d66f5d38f8a59 Mon Sep 17 00:00:00 2001 From: Hendrik Muhs Date: Mon, 21 Oct 2024 22:12:50 +0200 Subject: [PATCH 17/27] try higher target --- .github/workflows/python-cibuildwheel.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-cibuildwheel.yml b/.github/workflows/python-cibuildwheel.yml index b2454fa9a..6b7b2f11f 100644 --- a/.github/workflows/python-cibuildwheel.yml +++ b/.github/workflows/python-cibuildwheel.yml @@ -90,7 +90,7 @@ jobs: if: ${{ (runner.os == 'macOS') && (matrix.arch == 'arm64') }} run: | set -e - echo "MACOSX_DEPLOYMENT_TARGET=13.0" >> $GITHUB_ENV + echo "MACOSX_DEPLOYMENT_TARGET=14.0" >> $GITHUB_ENV echo "_CMAKE_PREFIX_PATH=${{ github.workspace }}/arm64-homebrew" >> $GITHUB_ENV echo "CIBW_REPAIR_WHEEL_COMMAND_MACOS=DYLD_LIBRARY_PATH=${{ github.workspace }}/arm64-homebrew delocate-wheel --require-archs {delocate_archs} -w {dest_dir} -v {wheel}" >> $GITHUB_ENV mkdir arm64-homebrew && curl -L https://github.com/Homebrew/brew/tarball/master | tar xz --strip 1 -C arm64-homebrew From 9e181f9ef0f20c51136c8cb082035ecef0fda3d6 Mon Sep 17 00:00:00 2001 From: Hendrik Muhs Date: Mon, 21 Oct 2024 22:40:03 +0200 Subject: [PATCH 18/27] test without require archs --- .github/workflows/python-cibuildwheel.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/python-cibuildwheel.yml b/.github/workflows/python-cibuildwheel.yml index 6b7b2f11f..0b888f4e0 100644 --- a/.github/workflows/python-cibuildwheel.yml +++ b/.github/workflows/python-cibuildwheel.yml @@ -90,9 +90,9 @@ jobs: if: ${{ (runner.os == 'macOS') && (matrix.arch == 'arm64') }} run: | set -e - echo "MACOSX_DEPLOYMENT_TARGET=14.0" >> $GITHUB_ENV + echo "MACOSX_DEPLOYMENT_TARGET=13.7" >> $GITHUB_ENV echo "_CMAKE_PREFIX_PATH=${{ github.workspace }}/arm64-homebrew" >> $GITHUB_ENV - echo "CIBW_REPAIR_WHEEL_COMMAND_MACOS=DYLD_LIBRARY_PATH=${{ github.workspace }}/arm64-homebrew delocate-wheel --require-archs {delocate_archs} -w {dest_dir} -v {wheel}" >> $GITHUB_ENV + echo "CIBW_REPAIR_WHEEL_COMMAND_MACOS=DYLD_LIBRARY_PATH=${{ github.workspace }}/arm64-homebrew delocate-wheel -w {dest_dir} -v {wheel}" >> $GITHUB_ENV mkdir arm64-homebrew && curl -L https://github.com/Homebrew/brew/tarball/master | tar xz --strip 1 -C arm64-homebrew PACKAGES=( icu4c xz lz4 zstd zlib snappy boost ) for PACKAGE in "${PACKAGES[@]}" From de8ae6a3058921bc5af2da9f03928edf1403d0cf Mon Sep 17 00:00:00 2001 From: Hendrik Muhs Date: Mon, 21 Oct 2024 22:42:43 +0200 Subject: [PATCH 19/27] revert commenting --- docker/manylinux-builder/build_and_push.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docker/manylinux-builder/build_and_push.sh b/docker/manylinux-builder/build_and_push.sh index 7f417b06f..2e94256f0 100755 --- a/docker/manylinux-builder/build_and_push.sh +++ b/docker/manylinux-builder/build_and_push.sh @@ -2,10 +2,10 @@ set -euxo pipefail -#docker build . \ -# -f Dockerfile \ -# --build-arg base_image="quay.io/pypa/manylinux_2_28_x86_64" \ -# -t keyvidev/manylinux-builder-x86_64 +docker build . \ + -f Dockerfile \ + --build-arg base_image="quay.io/pypa/manylinux_2_28_x86_64" \ + -t keyvidev/manylinux-builder-x86_64 docker build . \ -f Dockerfile \ From 7b774d5a5bcdd8b6df56ee74c7e6976ba03cb9e8 Mon Sep 17 00:00:00 2001 From: Hendrik Muhs Date: Mon, 21 Oct 2024 22:57:57 +0200 Subject: [PATCH 20/27] revert cibuildwheel changes for macosx --- .github/workflows/python-cibuildwheel.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/python-cibuildwheel.yml b/.github/workflows/python-cibuildwheel.yml index 0b888f4e0..e978498e6 100644 --- a/.github/workflows/python-cibuildwheel.yml +++ b/.github/workflows/python-cibuildwheel.yml @@ -13,19 +13,19 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-22.04, macos-13] + os: [ubuntu-22.04, macos-12] # separate archs, so they use individual caches arch: [ 'x86_64', 'arm64' ] flavor: ['cpython', 'pypy'] # separate musl and many on linux, for mac we just skip one of those target: [ 'many', 'musl' ] exclude: - - os: macos-13 + - os: macos-12 target: musl - os: ubuntu-22.04 target: musl flavor: pypy - - os: macos-13 + - os: macos-12 arch: arm64 flavor: pypy steps: @@ -90,14 +90,14 @@ jobs: if: ${{ (runner.os == 'macOS') && (matrix.arch == 'arm64') }} run: | set -e - echo "MACOSX_DEPLOYMENT_TARGET=13.7" >> $GITHUB_ENV + echo "MACOSX_DEPLOYMENT_TARGET=12.3.0" >> $GITHUB_ENV echo "_CMAKE_PREFIX_PATH=${{ github.workspace }}/arm64-homebrew" >> $GITHUB_ENV - echo "CIBW_REPAIR_WHEEL_COMMAND_MACOS=DYLD_LIBRARY_PATH=${{ github.workspace }}/arm64-homebrew delocate-wheel -w {dest_dir} -v {wheel}" >> $GITHUB_ENV + echo "CIBW_REPAIR_WHEEL_COMMAND_MACOS=DYLD_LIBRARY_PATH=${{ github.workspace }}/arm64-homebrew delocate-wheel --require-archs {delocate_archs} -w {dest_dir} -v {wheel}" >> $GITHUB_ENV mkdir arm64-homebrew && curl -L https://github.com/Homebrew/brew/tarball/master | tar xz --strip 1 -C arm64-homebrew PACKAGES=( icu4c xz lz4 zstd zlib snappy boost ) for PACKAGE in "${PACKAGES[@]}" do - response=$(arm64-homebrew/bin/brew fetch --force --bottle-tag=arm64_ventura $PACKAGE | grep Downloaded ) + response=$(arm64-homebrew/bin/brew fetch --force --bottle-tag=arm64_monterey $PACKAGE | grep Downloaded ) download_path=$(echo $response | xargs -n 1 | tail -1) arm64-homebrew/bin/brew reinstall -vd $download_path done From cd8bdb932661918b62241db75460c0243e344d9b Mon Sep 17 00:00:00 2001 From: Hendrik Muhs Date: Mon, 21 Oct 2024 23:02:29 +0200 Subject: [PATCH 21/27] update path filter --- .github/workflows/python-dockerimages-cibuildwheel.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/python-dockerimages-cibuildwheel.yml b/.github/workflows/python-dockerimages-cibuildwheel.yml index a394c2b06..f4d18dade 100644 --- a/.github/workflows/python-dockerimages-cibuildwheel.yml +++ b/.github/workflows/python-dockerimages-cibuildwheel.yml @@ -5,10 +5,12 @@ on: branches: [ master, release-* ] paths: - 'docker/*/Dockerfile' + - '.github/workflows/python-dockerimages-cibuildwheel.yml' pull_request: branches: [ master ] - #paths: - #- 'docker/*/Dockerfile' + paths: + - 'docker/*/Dockerfile' + - '.github/workflows/python-dockerimages-cibuildwheel.yml' workflow_dispatch: jobs: From ef1728e1e7059630372e683776091d7ac994cb7c Mon Sep 17 00:00:00 2001 From: Hendrik Muhs Date: Tue, 22 Oct 2024 07:32:14 +0200 Subject: [PATCH 22/27] log download --- .github/workflows/python-cibuildwheel.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/python-cibuildwheel.yml b/.github/workflows/python-cibuildwheel.yml index e978498e6..66535329e 100644 --- a/.github/workflows/python-cibuildwheel.yml +++ b/.github/workflows/python-cibuildwheel.yml @@ -97,8 +97,10 @@ jobs: PACKAGES=( icu4c xz lz4 zstd zlib snappy boost ) for PACKAGE in "${PACKAGES[@]}" do + echo "download cross-compiled package: $PACKAGE" response=$(arm64-homebrew/bin/brew fetch --force --bottle-tag=arm64_monterey $PACKAGE | grep Downloaded ) download_path=$(echo $response | xargs -n 1 | tail -1) + echo "download response: $response / download path: $download_path" arm64-homebrew/bin/brew reinstall -vd $download_path done arm64-homebrew/bin/brew config From 7735c48501366c1e34db2dfaf50ff0af0acd6e45 Mon Sep 17 00:00:00 2001 From: Hendrik Muhs Date: Tue, 22 Oct 2024 07:44:29 +0200 Subject: [PATCH 23/27] debug brew --- .github/workflows/python-cibuildwheel.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/python-cibuildwheel.yml b/.github/workflows/python-cibuildwheel.yml index 66535329e..fa5b74a85 100644 --- a/.github/workflows/python-cibuildwheel.yml +++ b/.github/workflows/python-cibuildwheel.yml @@ -94,6 +94,8 @@ jobs: echo "_CMAKE_PREFIX_PATH=${{ github.workspace }}/arm64-homebrew" >> $GITHUB_ENV echo "CIBW_REPAIR_WHEEL_COMMAND_MACOS=DYLD_LIBRARY_PATH=${{ github.workspace }}/arm64-homebrew delocate-wheel --require-archs {delocate_archs} -w {dest_dir} -v {wheel}" >> $GITHUB_ENV mkdir arm64-homebrew && curl -L https://github.com/Homebrew/brew/tarball/master | tar xz --strip 1 -C arm64-homebrew + arm64-homebrew/bin/brew config + arm64-homebrew/bin/brew doctor PACKAGES=( icu4c xz lz4 zstd zlib snappy boost ) for PACKAGE in "${PACKAGES[@]}" do From 20c97106d8d7a731ea6ca8996a793017f4b9319b Mon Sep 17 00:00:00 2001 From: Hendrik Muhs Date: Tue, 22 Oct 2024 08:30:46 +0200 Subject: [PATCH 24/27] revert debug --- .github/workflows/python-cibuildwheel.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/python-cibuildwheel.yml b/.github/workflows/python-cibuildwheel.yml index fa5b74a85..e978498e6 100644 --- a/.github/workflows/python-cibuildwheel.yml +++ b/.github/workflows/python-cibuildwheel.yml @@ -94,15 +94,11 @@ jobs: echo "_CMAKE_PREFIX_PATH=${{ github.workspace }}/arm64-homebrew" >> $GITHUB_ENV echo "CIBW_REPAIR_WHEEL_COMMAND_MACOS=DYLD_LIBRARY_PATH=${{ github.workspace }}/arm64-homebrew delocate-wheel --require-archs {delocate_archs} -w {dest_dir} -v {wheel}" >> $GITHUB_ENV mkdir arm64-homebrew && curl -L https://github.com/Homebrew/brew/tarball/master | tar xz --strip 1 -C arm64-homebrew - arm64-homebrew/bin/brew config - arm64-homebrew/bin/brew doctor PACKAGES=( icu4c xz lz4 zstd zlib snappy boost ) for PACKAGE in "${PACKAGES[@]}" do - echo "download cross-compiled package: $PACKAGE" response=$(arm64-homebrew/bin/brew fetch --force --bottle-tag=arm64_monterey $PACKAGE | grep Downloaded ) download_path=$(echo $response | xargs -n 1 | tail -1) - echo "download response: $response / download path: $download_path" arm64-homebrew/bin/brew reinstall -vd $download_path done arm64-homebrew/bin/brew config From 191c4bf98c266c9ecc24dc8064d48fe32f8871b0 Mon Sep 17 00:00:00 2001 From: Hendrik Muhs Date: Thu, 24 Oct 2024 21:25:47 +0200 Subject: [PATCH 25/27] revert other changes --- cmake_modules/FindSnappy.cmake | 22 +++---- cmake_modules/LibFindMacros.cmake | 103 ++++++++++++++++++++++++++++++ 2 files changed, 113 insertions(+), 12 deletions(-) create mode 100644 cmake_modules/LibFindMacros.cmake diff --git a/cmake_modules/FindSnappy.cmake b/cmake_modules/FindSnappy.cmake index d9537b2b8..18b6f1ca9 100644 --- a/cmake_modules/FindSnappy.cmake +++ b/cmake_modules/FindSnappy.cmake @@ -1,18 +1,16 @@ # Snappy, a fast compressor/decompressor -find_path(Snappy_INCLUDE_DIR NAMES snappy.h) +include(LibFindMacros) -find_library(Snappy_LIBRARY NAMES snappy) - -message("${Snappy_INCLUDE_DIR} -- ${Snappy_LIBRARY}") - -include(SelectLibraryConfigurations) -SELECT_LIBRARY_CONFIGURATIONS(SNAPPY) +find_path(Snappy_INCLUDE_DIR + NAMES snappy.h +) -include(FindPackageHandleStandardArgs) -FIND_PACKAGE_HANDLE_STANDARD_ARGS( - Snappy DEFAULT_MSG - Snappy_LIBRARY Snappy_INCLUDE_DIR +find_library(Snappy_LIBRARY + NAMES snappy ) -mark_as_advanced(Snappy_INCLUDE_DIR Snappy_LIBRARY) \ No newline at end of file +set(Snappy_PROCESS_INCLUDES Snappy_INCLUDE_DIR) +set(Snappy_PROCESS_LIBS Snappy_LIBRARY) + +libfind_process(Snappy) diff --git a/cmake_modules/LibFindMacros.cmake b/cmake_modules/LibFindMacros.cmake new file mode 100644 index 000000000..9c5824f7a --- /dev/null +++ b/cmake_modules/LibFindMacros.cmake @@ -0,0 +1,103 @@ +# Version 1.0 (2013-04-12) +# Public Domain, originally written by Lasse Kärkkäinen +# Published at http://www.cmake.org/Wiki/CMake:How_To_Find_Libraries + +# Works the same as find_package, but forwards the "REQUIRED" and "QUIET" arguments +# used for the current package. For this to work, the first parameter must be the +# prefix of the current package, then the prefix of the new package etc, which are +# passed to find_package. +macro (libfind_package PREFIX) + set (LIBFIND_PACKAGE_ARGS ${ARGN}) + if (${PREFIX}_FIND_QUIETLY) + set (LIBFIND_PACKAGE_ARGS ${LIBFIND_PACKAGE_ARGS} QUIET) + endif (${PREFIX}_FIND_QUIETLY) + if (${PREFIX}_FIND_REQUIRED) + set (LIBFIND_PACKAGE_ARGS ${LIBFIND_PACKAGE_ARGS} REQUIRED) + endif (${PREFIX}_FIND_REQUIRED) + find_package(${LIBFIND_PACKAGE_ARGS}) +endmacro (libfind_package) + +# CMake developers made the UsePkgConfig system deprecated in the same release (2.6) +# where they added pkg_check_modules. Consequently I need to support both in my scripts +# to avoid those deprecated warnings. Here's a helper that does just that. +# Works identically to pkg_check_modules, except that no checks are needed prior to use. +macro (libfind_pkg_check_modules PREFIX PKGNAME) + if (${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} EQUAL 4) + include(UsePkgConfig) + pkgconfig(${PKGNAME} ${PREFIX}_INCLUDE_DIRS ${PREFIX}_LIBRARY_DIRS ${PREFIX}_LDFLAGS ${PREFIX}_CFLAGS) + else (${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} EQUAL 4) + find_package(PkgConfig) + if (PKG_CONFIG_FOUND) + pkg_check_modules(${PREFIX} ${PKGNAME}) + endif (PKG_CONFIG_FOUND) + endif (${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} EQUAL 4) +endmacro (libfind_pkg_check_modules) + +# Do the final processing once the paths have been detected. +# If include dirs are needed, ${PREFIX}_PROCESS_INCLUDES should be set to contain +# all the variables, each of which contain one include directory. +# Ditto for ${PREFIX}_PROCESS_LIBS and library files. +# Will set ${PREFIX}_FOUND, ${PREFIX}_INCLUDE_DIRS and ${PREFIX}_LIBRARIES. +# Also handles errors in case library detection was required, etc. +macro (libfind_process PREFIX) + # Skip processing if already processed during this run + if (NOT ${PREFIX}_FOUND) + # Start with the assumption that the library was found + set (${PREFIX}_FOUND TRUE) + + # Process all includes and set _FOUND to false if any are missing + foreach (i ${${PREFIX}_PROCESS_INCLUDES}) + if (${i}) + set (${PREFIX}_INCLUDE_DIRS ${${PREFIX}_INCLUDE_DIRS} ${${i}}) + mark_as_advanced(${i}) + else (${i}) + set (${PREFIX}_FOUND FALSE) + endif (${i}) + endforeach (i) + + # Process all libraries and set _FOUND to false if any are missing + foreach (i ${${PREFIX}_PROCESS_LIBS}) + if (${i}) + set (${PREFIX}_LIBRARIES ${${PREFIX}_LIBRARIES} ${${i}}) + mark_as_advanced(${i}) + else (${i}) + set (${PREFIX}_FOUND FALSE) + endif (${i}) + endforeach (i) + + # Print message and/or exit on fatal error + if (${PREFIX}_FOUND) + if (NOT ${PREFIX}_FIND_QUIETLY) + message (STATUS "Found ${PREFIX} ${${PREFIX}_VERSION}") + endif (NOT ${PREFIX}_FIND_QUIETLY) + else (${PREFIX}_FOUND) + if (${PREFIX}_FIND_REQUIRED) + foreach (i ${${PREFIX}_PROCESS_INCLUDES} ${${PREFIX}_PROCESS_LIBS}) + message("${i}=${${i}}") + endforeach (i) + message (FATAL_ERROR "Required library ${PREFIX} NOT FOUND.\nInstall the library (dev version) and try again. If the library is already installed, use ccmake to set the missing variables manually.") + endif (${PREFIX}_FIND_REQUIRED) + endif (${PREFIX}_FOUND) + endif (NOT ${PREFIX}_FOUND) +endmacro (libfind_process) + +macro(libfind_library PREFIX basename) + set(TMP "") + if(MSVC80) + set(TMP -vc80) + endif(MSVC80) + if(MSVC90) + set(TMP -vc90) + endif(MSVC90) + set(${PREFIX}_LIBNAMES ${basename}${TMP}) + if(${ARGC} GREATER 2) + set(${PREFIX}_LIBNAMES ${basename}${TMP}-${ARGV2}) + string(REGEX REPLACE "\\." "_" TMP ${${PREFIX}_LIBNAMES}) + set(${PREFIX}_LIBNAMES ${${PREFIX}_LIBNAMES} ${TMP}) + endif(${ARGC} GREATER 2) + find_library(${PREFIX}_LIBRARY + NAMES ${${PREFIX}_LIBNAMES} + PATHS ${${PREFIX}_PKGCONF_LIBRARY_DIRS} + ) +endmacro(libfind_library) + From ba087820d0c2eafecaf407de656becd37de69ff8 Mon Sep 17 00:00:00 2001 From: Hendrik Muhs Date: Thu, 24 Oct 2024 21:27:33 +0200 Subject: [PATCH 26/27] add caching --- .github/workflows/python-dockerimages-cibuildwheel.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/python-dockerimages-cibuildwheel.yml b/.github/workflows/python-dockerimages-cibuildwheel.yml index f4d18dade..c246cecbe 100644 --- a/.github/workflows/python-dockerimages-cibuildwheel.yml +++ b/.github/workflows/python-dockerimages-cibuildwheel.yml @@ -46,7 +46,9 @@ jobs: uses: docker/build-push-action@v6 with: context: docker/manylinux-builder + cache-from: type=gha + cache-to: type=gha,mode=max push: ${{ github.event_name == 'push' }} build-args: | base_image=${{ env.BASE_IMAGE }} - tags: keyvidev/${{ matrix.base_image }}linux-builder-${{ matrix.arch }} \ No newline at end of file + tags: keyvidev/${{ matrix.base_image }}linux-builder-${{ matrix.arch }} From 6c7667bad074fb775183bf1035d2d74c9e527a33 Mon Sep 17 00:00:00 2001 From: Hendrik Muhs Date: Fri, 1 Nov 2024 14:57:35 +0100 Subject: [PATCH 27/27] pin boost and icu --- .github/workflows/python-cibuildwheel.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/python-cibuildwheel.yml b/.github/workflows/python-cibuildwheel.yml index f3c631915..832200f9e 100644 --- a/.github/workflows/python-cibuildwheel.yml +++ b/.github/workflows/python-cibuildwheel.yml @@ -88,7 +88,7 @@ jobs: - name: install mac dependencies arm64 if: ${{ (runner.os == 'macOS') && (matrix.arch == 'arm64') }} - # explicitly install icu4c@75(required by boost), not icu4c which defaults to icu4c@74 + # explicitly install icu4c@76 and boost@1.86, not icu4c/boost to avoid unsupported combinations # Note: when brew reinstall finds unsolved deps, it downloads and installs using the wrong arch(x86_64 instead of arm64) run: | set -e @@ -96,7 +96,7 @@ jobs: echo "_CMAKE_PREFIX_PATH=${{ github.workspace }}/arm64-homebrew" >> $GITHUB_ENV echo "CIBW_REPAIR_WHEEL_COMMAND_MACOS=DYLD_LIBRARY_PATH=${{ github.workspace }}/arm64-homebrew delocate-wheel --require-archs {delocate_archs} -w {dest_dir} -v {wheel}" >> $GITHUB_ENV mkdir arm64-homebrew && curl -L https://github.com/Homebrew/brew/tarball/master | tar xz --strip 1 -C arm64-homebrew - PACKAGES=( icu4c@75 xz lz4 zstd zlib snappy boost ) + PACKAGES=( icu4c@76 xz lz4 zstd zlib snappy boost@1.86 ) for PACKAGE in "${PACKAGES[@]}" do arm64-homebrew/bin/brew info $PACKAGE