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 . \