-
Notifications
You must be signed in to change notification settings - Fork 121
194 lines (165 loc) · 6.6 KB
/
build-compatibility.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
# Copyright 2020-2023 Alibaba Group Holding Limited.
#
# Licensed 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.
name: Compatibility Build
on:
workflow_dispatch:
concurrency:
group: ${{ github.repository }}-${{ github.event.number || github.head_ref || github.sha }}-${{ github.workflow }}
cancel-in-progress: true
env:
CMAKE_C_COMPILER_LAUNCHER: ccache
CMAKE_CXX_COMPILER_LAUNCHER: ccache
jobs:
build:
runs-on: ${{ matrix.os }}
if: ${{ github.repository == 'v6d-io/v6d' || github.event_name == 'workflow_dispatch' }}
strategy:
matrix:
os: [ubuntu-20.04, macos-11]
arrow: [none, 6.0.1-1, 9.0.0-1, 10.0.1-1]
exclude:
- os: ubuntu-20.04
arrow: none
- os: macos-11
arrow: 6.0.1-1
- os: macos-11
arrow: 9.0.0-1
- os: macos-11
arrow: 10.0.1-1
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Generate Summary for Submodules
run: |
git submodule > git-modules.txt
cat git-modules.txt
- name: Cache for cccahe
uses: actions/cache@v3
with:
path: ~/.ccache
key: ${{ matrix.os }}-build-ccache-${{ hashFiles('**/git-modules.txt') }}
restore-keys: |
${{ matrix.os }}-build-ccache-
- name: Install Dependencies for Linux
if: runner.os == 'Linux'
run: |
# Note:
#
# install libgandiva-dev for workaround for https://issues.apache.org/jira/browse/ARROW-10495
#
# that affects arrow-2.0.0
sudo apt update -y
sudo apt install -y ca-certificates \
ccache \
cmake \
libboost-all-dev \
libbrotli-dev \
libbz2-dev \
libcurl4-openssl-dev \
libgflags-dev \
libgoogle-glog-dev \
libgrpc-dev \
libgrpc++-dev \
liblz4-dev \
libmpich-dev \
libprotobuf-dev \
librdkafka-dev \
libre2-dev \
libsnappy-dev \
libssl-dev \
libunwind-dev \
librdkafka-dev \
libutf8proc-dev \
libz-dev \
libzstd-dev \
lsb-release \
protobuf-compiler-grpc \
python3-pip \
wget
# install apache-arrow
wget https://apache.jfrog.io/artifactory/arrow/$(lsb_release --id --short | tr 'A-Z' 'a-z')/apache-arrow-apt-source-latest-$(lsb_release --codename --short).deb
sudo apt install -y -V ./apache-arrow-apt-source-latest-$(lsb_release --codename --short).deb
sudo apt update
sudo apt install -y libarrow-dev=${{ matrix.arrow }}
# avoid possible permission errors
ccache -o cache_dir=~/.ccache
sudo mkdir -p ~/.ccache
sudo chmod -R a+wrx ~/.ccache
# install python packages for codegen
sudo pip3 install -U pip
sudo pip3 install libclang parsec setuptools wheel twine
- name: Install Dependencies for MacOS
if: runner.os == 'macOS'
run: |
function install_or_upgrade {
if brew ls --versions "$1" >/dev/null; then
HOMEBREW_NO_AUTO_UPDATE=1 brew upgrade "$1"
else
HOMEBREW_NO_AUTO_UPDATE=1 brew install "$1"
fi
}
brew update
for dep in apache-arrow boost ccache cmake gflags glog googletest grpc librdkafka libunwind-headers llvm open-mpi openssl protobuf; do
install_or_upgrade $dep || true;
done
# install python packages for codegen
python3 -m pip install -U pip
python3 -m pip install libclang parsec setuptools wheel
/usr/local/bin/python3 -m pip install -U pip
/usr/local/bin/python3 -m pip install libclang parsec setuptools wheel
- name: Setup tmate session
if: false
uses: mxschmitt/action-tmate@v3
- name: CMake
run: |
export PATH=/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH
# set LLVM clang/clang++ on MacOS
export PATH=/opt/homebrew/opt/llvm/bin:/usr/local/opt/llvm/bin:$PATH
if [[ "$OSTYPE" == "darwin"* ]];
then
export CC=$(brew --prefix llvm)/bin/clang
export CXX=$(brew --prefix llvm)/bin/clang++
fi;
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release \
-DBUILD_SHARED_LIBS=ON \
-DBUILD_VINEYARD_COVERAGE=ON \
-DBUILD_VINEYARD_PYTHON_BINDINGS=ON \
-DBUILD_VINEYARD_BASIC=ON \
-DBUILD_VINEYARD_IO=ON \
-DBUILD_VINEYARD_IO_KAFKA=ON \
-DBUILD_VINEYARD_HOSSEINMOEIN_DATAFRAME=ON \
-DBUILD_VINEYARD_TESTS=ON
- name: Build
run: |
# set LLVM clang/clang++ on MacOS
export PATH=/opt/homebrew/opt/llvm/bin:/usr/local/opt/llvm/bin:$PATH
if [[ "$OSTYPE" == "darwin"* ]];
then
export CC=$(brew --prefix llvm)/bin/clang
export CXX=$(brew --prefix llvm)/bin/clang++
fi;
pushd build
make -j`nproc`
make vineyard_tests -j`nproc`
make vineyard_client_python -j`nproc`
make ccache-stats
sudo make install
popd
# build & install vineyard for python
python3 setup.py bdist_wheel
# the installation may fail on MacOS 11 on CI with `sudo pip3 install`
sudo pip3 install dist/*.whl -U || true