diff --git a/.env b/.env index 43cfefccee4..1682d1d4746 100644 --- a/.env +++ b/.env @@ -36,7 +36,7 @@ BUILDKIT_INLINE_CACHE=1 # different architecture notations ARCH=amd64 ARCH_ALIAS=x86_64 -ARCH_SHORT_ALIAS=x64 +ARCH_SHORT=amd64 ULIMIT_CORE=-1 REPO=apache/arrow-dev @@ -70,6 +70,11 @@ TZ=UTC # -1 does not attempt to install a devtoolset version, any positive integer will install devtoolset-n DEVTOOLSET_VERSION=-1 -# Used for the manylinux and windows wheels, please update the crossbow configuration on update: +# Used through docker-compose.yml and serves as the default version for the +# ci/scripts/install_vcpkg.sh script. Prefer to use short SHAs to keep the +# docker tags more readable. +# +# Please also update the crossbow configuration in order to keep the github +# actions cache up to date for the macOS wheels: # https://github.com/ursacomputing/crossbow/blob/master/.github/workflows/cache_vcpkg.yml -VCPKG="2021.04.30" +VCPKG="30465138e" diff --git a/ci/docker/python-wheel-manylinux-201x.dockerfile b/ci/docker/python-wheel-manylinux-201x.dockerfile index ae1b0a7767c..dee2b1244b1 100644 --- a/ci/docker/python-wheel-manylinux-201x.dockerfile +++ b/ci/docker/python-wheel-manylinux-201x.dockerfile @@ -18,56 +18,54 @@ ARG base FROM ${base} -ARG arch_alias -ARG arch_short_alias +ARG arch +ARG arch_short +ARG manylinux +ENV MANYLINUX_VERSION=${manylinux} + +# Install basic dependencies RUN yum install -y git flex curl autoconf zip wget # Install CMake -ARG cmake=3.19.3 -RUN wget -q https://github.com/Kitware/CMake/releases/download/v${cmake}/cmake-${cmake}-Linux-${arch_alias}.tar.gz -O - | \ - tar -xzf - --directory /usr/local --strip-components=1 +# AWS SDK doesn't work with CMake=3.22 due to https://gitlab.kitware.com/cmake/cmake/-/issues/22524 +ARG cmake=3.21.4 +COPY ci/scripts/install_cmake.sh arrow/ci/scripts/ +RUN /arrow/ci/scripts/install_cmake.sh ${arch} linux ${cmake} /usr/local # Install Ninja ARG ninja=1.10.2 -RUN mkdir /tmp/ninja && \ - wget -q https://github.com/ninja-build/ninja/archive/v${ninja}.tar.gz -O - | \ - tar -xzf - --directory /tmp/ninja --strip-components=1 && \ - cd /tmp/ninja && \ - ./configure.py --bootstrap && \ - mv ninja /usr/local/bin && \ - rm -rf /tmp/ninja +COPY ci/scripts/install_ninja.sh arrow/ci/scripts/ +RUN /arrow/ci/scripts/install_ninja.sh ${ninja} /usr/local # Install ccache ARG ccache=4.1 -RUN mkdir /tmp/ccache && \ - wget -q https://github.com/ccache/ccache/archive/v${ccache}.tar.gz -O - | \ - tar -xzf - --directory /tmp/ccache --strip-components=1 && \ - cd /tmp/ccache && \ - mkdir build && \ - cd build && \ - cmake -GNinja -DCMAKE_BUILD_TYPE=Release -DZSTD_FROM_INTERNET=ON .. && \ - ninja install && \ - rm -rf /tmp/ccache +COPY ci/scripts/install_ccache.sh arrow/ci/scripts/ +RUN /arrow/ci/scripts/install_ccache.sh ${ccache} /usr/local -# Install vcpkg +# Install vcpkg and in case of manylinux2010 install a more recent glibc>2.15 +# for the prebuilt vcpkg binary ARG vcpkg -RUN git clone https://github.com/microsoft/vcpkg /opt/vcpkg && \ - git -C /opt/vcpkg checkout ${vcpkg} && \ - /opt/vcpkg/bootstrap-vcpkg.sh -useSystemBinaries -disableMetrics && \ - ln -s /opt/vcpkg/vcpkg /usr/bin/vcpkg - -# Patch ports files as needed +ARG glibc=2.18 COPY ci/vcpkg/*.patch \ ci/vcpkg/*linux*.cmake \ arrow/ci/vcpkg/ -RUN cd /opt/vcpkg && git apply --ignore-whitespace /arrow/ci/vcpkg/ports.patch +COPY ci/scripts/install_vcpkg.sh \ + ci/scripts/install_glibc.sh \ + arrow/ci/scripts/ +RUN arrow/ci/scripts/install_vcpkg.sh /opt/vcpkg ${vcpkg} && \ + if [ "${manylinux}" == "2010" ]; then \ + arrow/ci/scripts/install_glibc.sh ${glibc} /opt/glibc-${glibc} && \ + patchelf --set-interpreter /opt/glibc-2.18/lib/ld-linux-x86-64.so.2 /opt/vcpkg/vcpkg && \ + patchelf --set-rpath /opt/glibc-2.18/lib:/usr/lib64 /opt/vcpkg/vcpkg; \ + fi +ENV PATH="/opt/vcpkg:${PATH}" ARG build_type=release ENV CMAKE_BUILD_TYPE=${build_type} \ VCPKG_FORCE_SYSTEM_BINARIES=1 \ VCPKG_OVERLAY_TRIPLETS=/arrow/ci/vcpkg \ - VCPKG_DEFAULT_TRIPLET=${arch_short_alias}-linux-static-${build_type} \ + VCPKG_DEFAULT_TRIPLET=${arch_short}-linux-static-${build_type} \ VCPKG_FEATURE_FLAGS=-manifests # Need to install the boost-build prior installing the boost packages, otherwise @@ -75,8 +73,6 @@ ENV CMAKE_BUILD_TYPE=${build_type} \ # TODO(kszucs): factor out the package enumeration to a text file and reuse it # from the windows image and potentially in a future macos wheel build RUN vcpkg install --clean-after-build \ - boost-build:${arch_short_alias}-linux && \ - vcpkg install --clean-after-build \ abseil \ aws-sdk-cpp[config,cognito-identity,core,identity-management,s3,sts,transfer] \ boost-filesystem \ @@ -87,6 +83,7 @@ RUN vcpkg install --clean-after-build \ flatbuffers \ gflags \ glog \ + google-cloud-cpp[core,storage] \ grpc \ lz4 \ openssl \ diff --git a/ci/docker/python-wheel-windows-vs2017.dockerfile b/ci/docker/python-wheel-windows-vs2017.dockerfile index 9a2afb781fa..e7ff011629b 100644 --- a/ci/docker/python-wheel-windows-vs2017.dockerfile +++ b/ci/docker/python-wheel-windows-vs2017.dockerfile @@ -17,7 +17,7 @@ # based on mcr.microsoft.com/windows/servercore:ltsc2019 # contains choco and vs2017 preinstalled -FROM abrarov/msvc-2017:2.10.0 +FROM abrarov/msvc-2017:2.12.1 # Install CMake and Ninja RUN choco install --no-progress -r -y cmake --installargs 'ADD_CMAKE_TO_PATH=System' && \ @@ -31,16 +31,12 @@ RUN setx path "%path%;C:\Program Files\Git\usr\bin" # Compiling vcpkg itself from a git tag doesn't work anymore since vcpkg has # started to ship precompiled binaries for the vcpkg-tool. ARG vcpkg -RUN git clone https://github.com/Microsoft/vcpkg && \ - vcpkg\bootstrap-vcpkg.bat -disableMetrics && \ - setx PATH "%PATH%;C:\vcpkg" && \ - git -C vcpkg checkout %vcpkg% - -# Patch ports files as needed COPY ci/vcpkg/*.patch \ ci/vcpkg/*windows*.cmake \ arrow/ci/vcpkg/ -RUN cd vcpkg && git apply --ignore-whitespace C:/arrow/ci/vcpkg/ports.patch +COPY ci/scripts/install_vcpkg.sh arrow/ci/scripts/ +RUN bash arrow/ci/scripts/install_vcpkg.sh /c/vcpkg %vcpkg% && \ + setx PATH "%PATH%;C:\vcpkg" # Configure vcpkg and install dependencies # NOTE: use windows batch environment notation for build arguments in RUN @@ -50,7 +46,7 @@ RUN cd vcpkg && git apply --ignore-whitespace C:/arrow/ci/vcpkg/ports.patch ARG build_type=release ENV CMAKE_BUILD_TYPE=${build_type} \ VCPKG_OVERLAY_TRIPLETS=C:\\arrow\\ci\\vcpkg \ - VCPKG_DEFAULT_TRIPLET=x64-windows-static-md-${build_type} \ + VCPKG_DEFAULT_TRIPLET=amd64-windows-static-md-${build_type} \ VCPKG_FEATURE_FLAGS=-manifests RUN vcpkg install --clean-after-build \ @@ -66,6 +62,7 @@ RUN vcpkg install --clean-after-build \ flatbuffers \ gflags \ glog \ + google-cloud-cpp[core,storage] \ grpc \ lz4 \ openssl \ diff --git a/ci/scripts/install_ccache.sh b/ci/scripts/install_ccache.sh new file mode 100755 index 00000000000..8c64fe56c41 --- /dev/null +++ b/ci/scripts/install_ccache.sh @@ -0,0 +1,45 @@ +#!/usr/bin/env bash +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +set -e + +if [ "$#" -ne 2 ]; then + echo "Usage: $0 " + exit 1 +fi + +version=$1 +prefix=$2 +url="https://github.com/ccache/ccache/archive/v${version}.tar.gz" + +mkdir /tmp/ccache +wget -q ${url} -O - | tar -xzf - --directory /tmp/ccache --strip-components=1 + +mkdir /tmp/ccache/build +pushd /tmp/ccache/build +cmake \ + -GNinja \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_PREFIX=${prefix} \ + -DZSTD_FROM_INTERNET=ON \ + .. +ninja install +popd + +rm -rf /tmp/ccache diff --git a/ci/scripts/install_cmake.sh b/ci/scripts/install_cmake.sh new file mode 100755 index 00000000000..2f5e5d52051 --- /dev/null +++ b/ci/scripts/install_cmake.sh @@ -0,0 +1,42 @@ +#!/usr/bin/env bash +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +set -e + +declare -A archs +archs=([amd64]=x86_64 + [arm64v8]=aarch64) + +declare -A platforms +platforms=([linux]=linux + [macos]=macos + [windows]=windows) + +if [ "$#" -ne 4 ]; then + echo "Usage: $0 " + exit 1 +fi + +arch=${archs[$1]} +platform=${platforms[$2]} +version=$3 +prefix=$4 + +url="https://github.com/Kitware/CMake/releases/download/v${version}/cmake-${version}-${platform}-${arch}.tar.gz" +wget -q ${url} -O - | tar -xzf - --directory ${prefix} --strip-components=1 diff --git a/ci/scripts/install_glibc.sh b/ci/scripts/install_glibc.sh new file mode 100755 index 00000000000..d1a49818178 --- /dev/null +++ b/ci/scripts/install_glibc.sh @@ -0,0 +1,42 @@ +#!/usr/bin/env bash +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +set -e + +if [ "$#" -ne 2 ]; then + echo "Usage: $0 " + exit 1 +fi + +version=$1 +prefix=$2 + +url="http://ftp.gnu.org/gnu/glibc/glibc-${version}.tar.gz" + +mkdir /tmp/glibc +wget -q ${url} -O - | tar -xzf - --directory /tmp/glibc --strip-components=1 + +mkdir /tmp/glibc/build +pushd /tmp/glibc/build +../configure --prefix=${prefix} +make -j$(nproc) +make install +popd + +rm -rf /tmp/glibc diff --git a/ci/scripts/install_ninja.sh b/ci/scripts/install_ninja.sh new file mode 100755 index 00000000000..0440d563fb1 --- /dev/null +++ b/ci/scripts/install_ninja.sh @@ -0,0 +1,40 @@ +#!/usr/bin/env bash +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +set -e + +if [ "$#" -ne 2 ]; then + echo "Usage: $0 " + exit 1 +fi + +version=$1 +prefix=$2 + +url="https://github.com/ninja-build/ninja/archive/v${version}.tar.gz" + +mkdir /tmp/ninja +wget -q ${url} -O - | tar -xzf - --directory /tmp/ninja --strip-components=1 + +pushd /tmp/ninja +./configure.py --bootstrap +mv ninja ${prefix}/bin +popd + +rm -rf /tmp/ninja diff --git a/ci/scripts/install_vcpkg.sh b/ci/scripts/install_vcpkg.sh index fe99a7fea2f..cc80582326e 100755 --- a/ci/scripts/install_vcpkg.sh +++ b/ci/scripts/install_vcpkg.sh @@ -19,21 +19,35 @@ set -e -if [ "$#" -ne 2 ]; then - echo "Usage: $0 " +if [ "$#" -lt 1 ]; then + echo "Usage: $0 `` [ []]" exit 1 fi -vcpkg_version=$1 -vcpkg_destination=$2 -vcpkg_patch=$(realpath $(dirname "${0}")/../vcpkg/ports.patch) +arrow_dir=$(cd -- "$(dirname -- "$0")/../.." && pwd -P) +default_vcpkg_version=$(cat "${arrow_dir}/.env" | grep "VCPKG" | cut -d "=" -f2 | tr -d '"') +default_vcpkg_ports_patch="${arrow_dir}/ci/vcpkg/ports.patch" -git clone --depth 1 --branch ${vcpkg_version} https://github.com/microsoft/vcpkg ${vcpkg_destination} +vcpkg_destination=$1 +vcpkg_version=${2:-$default_vcpkg_version} +vcpkg_ports_patch=${3:-$default_vcpkg_ports_patch} + +# reduce the fetched data using a shallow clone +git clone --shallow-since=2021-04-01 https://github.com/microsoft/vcpkg ${vcpkg_destination} pushd ${vcpkg_destination} -./bootstrap-vcpkg.sh -useSystemBinaries -disableMetrics -git apply --ignore-whitespace ${vcpkg_patch} -echo "Patch successfully applied!" +git checkout "${vcpkg_version}" + +if [[ "$OSTYPE" == "msys" ]]; then + ./bootstrap-vcpkg.bat -disableMetrics +else + ./bootstrap-vcpkg.sh -disableMetrics +fi + +if [ -f "${vcpkg_ports_patch}" ]; then + git apply --verbose --ignore-whitespace ${vcpkg_ports_patch} + echo "Patch successfully applied to the VCPKG port files!" +fi popd diff --git a/ci/scripts/python_wheel_macos_build.sh b/ci/scripts/python_wheel_macos_build.sh index 1a52a2ad52b..4689a251aa0 100755 --- a/ci/scripts/python_wheel_macos_build.sh +++ b/ci/scripts/python_wheel_macos_build.sh @@ -64,6 +64,7 @@ echo "=== (${PYTHON_VERSION}) Building Arrow C++ libraries ===" : ${ARROW_DATASET:=ON} : ${ARROW_FLIGHT:=ON} : ${ARROW_GANDIVA:=OFF} +: ${ARROW_GCS:=OFF} : ${ARROW_HDFS:=ON} : ${ARROW_JEMALLOC:=ON} : ${ARROW_MIMALLOC:=ON} @@ -99,6 +100,7 @@ cmake \ -DARROW_DEPENDENCY_USE_SHARED=OFF \ -DARROW_FLIGHT=${ARROW_FLIGHT} \ -DARROW_GANDIVA=${ARROW_GANDIVA} \ + -DARROW_GCS=${ARROW_GCS} \ -DARROW_HDFS=${ARROW_HDFS} \ -DARROW_JEMALLOC=${ARROW_JEMALLOC} \ -DARROW_MIMALLOC=${ARROW_MIMALLOC} \ diff --git a/ci/scripts/python_wheel_manylinux_build.sh b/ci/scripts/python_wheel_manylinux_build.sh index 434605cf202..6b467ffc046 100755 --- a/ci/scripts/python_wheel_manylinux_build.sh +++ b/ci/scripts/python_wheel_manylinux_build.sh @@ -51,6 +51,7 @@ echo "=== (${PYTHON_VERSION}) Building Arrow C++ libraries ===" : ${ARROW_DATASET:=ON} : ${ARROW_FLIGHT:=ON} : ${ARROW_GANDIVA:=OFF} +: ${ARROW_GCS:=OFF} : ${ARROW_HDFS:=ON} : ${ARROW_JEMALLOC:=ON} : ${ARROW_MIMALLOC:=ON} @@ -88,8 +89,9 @@ cmake \ -DARROW_DATASET=${ARROW_DATASET} \ -DARROW_DEPENDENCY_SOURCE="VCPKG" \ -DARROW_DEPENDENCY_USE_SHARED=OFF \ - -DARROW_FLIGHT==${ARROW_FLIGHT} \ + -DARROW_FLIGHT=${ARROW_FLIGHT} \ -DARROW_GANDIVA=${ARROW_GANDIVA} \ + -DARROW_GCS=${ARROW_GCS} \ -DARROW_HDFS=${ARROW_HDFS} \ -DARROW_JEMALLOC=${ARROW_JEMALLOC} \ -DARROW_MIMALLOC=${ARROW_MIMALLOC} \ diff --git a/ci/vcpkg/x64-linux-static-debug.cmake b/ci/vcpkg/amd64-linux-static-debug.cmake similarity index 100% rename from ci/vcpkg/x64-linux-static-debug.cmake rename to ci/vcpkg/amd64-linux-static-debug.cmake diff --git a/ci/vcpkg/x64-linux-static-release.cmake b/ci/vcpkg/amd64-linux-static-release.cmake similarity index 100% rename from ci/vcpkg/x64-linux-static-release.cmake rename to ci/vcpkg/amd64-linux-static-release.cmake diff --git a/ci/vcpkg/x64-osx-static-debug.cmake b/ci/vcpkg/amd64-osx-static-debug.cmake similarity index 100% rename from ci/vcpkg/x64-osx-static-debug.cmake rename to ci/vcpkg/amd64-osx-static-debug.cmake diff --git a/ci/vcpkg/x64-osx-static-release.cmake b/ci/vcpkg/amd64-osx-static-release.cmake similarity index 100% rename from ci/vcpkg/x64-osx-static-release.cmake rename to ci/vcpkg/amd64-osx-static-release.cmake diff --git a/ci/vcpkg/x64-windows-static-md-debug.cmake b/ci/vcpkg/amd64-windows-static-md-debug.cmake similarity index 100% rename from ci/vcpkg/x64-windows-static-md-debug.cmake rename to ci/vcpkg/amd64-windows-static-md-debug.cmake diff --git a/ci/vcpkg/x64-windows-static-md-release.cmake b/ci/vcpkg/amd64-windows-static-md-release.cmake similarity index 100% rename from ci/vcpkg/x64-windows-static-md-release.cmake rename to ci/vcpkg/amd64-windows-static-md-release.cmake diff --git a/ci/vcpkg/ports.patch b/ci/vcpkg/ports.patch index 7bcba49c194..940722abb2e 100644 --- a/ci/vcpkg/ports.patch +++ b/ci/vcpkg/ports.patch @@ -1,63 +1,245 @@ -diff --git a/ports/aws-c-common/portfile.cmake b/ports/aws-c-common/portfile.cmake -index f3704ef05b..3af543058d 100644 ---- a/ports/aws-c-common/portfile.cmake -+++ b/ports/aws-c-common/portfile.cmake -@@ -1,8 +1,8 @@ - vcpkg_from_github( - OUT_SOURCE_PATH SOURCE_PATH - REPO awslabs/aws-c-common -- REF 4a21a1c0757083a16497fea27886f5f20ccdf334 # v0.4.56 -- SHA512 68898a8ac15d5490f45676eabfbe0df9e45370a74c543a28909fd0d85fed48dfcf4bcd6ea2d01d1a036dd352e2e4e0b08c48c63ab2a2b477fe150b46a827136e -+ REF 13adef72b7813ec878817c6d50a7a3f241015d8a # v0.4.57 -+ SHA512 28256522ac6af544d7464e3e7dcd4dc802ae2b09728bf8f167f86a6487bb756d0cad5eb4a2480610b2967b9c24c4a7f70621894517aa2828ffdeb0479453803b - HEAD_REF master - PATCHES - disable-error-4068.patch # This patch fixes dependency port compilation failure +diff --git a/ports/aws-c-auth/vcpkg.json b/ports/aws-c-auth/vcpkg.json +index dc8f75e8..be703324 100644 +--- a/ports/aws-c-auth/vcpkg.json ++++ b/ports/aws-c-auth/vcpkg.json +@@ -4,7 +4,7 @@ + "port-version": 1, + "description": "C99 library implementation of AWS client-side authentication: standard credentials providers and signing.", + "homepage": "https://github.com/awslabs/aws-c-auth", +- "supports": "!arm & !uwp", ++ "supports": "!uwp", + "dependencies": [ + "aws-c-common", + "aws-c-http", +diff --git a/ports/aws-c-cal/vcpkg.json b/ports/aws-c-cal/vcpkg.json +index 48c7406c..40e284dd 100644 +--- a/ports/aws-c-cal/vcpkg.json ++++ b/ports/aws-c-cal/vcpkg.json +@@ -4,7 +4,7 @@ + "port-version": 1, + "description": "C99 wrapper for cryptography primitives.", + "homepage": "https://github.com/awslabs/aws-c-cal", +- "supports": "!arm & !uwp", ++ "supports": "!uwp", + "dependencies": [ + "aws-c-common", + { +diff --git a/ports/aws-c-common/vcpkg.json b/ports/aws-c-common/vcpkg.json +index 67d58320..3c8e96f7 100644 +--- a/ports/aws-c-common/vcpkg.json ++++ b/ports/aws-c-common/vcpkg.json +@@ -4,7 +4,7 @@ + "port-version": 1, + "description": "AWS common library for C", + "homepage": "https://github.com/awslabs/aws-c-common", +- "supports": "!arm & !uwp", ++ "supports": "!uwp", + "dependencies": [ + "openssl", + { +diff --git a/ports/aws-c-compression/vcpkg.json b/ports/aws-c-compression/vcpkg.json +index 8b62d038..7aa75eda 100644 +--- a/ports/aws-c-compression/vcpkg.json ++++ b/ports/aws-c-compression/vcpkg.json +@@ -4,7 +4,7 @@ + "port-version": 1, + "description": "C99 implementation of huffman encoding/decoding", + "homepage": "https://github.com/awslabs/aws-c-compression", +- "supports": "!arm & !uwp", ++ "supports": "!uwp", + "dependencies": [ + "aws-c-common", + { +diff --git a/ports/aws-c-event-stream/vcpkg.json b/ports/aws-c-event-stream/vcpkg.json +index 7018ea0b..df3f85af 100644 +--- a/ports/aws-c-event-stream/vcpkg.json ++++ b/ports/aws-c-event-stream/vcpkg.json +@@ -4,7 +4,7 @@ + "port-version": 1, + "description": "C99 implementation of the vnd.amazon.event-stream content-type.", + "homepage": "https://github.com/awslabs/aws-c-event-stream", +- "supports": "!arm & !uwp", ++ "supports": "!uwp", + "dependencies": [ + "aws-c-cal", + "aws-c-common", +diff --git a/ports/aws-c-http/vcpkg.json b/ports/aws-c-http/vcpkg.json +index f7cf6547..20ee8be7 100644 +--- a/ports/aws-c-http/vcpkg.json ++++ b/ports/aws-c-http/vcpkg.json +@@ -4,7 +4,7 @@ + "port-version": 1, + "description": "C99 implementation of the HTTP/1.1 and HTTP/2 specifications", + "homepage": "https://github.com/awslabs/aws-c-http", +- "supports": "!arm & !uwp", ++ "supports": "!uwp", + "dependencies": [ + "aws-c-cal", + "aws-c-common", +diff --git a/ports/aws-c-io/vcpkg.json b/ports/aws-c-io/vcpkg.json +index 60a1fb93..b695deb5 100644 +--- a/ports/aws-c-io/vcpkg.json ++++ b/ports/aws-c-io/vcpkg.json +@@ -4,7 +4,7 @@ + "port-version": 1, + "description": "Handles all IO and TLS work for application protocols.", + "homepage": "https://github.com/awslabs/aws-c-io", +- "supports": "!arm & !uwp", ++ "supports": "!uwp", + "dependencies": [ + "aws-c-cal", + "aws-c-common", +diff --git a/ports/aws-c-mqtt/vcpkg.json b/ports/aws-c-mqtt/vcpkg.json +index de7e464e..3f459a79 100644 +--- a/ports/aws-c-mqtt/vcpkg.json ++++ b/ports/aws-c-mqtt/vcpkg.json +@@ -4,7 +4,7 @@ + "port-version": 1, + "description": "C99 implementation of the MQTT 3.1.1 specification.", + "homepage": "https://github.com/awslabs/aws-c-mqtt", +- "supports": "!arm & !uwp", ++ "supports": "!uwp", + "dependencies": [ + { + "name": "s2n", +diff --git a/ports/aws-c-s3/vcpkg.json b/ports/aws-c-s3/vcpkg.json +index 31dba925..902c07f9 100644 +--- a/ports/aws-c-s3/vcpkg.json ++++ b/ports/aws-c-s3/vcpkg.json +@@ -4,7 +4,7 @@ + "port-version": 1, + "description": "C99 library implementation for communicating with the S3 service, designed for maximizing throughput on high bandwidth EC2 instances.", + "homepage": "https://github.com/awslabs/aws-c-s3", +- "supports": "!arm & !uwp", ++ "supports": "!uwp", + "dependencies": [ + "aws-c-auth", + "aws-c-cal", +diff --git a/ports/aws-checksums/vcpkg.json b/ports/aws-checksums/vcpkg.json +index 3cdea453..1cbed512 100644 +--- a/ports/aws-checksums/vcpkg.json ++++ b/ports/aws-checksums/vcpkg.json +@@ -4,7 +4,6 @@ + "port-version": 2, + "description": "Cross-Platform HW accelerated CRC32c and CRC32 with fallback to efficient SW implementations.", + "homepage": "https://github.com/awslabs/aws-checksums", +- "supports": "!arm", + "dependencies": [ + "aws-c-common", + { +diff --git a/ports/aws-crt-cpp/vcpkg.json b/ports/aws-crt-cpp/vcpkg.json +index 3b8cfafd..38c37ec9 100644 +--- a/ports/aws-crt-cpp/vcpkg.json ++++ b/ports/aws-crt-cpp/vcpkg.json +@@ -4,7 +4,7 @@ + "port-version": 2, + "description": "Cross-Platform HW accelerated CRC32c and CRC32 with fallback to efficient SW implementations.", + "homepage": "https://github.com/awslabs/aws-crt-cpp", +- "supports": "!arm & !uwp", ++ "supports": "!uwp", + "dependencies": [ + "aws-c-auth", + "aws-c-cal", +diff --git a/ports/aws-sdk-cpp/fix-find-crypto.patch b/ports/aws-sdk-cpp/fix-find-crypto.patch +new file mode 100644 +index 00000000..4566cc66 +--- /dev/null ++++ b/ports/aws-sdk-cpp/fix-find-crypto.patch +@@ -0,0 +1,20 @@ ++diff --git a/cmake/setup_cmake_find_module.cmake b/cmake/setup_cmake_find_module.cmake ++index f5f147a0f..4561b8c39 100644 ++--- a/cmake/setup_cmake_find_module.cmake +++++ b/cmake/setup_cmake_find_module.cmake ++@@ -30,15 +30,6 @@ file(WRITE ++ "set(AWSSDK_INSTALL_BINDIR ${BINARY_DIRECTORY})\n" ++ "set(AWSSDK_INSTALL_INCLUDEDIR ${INCLUDE_DIRECTORY})\n" ++ "set(AWSSDK_INSTALL_ARCHIVEDIR ${ARCHIVE_DIRECTORY})\n" ++- "if (NOT LibCrypto_INCLUDE_DIR)\n" ++- " set(LibCrypto_INCLUDE_DIR ${OPENSSL_INCLUDE_DIR} CACHE INTERNAL \"The OpenSSL include directory\")\n" ++- "endif()\n" ++- "if (NOT LibCrypto_STATIC_LIBRARY)\n" ++- " set(LibCrypto_STATIC_LIBRARY ${OPENSSL_CRYPTO_LIBRARY} CACHE INTERNAL \"The OpenSSL crypto static library\")\n" ++- "endif()\n" ++- "if (NOT LibCrypto_SHARED_LIBRARY)\n" ++- " set(LibCrypto_SHARED_LIBRARY ${OPENSSL_CRYPTO_LIBRARY} CACHE INTERNAL \"The OpenSSL crypto shared library\")\n" ++- "endif()\n" ++ ) ++ ++ if (NOT SIMPLE_INSTALL) +diff --git a/ports/aws-sdk-cpp/portfile.cmake b/ports/aws-sdk-cpp/portfile.cmake +index 2d6bba4d..0ac47887 100644 +--- a/ports/aws-sdk-cpp/portfile.cmake ++++ b/ports/aws-sdk-cpp/portfile.cmake +@@ -8,6 +8,7 @@ vcpkg_from_github( + PATCHES + patch-relocatable-rpath.patch + fix-aws-root.patch ++ fix-find-crypto.patch + ) + + string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "dynamic" FORCE_SHARED_CRT) +diff --git a/ports/aws-sdk-cpp/vcpkg.json b/ports/aws-sdk-cpp/vcpkg.json +index 3836e2b6..cd88ef07 100644 +--- a/ports/aws-sdk-cpp/vcpkg.json ++++ b/ports/aws-sdk-cpp/vcpkg.json +@@ -5,7 +5,7 @@ + "port-version": 5, + "description": "AWS SDK for C++", + "homepage": "https://github.com/aws/aws-sdk-cpp", +- "supports": "!arm & !uwp", ++ "supports": "!uwp", + "dependencies": [ + "aws-crt-cpp", + { diff --git a/ports/curl/portfile.cmake b/ports/curl/portfile.cmake -index be66d452be..a5ce325e9d 100644 +index ce8b7570..8255ba24 100644 --- a/ports/curl/portfile.cmake +++ b/ports/curl/portfile.cmake -@@ -94,6 +94,8 @@ vcpkg_configure_cmake( +@@ -92,6 +92,10 @@ vcpkg_cmake_configure( -DCMAKE_DISABLE_FIND_PACKAGE_Perl=ON -DENABLE_DEBUG=ON -DCURL_CA_FALLBACK=ON + -DCURL_CA_PATH=none + -DCURL_CA_BUNDLE=none - OPTIONS_DEBUG - ${EXTRA_ARGS_DEBUG} ++ OPTIONS_DEBUG ++ ${EXTRA_ARGS_DEBUG} OPTIONS_RELEASE + ${OPTIONS_RELEASE} + OPTIONS_DEBUG diff --git a/ports/snappy/portfile.cmake b/ports/snappy/portfile.cmake -index 75dd133027..84345c7caa 100644 +index 45b8c706..b409d8a7 100644 --- a/ports/snappy/portfile.cmake +++ b/ports/snappy/portfile.cmake @@ -4,6 +4,7 @@ vcpkg_from_github( - REF 537f4ad6240e586970fe554614542e9717df7902 # 1.1.8 - SHA512 555d3b69a6759592736cbaae8f41654f0cf14e8be693b5dde37640191e53daec189f895872557b173e905d10681ef502f3e6ed8566811add963ffef96ce4016d + REF 1.1.9 + SHA512 f1f8a90f5f7f23310423574b1d8c9acb84c66ea620f3999d1060395205e5760883476837aba02f0aa913af60819e34c625d8308c18a5d7a9c4e190f35968b024 HEAD_REF master + PATCHES "snappy-disable-bmi.patch" ) - - vcpkg_configure_cmake( + + vcpkg_cmake_configure( diff --git a/ports/snappy/snappy-disable-bmi.patch b/ports/snappy/snappy-disable-bmi.patch new file mode 100644 -index 0000000000..2cbb1533a8 +index 00000000..a57ce0c2 --- /dev/null +++ b/ports/snappy/snappy-disable-bmi.patch -@@ -0,0 +1,17 @@ -+--- snappy.cc 2020-06-27 17:38:49.718993748 -0500 -++++ snappy.cc 2020-06-27 17:37:57.543268213 -0500 -+@@ -717,14 +717,10 @@ -+ static inline uint32 ExtractLowBytes(uint32 v, int n) { +@@ -0,0 +1,19 @@ ++diff --git a/snappy.cc b/snappy.cc ++index 79dc0e8..f3153ea 100644 ++--- a/snappy.cc +++++ b/snappy.cc ++@@ -965,14 +965,10 @@ static inline void Report(const char *algorithm, size_t compressed_size, ++ static inline uint32_t ExtractLowBytes(uint32_t v, int n) { + assert(n >= 0); + assert(n <= 4); +-#if SNAPPY_HAVE_BMI2 +- return _bzhi_u32(v, 8 * n); +-#else -+ // This needs to be wider than uint32 otherwise `mask << 32` will be ++ // This needs to be wider than uint32_t otherwise `mask << 32` will be + // undefined. -+ uint64 mask = 0xffffffff; ++ uint64_t mask = 0xffffffff; + return v & ~(mask << (8 * n)); +-#endif + } -+ -+ static inline bool LeftShiftOverflows(uint8 value, uint32 shift) { ++ ++ static inline bool LeftShiftOverflows(uint8_t value, uint32_t shift) { diff --git a/ci/vcpkg/universal2-osx-static-debug.cmake b/ci/vcpkg/universal2-osx-static-debug.cmake index 706ac47a72c..29e4b0e63c5 100644 --- a/ci/vcpkg/universal2-osx-static-debug.cmake +++ b/ci/vcpkg/universal2-osx-static-debug.cmake @@ -20,7 +20,7 @@ set(VCPKG_CRT_LINKAGE dynamic) set(VCPKG_LIBRARY_LINKAGE static) set(VCPKG_CMAKE_SYSTEM_NAME Darwin) -set(VCPKG_OSX_ARCHITECTURES "x86_64\;arm64") +set(VCPKG_OSX_ARCHITECTURES "x86_64;arm64") set(VCPKG_OSX_DEPLOYMENT_TARGET "10.13") set(VCPKG_BUILD_TYPE debug) diff --git a/ci/vcpkg/universal2-osx-static-release.cmake b/ci/vcpkg/universal2-osx-static-release.cmake index 8670690171e..8111169fab2 100644 --- a/ci/vcpkg/universal2-osx-static-release.cmake +++ b/ci/vcpkg/universal2-osx-static-release.cmake @@ -20,7 +20,7 @@ set(VCPKG_CRT_LINKAGE dynamic) set(VCPKG_LIBRARY_LINKAGE static) set(VCPKG_CMAKE_SYSTEM_NAME Darwin) -set(VCPKG_OSX_ARCHITECTURES "x86_64\;arm64") +set(VCPKG_OSX_ARCHITECTURES "x86_64;arm64") set(VCPKG_OSX_DEPLOYMENT_TARGET "10.13") set(VCPKG_BUILD_TYPE release) diff --git a/cpp/vcpkg.json b/cpp/vcpkg.json index f74b4d3e37b..a6e9c68b57d 100644 --- a/cpp/vcpkg.json +++ b/cpp/vcpkg.json @@ -17,6 +17,7 @@ "benchmark", "boost-filesystem", "boost-multiprecision", + "boost-process", "boost-system", "brotli", "bzip2", @@ -25,6 +26,14 @@ "flatbuffers", "gflags", "glog", + { + "name":"google-cloud-cpp", + "version>=": "1.32.1", + "default-features": false, + "features": [ + "storage" + ] + }, "grpc", "gtest", "lz4", diff --git a/dev/archery/archery/docker.py b/dev/archery/archery/docker.py deleted file mode 100644 index 17d4c713afc..00000000000 --- a/dev/archery/archery/docker.py +++ /dev/null @@ -1,402 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -import os -import re -import subprocess -from io import StringIO - -from dotenv import dotenv_values -from ruamel.yaml import YAML - -from .utils.command import Command, default_bin -from .compat import _ensure_path - - -def flatten(node, parents=None): - parents = list(parents or []) - if isinstance(node, str): - yield (node, parents) - elif isinstance(node, list): - for value in node: - yield from flatten(value, parents=parents) - elif isinstance(node, dict): - for key, value in node.items(): - yield (key, parents) - yield from flatten(value, parents=parents + [key]) - else: - raise TypeError(node) - - -def _sanitize_command(cmd): - if isinstance(cmd, list): - cmd = " ".join(cmd) - return re.sub(r"\s+", " ", cmd) - - -class UndefinedImage(Exception): - pass - - -class ComposeConfig: - - def __init__(self, config_path, dotenv_path, compose_bin, params=None): - config_path = _ensure_path(config_path) - if dotenv_path: - dotenv_path = _ensure_path(dotenv_path) - else: - dotenv_path = config_path.parent / '.env' - self._read_env(dotenv_path, params) - self._read_config(config_path, compose_bin) - - def _read_env(self, dotenv_path, params): - """ - Read .env and merge it with explicitly passed parameters. - """ - self.dotenv = dotenv_values(str(dotenv_path)) - if params is None: - self.params = {} - else: - self.params = {k: v for k, v in params.items() if k in self.dotenv} - - # forward the process' environment variables - self.env = os.environ.copy() - # set the defaults from the dotenv files - self.env.update(self.dotenv) - # override the defaults passed as parameters - self.env.update(self.params) - - # translate docker's architecture notation to a more widely used one - arch = self.env.get('ARCH', 'amd64') - arch_aliases = { - 'amd64': 'x86_64', - 'arm64v8': 'aarch64', - 's390x': 's390x' - } - arch_short_aliases = { - 'amd64': 'x64', - 'arm64v8': 'arm64', - 's390x': 's390x' - } - self.env['ARCH_ALIAS'] = arch_aliases.get(arch, arch) - self.env['ARCH_SHORT_ALIAS'] = arch_short_aliases.get(arch, arch) - - def _read_config(self, config_path, compose_bin): - """ - Validate and read the docker-compose.yml - """ - yaml = YAML() - with config_path.open() as fp: - config = yaml.load(fp) - - services = config['services'].keys() - self.hierarchy = dict(flatten(config.get('x-hierarchy', {}))) - self.with_gpus = config.get('x-with-gpus', []) - nodes = self.hierarchy.keys() - errors = [] - - for name in self.with_gpus: - if name not in services: - errors.append( - 'Service `{}` defined in `x-with-gpus` bot not in ' - '`services`'.format(name) - ) - for name in nodes - services: - errors.append( - 'Service `{}` is defined in `x-hierarchy` bot not in ' - '`services`'.format(name) - ) - for name in services - nodes: - errors.append( - 'Service `{}` is defined in `services` but not in ' - '`x-hierarchy`'.format(name) - ) - - # trigger docker-compose's own validation - compose = Command('docker-compose') - args = ['--file', str(config_path), 'config'] - result = compose.run(*args, env=self.env, check=False, - stderr=subprocess.PIPE, stdout=subprocess.PIPE) - - if result.returncode != 0: - # strip the intro line of docker-compose errors - errors += result.stderr.decode().splitlines() - - if errors: - msg = '\n'.join([' - {}'.format(msg) for msg in errors]) - raise ValueError( - 'Found errors with docker-compose:\n{}'.format(msg) - ) - - rendered_config = StringIO(result.stdout.decode()) - self.path = config_path - self.config = yaml.load(rendered_config) - - def get(self, service_name): - try: - service = self.config['services'][service_name] - except KeyError: - raise UndefinedImage(service_name) - service['name'] = service_name - service['need_gpu'] = service_name in self.with_gpus - service['ancestors'] = self.hierarchy[service_name] - return service - - def __getitem__(self, service_name): - return self.get(service_name) - - -class Docker(Command): - - def __init__(self, docker_bin=None): - self.bin = default_bin(docker_bin, "docker") - - -class DockerCompose(Command): - - def __init__(self, config_path, dotenv_path=None, compose_bin=None, - params=None): - compose_bin = default_bin(compose_bin, 'docker-compose') - self.config = ComposeConfig(config_path, dotenv_path, compose_bin, - params) - self.bin = compose_bin - self.pull_memory = set() - - def clear_pull_memory(self): - self.pull_memory = set() - - def _execute_compose(self, *args, **kwargs): - # execute as a docker compose command - try: - result = super().run('--file', str(self.config.path), *args, - env=self.config.env, **kwargs) - result.check_returncode() - except subprocess.CalledProcessError as e: - def formatdict(d, template): - return '\n'.join( - template.format(k, v) for k, v in sorted(d.items()) - ) - msg = ( - "`{cmd}` exited with a non-zero exit code {code}, see the " - "process log above.\n\nThe docker-compose command was " - "invoked with the following parameters:\n\nDefaults defined " - "in .env:\n{dotenv}\n\nArchery was called with:\n{params}" - ) - raise RuntimeError( - msg.format( - cmd=' '.join(e.cmd), - code=e.returncode, - dotenv=formatdict(self.config.dotenv, template=' {}: {}'), - params=formatdict( - self.config.params, template=' export {}={}' - ) - ) - ) - - def _execute_docker(self, *args, **kwargs): - # execute as a plain docker cli command - try: - result = Docker().run(*args, **kwargs) - result.check_returncode() - except subprocess.CalledProcessError as e: - raise RuntimeError( - "{} exited with non-zero exit code {}".format( - ' '.join(e.cmd), e.returncode - ) - ) - - def pull(self, service_name, pull_leaf=True, using_docker=False): - def _pull(service): - args = ['pull'] - if service['image'] in self.pull_memory: - return - - if using_docker: - try: - self._execute_docker(*args, service['image']) - except Exception as e: - # better --ignore-pull-failures handling - print(e) - else: - args.append('--ignore-pull-failures') - self._execute_compose(*args, service['name']) - - self.pull_memory.add(service['image']) - - service = self.config.get(service_name) - for ancestor in service['ancestors']: - _pull(self.config.get(ancestor)) - if pull_leaf: - _pull(service) - - def build(self, service_name, use_cache=True, use_leaf_cache=True, - using_docker=False, using_buildx=False): - def _build(service, use_cache): - if 'build' not in service: - # nothing to do - return - - args = [] - cache_from = list(service.get('build', {}).get('cache_from', [])) - if use_cache: - for image in cache_from: - if image not in self.pull_memory: - try: - self._execute_docker('pull', image) - except Exception as e: - print(e) - finally: - self.pull_memory.add(image) - else: - args.append('--no-cache') - - # turn on inline build cache, this is a docker buildx feature - # used to bundle the image build cache to the pushed image manifest - # so the build cache can be reused across hosts, documented at - # https://github.com/docker/buildx#--cache-tonametypetypekeyvalue - if self.config.env.get('BUILDKIT_INLINE_CACHE') == '1': - args.extend(['--build-arg', 'BUILDKIT_INLINE_CACHE=1']) - - if using_buildx: - for k, v in service['build'].get('args', {}).items(): - args.extend(['--build-arg', '{}={}'.format(k, v)]) - - if use_cache: - cache_ref = '{}-cache'.format(service['image']) - cache_from = 'type=registry,ref={}'.format(cache_ref) - cache_to = ( - 'type=registry,ref={},mode=max'.format(cache_ref) - ) - args.extend([ - '--cache-from', cache_from, - '--cache-to', cache_to, - ]) - - args.extend([ - '--output', 'type=docker', - '-f', service['build']['dockerfile'], - '-t', service['image'], - service['build'].get('context', '.') - ]) - self._execute_docker("buildx", "build", *args) - elif using_docker: - # better for caching - for k, v in service['build'].get('args', {}).items(): - args.extend(['--build-arg', '{}={}'.format(k, v)]) - for img in cache_from: - args.append('--cache-from="{}"'.format(img)) - args.extend([ - '-f', service['build']['dockerfile'], - '-t', service['image'], - service['build'].get('context', '.') - ]) - self._execute_docker("build", *args) - else: - self._execute_compose("build", *args, service['name']) - - service = self.config.get(service_name) - # build ancestor services - for ancestor in service['ancestors']: - _build(self.config.get(ancestor), use_cache=use_cache) - # build the leaf/target service - _build(service, use_cache=use_cache and use_leaf_cache) - - def run(self, service_name, command=None, *, env=None, volumes=None, - user=None, using_docker=False): - service = self.config.get(service_name) - - args = [] - if user is not None: - args.extend(['-u', user]) - - if env is not None: - for k, v in env.items(): - args.extend(['-e', '{}={}'.format(k, v)]) - - if volumes is not None: - for volume in volumes: - args.extend(['--volume', volume]) - - if using_docker or service['need_gpu']: - # use gpus, requires docker>=19.03 - if service['need_gpu']: - args.extend(['--gpus', 'all']) - - if service.get('shm_size'): - args.extend(['--shm-size', service['shm_size']]) - - # append env variables from the compose conf - for k, v in service.get('environment', {}).items(): - args.extend(['-e', '{}={}'.format(k, v)]) - - # append volumes from the compose conf - for v in service.get('volumes', []): - if not isinstance(v, str): - # if not the compact string volume definition - v = "{}:{}".format(v['source'], v['target']) - args.extend(['-v', v]) - - # infer whether an interactive shell is desired or not - if command in ['cmd.exe', 'bash', 'sh', 'powershell']: - args.append('-it') - - # get the actual docker image name instead of the compose service - # name which we refer as image in general - args.append(service['image']) - - # add command from compose if it wasn't overridden - if command is not None: - args.append(command) - else: - # replace whitespaces from the preformatted compose command - cmd = _sanitize_command(service.get('command', '')) - if cmd: - args.append(cmd) - - # execute as a plain docker cli command - self._execute_docker('run', '--rm', *args) - else: - # execute as a docker-compose command - args.append(service_name) - if command is not None: - args.append(command) - self._execute_compose('run', '--rm', *args) - - def push(self, service_name, user=None, password=None, using_docker=False): - def _push(service): - if using_docker: - return self._execute_docker('push', service['image']) - else: - return self._execute_compose('push', service['name']) - - if user is not None: - try: - # TODO(kszucs): have an option for a prompt - self._execute_docker('login', '-u', user, '-p', password) - except subprocess.CalledProcessError: - # hide credentials - msg = ('Failed to push `{}`, check the passed credentials' - .format(service_name)) - raise RuntimeError(msg) from None - - service = self.config.get(service_name) - for ancestor in service['ancestors']: - _push(self.config.get(ancestor)) - _push(service) - - def images(self): - return sorted(self.config.hierarchy.keys()) diff --git a/dev/archery/archery/docker/core.py b/dev/archery/archery/docker/core.py index aaf16bdfa6e..dfdf3f4778a 100644 --- a/dev/archery/archery/docker/core.py +++ b/dev/archery/archery/docker/core.py @@ -48,6 +48,15 @@ def _sanitize_command(cmd): return re.sub(r"\s+", " ", cmd) +_arch_short_mapping = { + 'arm64v8': 'arm64', +} +_arch_alias_mapping = { + 'amd64': 'x86_64', + 'arm64v8': 'aarch64', +} + + class UndefinedImage(Exception): pass @@ -82,18 +91,8 @@ def _read_env(self, dotenv_path, params): # translate docker's architecture notation to a more widely used one arch = self.env.get('ARCH', 'amd64') - arch_aliases = { - 'amd64': 'x86_64', - 'arm64v8': 'aarch64', - 's390x': 's390x' - } - arch_short_aliases = { - 'amd64': 'x64', - 'arm64v8': 'arm64', - 's390x': 's390x' - } - self.env['ARCH_ALIAS'] = arch_aliases.get(arch, arch) - self.env['ARCH_SHORT_ALIAS'] = arch_short_aliases.get(arch, arch) + self.env['ARCH_ALIAS'] = _arch_alias_mapping.get(arch, arch) + self.env['ARCH_SHORT'] = _arch_short_mapping.get(arch, arch) def _read_config(self, config_path, compose_bin): """ diff --git a/dev/tasks/python-wheels/github.osx.amd64.yml b/dev/tasks/python-wheels/github.osx.amd64.yml index 8078abfd56f..88cf85b6ffa 100644 --- a/dev/tasks/python-wheels/github.osx.amd64.yml +++ b/dev/tasks/python-wheels/github.osx.amd64.yml @@ -27,11 +27,10 @@ env: PYARROW_VERSION: "{{ arrow.no_rc_version }}" PYTHON_VERSION: "{{ python_version }}" PYTHON: "/Library/Frameworks/Python.framework/Versions/{{ python_version }}/bin/python{{ python_version }}" - VCPKG_DEFAULT_TRIPLET: x64-osx-static-release + VCPKG_DEFAULT_TRIPLET: amd64-osx-static-release VCPKG_FEATURE_FLAGS: "-manifests" VCPKG_OVERLAY_TRIPLETS: {{ "${{ github.workspace }}/arrow/ci/vcpkg" }} VCPKG_ROOT: {{ "${{ github.workspace }}/vcpkg" }} - VCPKG_VERSION: "{{ vcpkg_version }}" jobs: build: @@ -41,20 +40,33 @@ jobs: {{ macros.github_checkout_arrow()|indent }} - name: Install System Dependencies - run: brew install bash bison coreutils ninja cmake + run: brew install bash bison coreutils ninja + + - name: Install Specific CMake version + uses: lukka/get-cmake@v3.21.2 + + - name: Retrieve VCPKG version from arrow/.env + shell: bash + run: | + vcpkg_version=$(cat "arrow/.env" | grep "VCPKG" | cut -d "=" -f2 | tr -d '"') + echo "VCPKG_VERSION=$vcpkg_version" >> $GITHUB_ENV - uses: actions/cache@v2 id: vcpkg-cache with: path: vcpkg - key: vcpkg-{{ macos_deployment_target }}-{{ vcpkg_version }}-{{ "${{ hashFiles('arrow/ci/vcpkg/*.patch', 'arrow/ci/vcpkg/*osx*.cmake') }}" }} + key: vcpkg-{{ macos_deployment_target }}-{{ "${{ env.VCPKG_VERSION }}" }}-{{ "${{ hashFiles('arrow/ci/vcpkg/*.patch', 'arrow/ci/vcpkg/*osx*.cmake') }}" }} - name: Install Vcpkg if: steps.vcpkg-cache.outputs.cache-hit != 'true' shell: bash env: MACOSX_DEPLOYMENT_TARGET: "10.15" - run: arrow/ci/scripts/install_vcpkg.sh $VCPKG_VERSION $VCPKG_ROOT + run: arrow/ci/scripts/install_vcpkg.sh $VCPKG_ROOT $VCPKG_VERSION + + # workaround for https://github.com/apache/arrow/pull/11569#issuecomment-979592053 + - name: Install OpenSSL + run: $VCPKG_ROOT/vcpkg install openssl - name: Install Packages run: | @@ -68,6 +80,7 @@ jobs: flatbuffers \ gflags \ glog \ + google-cloud-cpp[core,storage] \ grpc \ lz4 \ openssl \ diff --git a/dev/tasks/python-wheels/github.osx.arm64.yml b/dev/tasks/python-wheels/github.osx.arm64.yml index e5456dbfc28..60a3c61e5b2 100644 --- a/dev/tasks/python-wheels/github.osx.arm64.yml +++ b/dev/tasks/python-wheels/github.osx.arm64.yml @@ -39,7 +39,6 @@ env: VCPKG_FEATURE_FLAGS: "-manifests" VCPKG_OVERLAY_TRIPLETS: {{ "${{ github.workspace }}/arrow/ci/vcpkg" }} VCPKG_ROOT: {{ "${{ github.workspace }}/vcpkg" }} - VCPKG_VERSION: "{{ vcpkg_version }}" jobs: build: @@ -56,15 +55,21 @@ jobs: shell: bash run: echo "/opt/homebrew/opt/bison/bin" >> $GITHUB_PATH + - name: Retrieve VCPKG version from arrow/.env + shell: bash + run: | + vcpkg_version=$(cat "arrow/.env" | grep "VCPKG" | cut -d "=" -f2 | tr -d '"') + echo "VCPKG_VERSION=$vcpkg_version" >> $GITHUB_ENV + - name: Install Vcpkg shell: bash env: MACOSX_DEPLOYMENT_TARGET: "11.0" - run: arch -arm64 arrow/ci/scripts/install_vcpkg.sh $VCPKG_VERSION $VCPKG_ROOT + run: arch -arm64 arrow/ci/scripts/install_vcpkg.sh $VCPKG_ROOT $VCPKG_VERSION - name: Install OpenSSL shell: bash - run: arch -arm64 $VCPKG_ROOT/vcpkg install openssl + run: arch -arm64 $VCPKG_ROOT/vcpkg install openssl:arm64-osx-static-release {% if arch == "universal2" %} # OpenSSL doesn't provide an universal2 configuration yet, so vcpkg is @@ -75,12 +80,13 @@ jobs: - name: Create universal binaries for OpenSSL shell: bash run: | - for arch in arm64 x64; do - VCPKG_DEFAULT_TRIPLET=${arch}-osx-static-release arch -arm64 $VCPKG_ROOT/vcpkg install openssl + mkdir -p $VCPKG_ROOT/installed/universal2-osx-static-release/lib + for arch in arm64 amd64; do + arch -arm64 $VCPKG_ROOT/vcpkg install openssl:${arch}-osx-static-release done for lib in libcrypto libssl; do lipo -create $VCPKG_ROOT/installed/arm64-osx-static-release/lib/${lib}.a \ - $VCPKG_ROOT/installed/x64-osx-static-release/lib/${lib}.a \ + $VCPKG_ROOT/installed/amd64-osx-static-release/lib/${lib}.a \ -output $VCPKG_ROOT/installed/universal2-osx-static-release/lib/${lib}.a done {% endif %} @@ -97,6 +103,7 @@ jobs: flatbuffers \ gflags \ glog \ + google-cloud-cpp[core,storage] \ lz4 \ orc \ protobuf \ diff --git a/dev/tasks/tasks.yml b/dev/tasks/tasks.yml index 70926ef8af5..9b020bb8a29 100644 --- a/dev/tasks/tasks.yml +++ b/dev/tasks/tasks.yml @@ -367,7 +367,6 @@ tasks: ci: github template: python-wheels/github.osx.amd64.yml params: - vcpkg_version: "2021.04.30" python_version: "{{ python_version }}" macos_deployment_target: {{ macos_version }} arrow_s3: {{ arrow_s3 }} @@ -399,7 +398,6 @@ tasks: params: arch: arm64 arrow_simd_level: "DEFAULT" - vcpkg_version: "2021.04.30" python_version: "3.8" macos_deployment_target: "11.0" @@ -413,7 +411,6 @@ tasks: params: arch: arm64 arrow_simd_level: "DEFAULT" - vcpkg_version: "2021.04.30" python_version: "{{ python_version }}" macos_deployment_target: "11.0" artifacts: @@ -427,7 +424,6 @@ tasks: # Universal2 builds for both rosetta and native, but we currently can't # configure SIMD for both architectures at the same time arrow_simd_level: "NONE" - vcpkg_version: "2021.04.30" python_version: "{{ python_version }}" macos_deployment_target: "10.13" artifacts: diff --git a/docker-compose.yml b/docker-compose.yml index b917edc22af..328b5978240 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -271,7 +271,7 @@ services: ARROW_USE_LD_GOLD: "ON" BUILD_WARNING_LEVEL: "PRODUCTION" volumes: *conda-volumes - command: + command: ["/arrow/ci/scripts/cpp_build.sh /arrow /build && /arrow/ci/scripts/cpp_test.sh /arrow /build"] @@ -778,18 +778,18 @@ services: image: ${REPO}:${ARCH}-python-${PYTHON}-wheel-manylinux-2010-vcpkg-${VCPKG} build: args: - arch_alias: ${ARCH_ALIAS} - arch_short_alias: ${ARCH_SHORT_ALIAS} + arch: ${ARCH} + arch_short: ${ARCH_SHORT} base: quay.io/pypa/manylinux2010_${ARCH_ALIAS}:2021-10-11-14ac00e vcpkg: ${VCPKG} python: ${PYTHON} + manylinux: 2010 context: . dockerfile: ci/docker/python-wheel-manylinux-201x.dockerfile cache_from: - ${REPO}:${ARCH}-python-${PYTHON}-wheel-manylinux-2010-vcpkg-${VCPKG} environment: <<: *ccache - MANYLINUX_VERSION: 2010 volumes: - .:/arrow:delegated - ${DOCKER_VOLUME_PREFIX}python-wheel-manylinux2010-ccache:/ccache:delegated @@ -801,18 +801,18 @@ services: image: ${REPO}:${ARCH}-python-${PYTHON}-wheel-manylinux-2014-vcpkg-${VCPKG} build: args: - arch_alias: ${ARCH_ALIAS} - arch_short_alias: ${ARCH_SHORT_ALIAS} - base: quay.io/pypa/manylinux2014_${ARCH_ALIAS}:2021-10-11-14ac00e + arch: ${ARCH} + arch_short: ${ARCH_SHORT} + base: quay.io/pypa/manylinux2014_${ARCH_ALIAS}:2021-10-11-14ac00e vcpkg: ${VCPKG} python: ${PYTHON} + manylinux: 2014 context: . dockerfile: ci/docker/python-wheel-manylinux-201x.dockerfile cache_from: - ${REPO}:${ARCH}-python-${PYTHON}-wheel-manylinux-2014-vcpkg-${VCPKG} environment: <<: *ccache - MANYLINUX_VERSION: 2014 volumes: - .:/arrow:delegated - ${DOCKER_VOLUME_PREFIX}python-wheel-manylinux2014-ccache:/ccache:delegated