-
Notifications
You must be signed in to change notification settings - Fork 4
99 lines (96 loc) · 3.69 KB
/
Copy pathbuild_python_wheels.yml
File metadata and controls
99 lines (96 loc) · 3.69 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
name: hyperarrow python wheels
on:
release:
types: [created, edited]
workflow_dispatch:
jobs:
build-macos:
runs-on: macos-latest
strategy:
matrix:
python_version: ["3.8", "3.9", "3.10"]
env:
INSTALL_PREFIX: "/usr/local/miniconda/envs/hyperarrow"
LIB_LOCATION: "/usr/local/miniconda/envs/hyperarrow/lib"
steps:
- uses: actions/checkout@v2
- uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
python-version: ${{ matrix.python_version }}
activate-environment: hyperarrow
channels: conda-forge
- name: Download Hyper Library / Headers
run: |
mkdir deps
pushd deps
wget -q https://downloads.tableau.com/tssoftware/tableauhyperapi-cxx-macos-x86_64-release-hyperapi_release_26.0.0.13821.r1fbe38ce.zip -O tableauhyperapi.zip
unzip -q tableauhyperapi.zip
mv tableauhyperapi-cxx-macos-x86_64-release-hyperapi_release_26.0.0.13821.r1fbe38ce tableauhyperapi
# Copy tableau lib to system location
# Required for subsequent python setup.py to work
cp tableauhyperapi/lib/libtableauhyperapi.dylib ${LIB_LOCATION}
- name: Set up out of core build
env:
HYPER_PATH: "/Users/runner/work/hyperarrow/hyperarrow/deps/tableauhyperapi"
MACOSX_DEPLOYMENT_TARGET: "10.9"
shell: bash -l {0}
run: |
conda activate hyperarrow
conda install -c conda-forge "arrow-cpp>=6.0"
mkdir build
cd build
cmake -DCMAKE_PREFIX_PATH="${HYPER_PATH}/share/cmake" \ -DCMAKE_INSTALL_PREFIX=${INSTALL_PREFIX} -DCMAKE_INSTALL_LIBDIR=${LIB_LOCATION} -DCMAKE_MACOSX_RPATH=ON -DCMAKE_INSTALL_RPATH=${LIB_LOCATION} ..
make -j"$(sysctl -n hw.logicalcpu)"
make install
LIB_LOCATION=${LIB_LOCATION} make python
- name: Fix wheel
shell: bash -l {0}
run: |
conda activate hyperarrow
conda install -c conda-forge pytest delocate wheel
HYPER_WHEEL_LOC=$(ls -d python/dist/*)
delocate-listdeps --all $HYPER_WHEEL_LOC
delocate-wheel -v $HYPER_WHEEL_LOC
# delocate-wheel will copy all required libraries but
# the tableauhyperapi also requires the hyperd executable
# so we manually copy that into the wheel as a workaround
python -m wheel unpack $HYPER_WHEEL_LOC
UNPACKED_DIR=$(ls -d hyperarrow*/)
cp -r deps/tableauhyperapi/lib/hyper "${UNPACKED_DIR}/hyperarrow/.dylibs"
python -m wheel pack hyperarrow-0.0.1.dev0
- name: Upload wheel
uses: actions/upload-artifact@v2
with:
name: macos-${{ matrix.python_version }}
path: ./*.whl
- name: Test wheel
shell: bash -l {0}
run: |
conda activate hyperarrow
python -m pip install hyperarrow*.whl
python -c "import hyperarrow; hyperarrow.test()"
build-linux:
runs-on: ubuntu-latest
strategy:
matrix:
python_version: ["3.8", "3.9", "3.10"]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python_version }}
- name: Build docker compose
run: PYTHON=${{ matrix.python_version }} docker-compose build python-wheel-manylinux-2014
- name: Run docker image
run: PYTHON=${{ matrix.python_version }} docker-compose up python-wheel-manylinux-2014
- name: Upload wheel
uses: actions/upload-artifact@v2
with:
name: linux-${{ matrix.python_version }}
path: python/repaired_wheels/*.whl
- name: Test wheel
run: |
python -m pip install pytest
python -m pip install python/repaired_wheels/*.whl
python -c "import hyperarrow; hyperarrow.test()"