-
Notifications
You must be signed in to change notification settings - Fork 10
117 lines (103 loc) · 3.77 KB
/
build.yml
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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
name: Build and Test
on:
push:
branches:
- main
- v[0-9]+.[0-9]+.x
tags:
- v*
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: [3.8]
os: [ubuntu-latest] #ubuntu-latest [macos-latest, ] #
env:
PYTHON_VERSION: ${{ matrix.python-version }}
SPARK_VERSION: ${{ matrix.spark-version }}
PANDAS_VERSION: ${{ matrix.pandas-version }}
PYARROW_VERSION: ${{ matrix.pyarrow-version }}
NUMPY_VERSION: ${{ matrix.numpy-version }}
DEFAULT_INDEX_TYPE: ${{ matrix.default-index-type }}
KOALAS_TESTING: 1
SPARK_LOCAL_IP: 127.0.0.1
# DISPLAY=0.0 does not work in Github Actions with Python 3.5. Here we work around with xvfb-run
PYTHON_EXECUTABLE: xvfb-run python
GITHUB_OAUTH_KEY: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install libomp
run: |
if [ "$RUNNER_OS" == "macOS" ]; then
brew install libomp
fi
shell: bash
# - name: install dependencies
# run: |
# pip install --upgrade pip
# pip install certifi
# pip install tox tox-wheel tox-gh-actions
# # pip install --trusted-host pypi.org --trusted-host files.pythonhosted.org -r requirements_tox.txt
# # python setup.py build_ext --inplace
# # python setup.py install
# pip install --trusted-host pypi.org --trusted-host files.pythonhosted.org -r requirements.txt
# pip install -e ."[dev]"
# - name: tests
# run: |
# coverage run --omit gators/*/test*.py -m pytest gators && coverage report && coverage xml
# - name: Upload coverage to Codecov
# uses: codecov/codecov-action@v2
# with:
# token: ${{ secrets.CODECOV_TOKEN }}
# file: coverage.xml
build_wheels:
runs-on: ${{ matrix.os }}
needs: [test]
strategy:
matrix:
os: [macos-latest, ubuntu-latest]
steps:
- name: Checkout code
uses: actions/checkout@v2
- uses: actions/checkout@v2
name: Install java
with:
java-version: 1.8
- uses: actions/setup-python@v2
name: Install Python
with:
python-version: "3.8"
- name: Install python depencies
run: |
python -m pip install --upgrade pip
python -m pip install certifi cibuildwheel
python -m pip install -r requirements.txt
- name: Build MacOS wheel
if: matrix.os == 'macos-latest'
env:
CIBW_BUILD: "cp311-macosx_x86_64" # cp38-macosx_x86_64 cp311-macosx_x86_64 cp39-macosx_x86_64 cp310-macosx_x86_64 cp311-macosx_x86_64 cp312-macosx_x86_64"
CIBW_BEFORE_ALL: brew install libomp
CIBW_BEFORE_BUILD_MACOS: |
python -m pip install --upgrade pip
python -m pip install certifi cibuildwheel
python -m pip install -r requirements.txt
run: python -m cibuildwheel --platform macos --output-dir dist
# - name: Build linux wheels
# if: matrix.os == 'ubuntu-latest'
# env:
# CIBW_BUILD: "cp37-manylinux_x86_64" # cp38-manylinux_x86_64 cp39-manylinux_x86_64 cp310-manylinux_x86_64 cp311-manylinux_x86_64 "
# # CIBW_BEFORE_BUILD_LINUX: >
# # python -m pip install -U setuptools "numpy<2" cython
# run: python -m cibuildwheel --platform linux --output-dir dist
- uses: actions/upload-artifact@v2
with:
name: wheels
path: ./dist/*.whl