forked from unum-cloud/ustore
-
Notifications
You must be signed in to change notification settings - Fork 0
206 lines (172 loc) · 6.48 KB
/
prerelease.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
name: Pre-Release
on:
push:
branches: ["main-dev"]
workflow_dispatch: {}
env:
GH_TOKEN: ${{ secrets.SEMANTIC_RELEASE_TOKEN }}
BUILD_TYPE: Release
jobs:
versioning:
name: Semantic Release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
persist-credentials: false
ref: 'main-dev'
- uses: actions/setup-node@v3
- run: cp .github/workflows/package.json . && npm install && npx semantic-release
build_ustore_amd64:
name: Build Libraries on AMD
runs-on: ubuntu-latest
if: ${{ github.event_name == 'push' }}
steps:
- uses: actions/checkout@v3
with:
persist-credentials: false
ref: 'main-dev'
- run: git submodule update --init --recursive
- name: Prepare CMake, Conan and PyArrow
run: python -m pip install --force-reinstall numpy pyarrow cmake conan==1.60.1
- name: Install Conan dependencies
run: |
last_tag=$(curl https://api.github.com/repos/unum-cloud/ustore-deps/releases/latest | grep -i 'tag_name' | awk -F '\"' '{print $4}')
wget -q https://github.com/unum-cloud/ustore-deps/releases/download/"$last_tag"/ustore_deps_x86_linux.tar.gz
conan profile new --detect default
conan profile update settings.compiler.libcxx=libstdc++11 default
tar -xzf ./ustore_deps_x86_linux.tar.gz -C ~/.conan
package_version=$(ls ~/.conan/data/ustore_deps/)
conan install ustore_deps/"$package_version"@unum/x86_linux -g cmake -s compiler.version=11
rm -rf ./ustore_deps_x86_linux.tar.gz
- name: Configure CMake
run: |
cmake -DCMAKE_BUILD_TYPE="$BUILD_TYPE" \
-DUSTORE_BUILD_ENGINE_UCSET=1 \
-DUSTORE_BUILD_ENGINE_LEVELDB=1 \
-DUSTORE_BUILD_ENGINE_ROCKSDB=1 \
-DUSTORE_BUILD_API_FLIGHT=1 \
-DUSTORE_BUILD_TESTS=1 \
-DUSE_CONAN=1 \
-B ./build_release .
- name: Build
run: make -j 4 -C ./build_release
- name: Upload Binaries
uses: actions/[email protected]
with:
name: binaries
path: build_release/build/bin/*
test_ustore_amd64:
name: Test Libraries on AMD
runs-on: ubuntu-latest
needs: build_ustore_amd64
steps:
- uses: actions/checkout@v3
with:
persist-credentials: false
ref: 'main-dev'
- name: Download a Build Artifact
uses: actions/[email protected]
with:
name: binaries
- name: Change permissions
run: chmod +x /home/runner/work/ustore/ustore/*
- name: Run embeded tests
run: |
mkdir -p ./tmp/ustore/
export USTORE_TEST_PATH="./tmp/"
for test in $(ls /home/runner/work/ustore/ustore/*test_units_ustore_embedded*); do
echo -e "------ \e[93mRunning $test\e[0m ------"
timeout -v --kill-after=5 300 $test
done
- name: Run Arrow Flight tests
run: /home/runner/work/ustore/ustore/test_units_ustore_flight_client
build_test_ustore_arm64:
name: Build and Test Libraries on ARM
runs-on: ubuntu-latest
if: ${{ github.event_name == 'workflow_dispatch' }}
steps:
- name: Checkout
uses: actions/checkout@v3
with:
persist-credentials: false
ref: 'main-dev'
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
with:
platforms: 'arm64'
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
with:
platforms: linux/arm64
- name: Build and Test in ARM
run: |
export version=$(cat VERSION)
sed -i 's/make -j32/make -j4/' ./Dockerfile
docker buildx create --use
docker buildx build \
--platform "linux/arm64" \
--build-arg version=$version \
--build-arg TEST_USTORE="True" \
--file ./Dockerfile \
--tag unum/ustore:latest \
--load .
build_and_test_python:
name: Build and Test Python ${{ matrix.python }} on ${{ matrix.arch }}
runs-on: ubuntu-latest
if: ${{ github.event_name == 'workflow_dispatch' }}
strategy:
matrix:
arch: ["x86_64", "aarch64"]
python: ["cp39-*", "cp310-*"]
steps:
- uses: actions/checkout@v3
with:
persist-credentials: false
ref: 'main-dev'
- name: Prepare CMake, Conan and PyArrow
run: python -m pip install --force-reinstall numpy pyarrow cmake conan==1.60.1
- name: Set up QEMU
if: runner.os == 'Linux'
uses: docker/setup-qemu-action@v2
with:
platforms: 'arm64,amd64'
- name: Build wheel
run: |
pip install cibuildwheel twine
CIBW_BUILD=${{ matrix.python }} cibuildwheel --platform linux
env:
CIBW_ARCHS_LINUX: ${{ matrix.arch }}
build_and_test_java:
name: Build and Test Java on AMD
runs-on: ubuntu-latest
if: ${{ github.event_name == 'workflow_dispatch' }}
steps:
- name: Checkout
uses: actions/checkout@v3
with:
persist-credentials: false
ref: 'main-dev'
- name: Prepare CMake, Conan and PyArrow
run: python -m pip install --force-reinstall numpy pyarrow cmake conan==1.60.1
- name: Install JDK
run: |
sudo apt update
sudo apt install default-jdk -y
- name: Install Conan dependencies
run: |
last_tag=$(curl https://api.github.com/repos/unum-cloud/ustore-deps/releases/latest | grep -i 'tag_name' | awk -F '\"' '{print $4}')
wget -q https://github.com/unum-cloud/ustore-deps/releases/download/"$last_tag"/ustore_deps_x86_linux.tar.gz
conan profile new --detect default
conan profile update settings.compiler.libcxx=libstdc++11 default
tar -xzf ./ustore_deps_x86_linux.tar.gz -C ~/.conan
package_version=$(ls ~/.conan/data/ustore_deps/)
conan install ustore_deps/"$package_version"@unum/x86_linux -g cmake -s compiler.version=11
rm -rf ./ustore_deps_x86_linux.tar.gz
- name: Test Java
run: |
mkdir -p ./tmp
export USTORE_TEST_PATH="./tmp/"
sed -i 's/make -j/make -j4/' /home/runner/work/ustore/ustore/java/pack.sh
export JAVA_HOME="/usr/lib/jvm/java-11-openjdk-amd64"
bash /home/runner/work/ustore/ustore/java/pack.sh