-
Notifications
You must be signed in to change notification settings - Fork 9
147 lines (134 loc) · 5.09 KB
/
ci.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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
name: CI
on:
pull_request:
push:
branches:
- 'main'
- 'pre-commit-autoupdate'
tags:
- '*'
schedule:
# daily (`@daily` not supported, see
# https://docs.github.com/en/actions/reference/events-that-trigger-workflows#scheduled-events )
#
# Runs on default/base branch (see
# https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#onschedule )
- cron: '0 0 * * *'
jobs:
build:
strategy:
fail-fast: false
matrix:
numfocus_nightly: [false]
os: ["ubuntu-latest"]
pyarrow: ["nightly"]
python: ["3.8"]
include:
- numfocus_nightly: true
os: "ubuntu-latest"
pyarrow: "13.0.0"
python: "3.11"
- numfocus_nightly: false
os: "ubuntu-latest"
pyarrow: "8.0.1"
python: "3.10"
- numfocus_nightly: false
os: "ubuntu-latest"
pyarrow: "9.0.0"
python: "3.10"
- numfocus_nightly: false
os: "ubuntu-latest"
pyarrow: "10.0.1"
python: "3.11"
- numfocus_nightly: false
os: "ubuntu-latest"
pyarrow: "11.0.0"
python: "3.11"
- numfocus_nightly: false
os: "ubuntu-latest"
pyarrow: "12.0.0"
python: "3.11"
- numfocus_nightly: false
os: "ubuntu-latest"
pyarrow: "13.0.0"
python: "3.11"
- numfocus_nightly: false
os: "macos-latest"
pyarrow: "13.0.0"
python: "3.11"
continue-on-error: ${{ matrix.numfocus_nightly || matrix.pyarrow == 'nightly' }}
runs-on: ${{ matrix.os }}
defaults:
run:
# see https://github.com/conda-incubator/setup-miniconda/#important
shell: bash -l {0}
env:
IS_MASTER_BUILD: ${{ !matrix.numfocus_nightly && matrix.os == 'ubuntu-latest' && matrix.pyarrow == '4.0.1' && matrix.python == '3.8' }}
IS_TAG: ${{ github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')}}
steps:
# CI setup
- name: Is Master Build?
run: echo $IS_MASTER_BUILD
- name: Checkout
uses: actions/checkout@v3
- name: Set up Conda env
uses: mamba-org/provision-with-micromamba@e2b397b12d0a38069451664382b769c9456e3d6d
with:
cache-env: true
extra-specs: |
python=${{ matrix.PYTHON_VERSION }}
- name: Install repository
run: python -m pip install --no-build-isolation --no-deps --disable-pip-version-check -e .
- name: Install Pyarrow (non-nightly)
run: micromamba install pyarrow==${{ matrix.pyarrow }}
if: matrix.pyarrow != 'nightly'
- name: Install Pyarrow (nightly)
# Install both arrow-cpp and pyarrow to make sure that we have the
# latest nightly of both packages. It is sadly not guaranteed that the
# nightlies and the latest release would otherwise work together.
run: micromamba update -c arrow-nightlies -c conda-forge arrow-cpp pyarrow
if: matrix.pyarrow == 'nightly'
- name: Pip Instal NumFOCUS nightly
# NumFOCUS nightly wheels, contains numpy and pandas
# TODO(gh-45): Re-add numpy
run: python -m pip install --pre --upgrade --timeout=60 --extra-index-url https://pypi.anaconda.org/scipy-wheels-nightly/simple pandas
if: matrix.numfocus_nightly
- name: Test import
run: |
python -c "import plateau"
python -c "import plateau.api"
python -c "import plateau.api.dataset"
python -c "import plateau.api.serialization"
python -c "import plateau.core"
python -c "import plateau.io"
python -c "import plateau.io_components"
python -c "import plateau.serialization"
python -c "import plateau.utils"
# Tests
- name: Pytest
# FIXME: Add `-n auto` again to allow for parallelism here.
run: pytest --cov --cov-report xml
- name: Running benchmarks
run: |
asv --config ./asv_bench/asv.conf.json machine --machine github --os unknown --arch unknown --cpu unknown --ram unknown
asv --config ./asv_bench/asv.conf.json dev | sed "/failed$/ s/^/##[error]/" | tee benchmarks.log
if grep "failed" benchmarks.log > /dev/null ; then
exit 1
fi
if: env.IS_MASTER_BUILD == 'true'
# Builds
- name: Build Wheel and sdist
run: python -m build --no-isolation
- name: Codecov
uses: codecov/[email protected]
with:
# NOTE: `token` is not required, because the plateau repo is public
file: ./coverage.xml
name: pytest-numfocus_nightly_${{ matrix.numfocus_nightly }}-os_${{ matrix.os }}-pyarrow_${{ matrix.pyarrow }}-python_${{ matrix.python }}
# Release
- name: Publish to PyPI
if: env.IS_MASTER_BUILD == 'true' && env.IS_TAG == 'true'
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.PYPI_PASSWORD }}