Skip to content

Commit

Permalink
test converting from travis to github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
terencehonles committed Jan 4, 2021
1 parent ae9b265 commit 6f13c4c
Show file tree
Hide file tree
Showing 3 changed files with 174 additions and 128 deletions.
158 changes: 158 additions & 0 deletions dev/tasks/python-wheels/github.osx.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,158 @@
# 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-*"

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: Setup homebrew
run: |
set -ex
- name: Setup multibuild
run: |
set -ex
git clone https://github.com/matthew-brett/multibuild
git -C multibuild checkout 8882150df6529658700b66bec124dfb77eefca26
# source utilities required for wheel builds
export CONFIG_PATH=`pwd`/arrow/dev/tasks/python-wheels/osx-build.sh
source multibuild/common_utils.sh
source multibuild/travis_osx_steps.sh
# provided by travis_osx_steps
before_install
env:
MB_PYTHON_VERSION: {{ python_version }}
PLAT: x86_64

- name: Build wheel
run: |
set -ex
brew install \
automake \
bison \
boost \
ccache \
cmake \
flatbuffers \
flex \
git \
openblas \
openssl@1.1 \
protobuf \
python@3.8 \
thrift \
wget
# overridden by osx-build.sh
build_wheel arrow
env:
ARROW_S3: {{ arrow_s3 }}
MACOSX_DEPLOYMENT_TARGET: {{ macos_deployment_target }}
PYARROW_BUILD_VERBOSE: 1
PYARROW_VERSION: {{ arrow.no_rc_version }}

- name: Test wheel
run: |
set -ex
# test the built wheels, move Homebrew directory to ensure things
# are properly statically-linked
CELLAR=$(brew --cellar)
sudo mv $CELLAR{,.bak}
# make a new Cellar, allowing numpy to dynamically link to openblas
sudo mkdir $CELLAR
sudo ln -s ../Cellar.bak/openblas $CELLAR/openblas
# and brew's openblas will need gcc
sudo ln -s ../Cellar.bak/gcc $CELLAR/gcc
# install the built wheel and test dependencies
install_wheel arrow
# run unit tests before removing the system libraries
ulimit -S -n 4096 && run_unit_tests arrow
# run the import tests
run_import_tests
# restore the original Cellar
CELLAR=$(brew --cellar)
sudo rm $CELLAR/{gcc,openblas}
sudo rmdir $CELLAR
sudo mv $CELLAR{.bak,}
- name: Setup Crossbow
run: |
# before_install activates a virtualenv but we need the system
# python3
deactivate
brew install libgit2
pip3 install \
click \
github3.py \
jinja2 \
jira \
pygit2 \
ruamel.yaml \
setuptools_scm \
toolz
- name: Upload artifacts
run: |
python3 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 %}
112 changes: 0 additions & 112 deletions dev/tasks/python-wheels/travis.osx.yml

This file was deleted.

32 changes: 16 additions & 16 deletions dev/tasks/tasks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -503,8 +503,8 @@ tasks:
############################## Wheel OSX ####################################

wheel-osx-mavericks-cp36m:
ci: travis
template: python-wheels/travis.osx.yml
ci: github
template: python-wheels/github.osx.yml
params:
python_version: 3.6
macos_deployment_target: 10.9
Expand All @@ -513,8 +513,8 @@ tasks:
- pyarrow-{no_rc_version}-cp36-cp36m-macosx_10_9_x86_64.whl

wheel-osx-mavericks-cp37m:
ci: travis
template: python-wheels/travis.osx.yml
ci: github
template: python-wheels/github.osx.yml
params:
python_version: 3.7
macos_deployment_target: 10.9
Expand All @@ -523,8 +523,8 @@ tasks:
- pyarrow-{no_rc_version}-cp37-cp37m-macosx_10_9_x86_64.whl

wheel-osx-mavericks-cp38:
ci: travis
template: python-wheels/travis.osx.yml
ci: github
template: python-wheels/github.osx.yml
params:
python_version: 3.8
macos_deployment_target: 10.9
Expand All @@ -533,8 +533,8 @@ tasks:
- pyarrow-{no_rc_version}-cp38-cp38-macosx_10_9_x86_64.whl

wheel-osx-mavericks-cp39:
ci: travis
template: python-wheels/travis.osx.yml
ci: github
template: python-wheels/github.osx.yml
params:
python_version: 3.9
macos_deployment_target: 10.9
Expand All @@ -545,8 +545,8 @@ tasks:
# enable S3 support from macOS 10.13 so we don't need to bundle curl, crypt and ssl

wheel-osx-high-sierra-cp36m:
ci: travis
template: python-wheels/travis.osx.yml
ci: github
template: python-wheels/github.osx.yml
params:
python_version: 3.6
macos_deployment_target: 10.13
Expand All @@ -555,8 +555,8 @@ tasks:
- pyarrow-{no_rc_version}-cp36-cp36m-macosx_10_13_x86_64.whl

wheel-osx-high-sierra-cp37m:
ci: travis
template: python-wheels/travis.osx.yml
ci: github
template: python-wheels/github.osx.yml
params:
python_version: 3.7
macos_deployment_target: 10.13
Expand All @@ -565,8 +565,8 @@ tasks:
- pyarrow-{no_rc_version}-cp37-cp37m-macosx_10_13_x86_64.whl

wheel-osx-high-sierra-cp38:
ci: travis
template: python-wheels/travis.osx.yml
ci: github
template: python-wheels/github.osx.yml
params:
python_version: 3.8
macos_deployment_target: 10.13
Expand All @@ -575,8 +575,8 @@ tasks:
- pyarrow-{no_rc_version}-cp38-cp38-macosx_10_13_x86_64.whl

wheel-osx-high-sierra-cp39:
ci: travis
template: python-wheels/travis.osx.yml
ci: github
template: python-wheels/github.osx.yml
params:
python_version: 3.9
macos_deployment_target: 10.13
Expand Down

0 comments on commit 6f13c4c

Please sign in to comment.