blob: af0cc44ef0916fe72301e0e8e40dd95da6a7b8fa [file] [log] [blame]
# 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 'macros.jinja' as macros with context %}
{{ macros.github_header() }}
env:
ARROW_S3: {{ arrow_s3 }}
MACOSX_DEPLOYMENT_TARGET: {{ macos_deployment_target }}
MB_PYTHON_VERSION: {{ python_version }}
PLAT: x86_64
PYARROW_BUILD_VERBOSE: 1
PYARROW_VERSION: {{ arrow.no_rc_version }}
PYTHON_VERSION: {{ python_version }}
SETUPTOOLS_SCM_PRETEND_VERSION: {{ arrow.no_rc_version }}
VCPKG_DEFAULT_TRIPLET: x64-osx-static-release
VCPKG_FEATURE_FLAGS: "-manifests"
VCPKG_OVERLAY_TRIPLETS: {{ "${{ github.workspace }}/arrow/ci/vcpkg" }}
jobs:
build:
name: Build wheel for OS X
runs-on: macos-latest
steps:
{{ macros.github_checkout_arrow()|indent }}
- name: Install System Dependencies
run: brew install bison ninja
# Restore from cache the previously built ports.
# If cache-miss, download and build vcpkg (aka "bootstrap vcpkg").
- name: Restore from Cache and Install Vcpkg
# Download and build vcpkg, without installing any port.
# If content is cached already, it is a no-op.
uses: kszucs/run-vcpkg@main
with:
# Required to prevent cache eviction on crossbow's main branch
# where we build pre-build the vcpkg packages
setupOnly: true
doNotSaveCache: true
appendedCacheKey: "-macos-{{ macos_deployment_target }}"
vcpkgDirectory: {{ "${{ github.workspace }}/vcpkg" }}
vcpkgGitCommitId: fced4bef1606260f110d74de1ae1975c2b9ac549
- name: Patch Vcpkg Ports
run: |
vcpkg_patch_file="../arrow/ci/vcpkg/ports.patch"
cd $VCPKG_ROOT
if ! git apply --reverse --check --ignore-whitespace ${vcpkg_patch_file}; then
git apply --ignore-whitespace ${vcpkg_patch_file}
echo "Patch successfully applied!"
fi
# Now that vcpkg is installed, it is being used to run with the desired arguments.
- name: Install Vcpkg Dependencies
run: |
$VCPKG_ROOT/vcpkg install \
abseil \
boost-filesystem \
brotli \
bzip2 \
c-ares \
curl \
flatbuffers \
gflags \
glog \
grpc \
lz4 \
openssl \
orc \
protobuf \
rapidjson \
re2 \
snappy \
thrift \
utf8proc \
zlib \
zstd
{% if arrow_s3 == "ON" %}
- name: Install AWS SDK C++
run: |
$VCPKG_ROOT/vcpkg install \
aws-sdk-cpp[config,cognito-identity,core,identity-management,s3,sts,transfer]
{% endif %}
- name: Setup Multibuild
run: |
git clone https://github.com/matthew-brett/multibuild
git -C multibuild checkout 03950c9a7feb09d215f82d6563c4ffd91274a1e1
- name: Build Wheel
env:
CONFIG_PATH: /dev/null
run: |
# configure environment and install python
source multibuild/common_utils.sh
source multibuild/travis_osx_steps.sh
before_install
# install python dependencies
pip install -r arrow/python/requirements-wheel-build.txt delocate
# build the wheel
arrow/ci/scripts/python_wheel_macos_build.sh $(pwd)/arrow $(pwd)/build
- name: Setup Python for Testing
uses: actions/setup-python@v2
with:
python-version: "{{ python_version }}"
- name: Test the Wheel
run: |
# TODO(kszucs): temporarily remove homebrew libs
unset MACOSX_DEPLOYMENT_TARGET
arrow/ci/scripts/python_wheel_macos_test.sh $(pwd)/arrow
{{ macros.github_upload_releases("arrow/python/dist/*.whl")|indent }}
{{ macros.github_upload_gemfury("arrow/python/dist/*.whl")|indent }}