| # 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. |
| |
| # NOTE: must set "Crossbow" as name to have the badge links working in the |
| # github comment reports! |
| name: Crossbow |
| |
| on: |
| push: |
| branches: |
| - "*-github-*" |
| |
| 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: |
| - name: Checkout Arrow |
| run: | |
| set -ex |
| git clone --no-checkout {{ arrow.remote }} arrow |
| git -C arrow fetch -t {{ arrow.remote }} {{ arrow.branch }} |
| git -C arrow checkout FETCH_HEAD |
| git -C arrow submodule update --init --recursive |
| |
| - 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 |
| |
| - name: Setup Crossbow |
| run: pip install --requirement arrow/dev/tasks/requirements-crossbow.txt |
| |
| - name: Upload artifacts |
| run: | |
| python arrow/dev/tasks/crossbow.py \ |
| --queue-path $(pwd) \ |
| --queue-remote {{ queue_remote_url }} \ |
| upload-artifacts \ |
| --sha {{ task.branch }} \ |
| --tag {{ task.tag }} \ |
| --pattern "arrow/python/dist/*.whl" |
| env: |
| CROSSBOW_GITHUB_TOKEN: {{ '${{ secrets.CROSSBOW_GITHUB_TOKEN }}' }} |
| |
| {% if arrow.branch == 'master' %} |
| - name: Upload package to Gemfury |
| run: | |
| # upload to gemfury pypi repository, there should be a single wheel |
| path=$(ls arrow/python/dist/*.whl) |
| curl -F "package=@${path}" https://${CROSSBOW_GEMFURY_TOKEN}@push.fury.io/${CROSSBOW_GEMFURY_ORG}/ |
| env: |
| CROSSBOW_GEMFURY_TOKEN: {{ '${{ secrets.CROSSBOW_GEMFURY_TOKEN }}' }} |
| CROSSBOW_GEMFURY_ORG: {{ '${{ secrets.CROSSBOW_GEMFURY_ORG }}' }} |
| {% endif %} |