forked from abs-tudelft/fletcher
-
Notifications
You must be signed in to change notification settings - Fork 1
211 lines (205 loc) · 7.94 KB
/
assets.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
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
name: Assets
on:
release:
types:
- created
pull_request:
env:
CMAKE_VERSION: '3.19.2'
ARROW_VERSION: '3.0.0'
jobs:
archive:
name: Linux
runs-on: ubuntu-latest
container: centos:7
strategy:
matrix:
source:
- runtime/cpp
steps:
- name: Install dependencies
run: |
yum install -y epel-release
yum install -y curl make gcc-c++ rpm-build git
- name: Install CMake
run: curl -L https://github.com/Kitware/CMake/releases/download/v$CMAKE_VERSION/cmake-$CMAKE_VERSION-Linux-x86_64.tar.gz | tar xz --strip-components=1 -C /usr
- name: Install Apache Arrow
run: |
yum install -y https://apache.bintray.com/arrow/centos/$(cut -d: -f5 /etc/system-release-cpe)/apache-arrow-release-latest.rpm
yum install -y arrow-devel-$ARROW_VERSION-1.el7
- uses: actions/checkout@v2
- name: Configure
run: cmake ${{ matrix.source }} -DCMAKE_BUILD_TYPE=Release
- name: Package
run: make -j package
- id: tarball
run: echo "##[set-output name=name;]$(ls fletch*.tar.gz)"
- name: Install
run: tar xvfz ./${{ steps.tarball.outputs.name }} -C /usr
- name: Upload tarball
uses: actions/upload-release-asset@v1
if: ${{ github.event_name == 'release' && github.event.action == 'created' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ${{ steps.tarball.outputs.name }}
asset_name: ${{ steps.tarball.outputs.name }}
asset_content_type: application/octet-stream
centos:
name: CentOS
runs-on: ubuntu-latest
strategy:
matrix:
version:
- 7
- 8
source:
- runtime/cpp
- codegen/cpp/fletchgen
exclude:
- version: 7
source: codegen/cpp/fletchgen
container: centos:${{ matrix.version }}
steps:
- name: Install dependencies
run: |
yum install -y epel-release
yum install -y curl make rpm-build gcc-c++ git
- name: Install CMake
run: curl -L https://github.com/Kitware/CMake/releases/download/v$CMAKE_VERSION/cmake-$CMAKE_VERSION-Linux-x86_64.tar.gz | tar xz --strip-components=1 -C /usr
- name: Install Apache Arrow
if: ${{ matrix.version == '7' }}
run: |
yum install -y https://apache.bintray.com/arrow/centos/$(cut -d: -f5 /etc/system-release-cpe)/apache-arrow-release-latest.rpm
yum install -y arrow-devel-$ARROW_VERSION-1.el${{ matrix.version }}
- name: Install Apache Arrow
if: ${{ matrix.version == '8' }}
run: |
dnf install -y https://apache.bintray.com/arrow/centos/$(cut -d: -f5 /etc/system-release-cpe | cut -d. -f1)/apache-arrow-release-latest.rpm
dnf config-manager --set-enabled epel || :
dnf config-manager --set-enabled powertools || :
dnf config-manager --set-enabled codeready-builder-for-rhel-$(cut -d: -f5 /etc/system-release-cpe | cut -d. -f1)-rhui-rpms || :
subscription-manager repos --enable codeready-builder-for-rhel-$(cut -d: -f5 /etc/system-release-cpe | cut -d. -f1)-$(arch)-rpms || :
dnf install -y arrow-devel-$ARROW_VERSION-1.el${{ matrix.version }}
- uses: actions/checkout@v2
if: ${{ matrix.source == 'codegen/cpp/fletchgen' }}
with:
submodules: true
- uses: actions/checkout@v2
if: ${{ matrix.source != 'codegen/cpp/fletchgen' }}
- name: Configure
run: cmake ${{ matrix.source }} -DCMAKE_BUILD_TYPE=Release
- name: Package
run: make -j package
- id: rpm
run: echo "##[set-output name=name;]$(ls fletch*.rpm)"
- name: Install
run: |
yum remove -y arrow-devel
yum autoremove -y
yum localinstall -y ./${{ steps.rpm.outputs.name }}
- name: Upload rpm
uses: actions/upload-release-asset@v1
if: ${{ github.event_name == 'release' && github.event.action == 'created' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ${{ steps.rpm.outputs.name }}
asset_name: ${{ steps.rpm.outputs.name }}
asset_content_type: application/octet-stream
ubuntu:
name: Ubuntu
strategy:
matrix:
version:
- 18.04
- 20.04
source:
- runtime/cpp
- codegen/cpp/fletchgen
runs-on: ubuntu-${{ matrix.version }}
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: Install Apache Arrow
run: |
wget https://apache.bintray.com/arrow/$(lsb_release --id --short | tr 'A-Z' 'a-z')/apache-arrow-archive-keyring-latest-$(lsb_release --codename --short).deb
sudo apt-get install -y ./apache-arrow-archive-keyring-latest-$(lsb_release --codename --short).deb
sudo apt-get update
sudo apt-get install -y libarrow-dev=$ARROW_VERSION-1
- name: Configure
run: cmake ${{ matrix.source }} -DCMAKE_BUILD_TYPE=Release
- name: Package
run: make -j package
- id: deb
run: echo "##[set-output name=name;]$(ls fletch*.deb)"
- name: Install
run: |
sudo apt-get --purge autoremove libarrow-dev
sudo apt-get install -y ./${{ steps.deb.outputs.name }} libarrow-dev=${ARROW_VERSION}-1
- name: Upload deb
uses: actions/upload-release-asset@v1
if: ${{ github.event_name == 'release' && github.event.action == 'created' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ${{ steps.deb.outputs.name }}
asset_name: ${{ steps.deb.outputs.name }}
asset_content_type: application/octet-stream
python:
name: Python
runs-on: ubuntu-latest
container: quay.io/pypa/manylinux${{ matrix.manylinux }}_x86_64:latest
strategy:
fail-fast: false
matrix:
source:
- codegen/python
- runtime/python
manylinux:
- 2014
cpython_version:
- 'cp36-cp36m'
- 'cp37-cp37m'
- 'cp38-cp38'
- 'cp39-cp39'
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: Install Apache Arrow
run: |
yum install -y https://apache.bintray.com/arrow/centos/$(cut -d: -f5 /etc/system-release-cpe)/apache-arrow-release-latest.rpm
yum install -y --enablerepo=epel arrow-devel-$ARROW_VERSION-1.el7 arrow-libs-$ARROW_VERSION-1.el7 arrow-python-devel-$ARROW_VERSION-1.el7 arrow-python-libs-$ARROW_VERSION-1.el7
- name: Install cmake
run: curl -L https://github.com/Kitware/CMake/releases/download/v$CMAKE_VERSION/cmake-$CMAKE_VERSION-Linux-x86_64.tar.gz | tar xz --strip-components=1 -C /usr
- name: Install dependencies
run: /opt/python/${{ matrix.cpython_version }}/bin/python -m pip install pyarrow==$ARROW_VERSION auditwheel
- name: Build wheel
working-directory: ${{ matrix.source }}
run: |
/opt/python/${{ matrix.cpython_version }}/bin/python setup.py bdist_wheel
/opt/python/${{ matrix.cpython_version }}/bin/python -m auditwheel repair build/dist/*.whl
- name: Wheel path
id: wheel
working-directory: ${{ matrix.source }}/wheelhouse
run: echo "##[set-output name=wheel;]$(ls *.whl)"
- uses: actions/upload-release-asset@v1
if: ${{ github.event_name == 'release' && github.event.action == 'created' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ${{ matrix.source }}/wheelhouse/${{ steps.wheel.outputs.wheel }}
asset_name: ${{ steps.wheel.outputs.wheel }}
asset_content_type: application/zip
- uses: pypa/gh-action-pypi-publish@v1.3.1
if: ${{ github.event_name == 'release' && github.event.action == 'created' }}
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}
packages_dir: ${{ matrix.source }}/wheelhouse