@@ -215,6 +215,73 @@ jobs:
215
215
target : ${{ steps.target.outputs.target }}
216
216
repo_role_arn : ${{ secrets.REPO_ROLE_ARN }}
217
217
218
+ publish_hive :
219
+ name : hive assets
220
+ runs-on : [self-hosted, X64, Linux, development]
221
+ needs : [create_release]
222
+ strategy :
223
+ fail-fast : false
224
+ matrix :
225
+ arch :
226
+ - x86_64
227
+ platform :
228
+ - gnu
229
+ steps :
230
+ - name : Checkout
231
+ uses : actions/checkout@v3
232
+ with :
233
+ fetch-depth : 0
234
+ - name : Get the version
235
+ id : get_version
236
+ run : echo "VERSION=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_OUTPUT
237
+ - name : Get target
238
+ id : target
239
+ run : echo 'target=${{ matrix.arch }}-unknown-linux-${{ matrix.platform }}' >> $GITHUB_OUTPUT
240
+ - name : Setup Build Tool
241
+ uses : ./.github/actions/setup_build_tool
242
+ with :
243
+ image : ${{ steps.target.outputs.target }}
244
+ - name : Build Binary
245
+ run : |
246
+ cargo build --release --target=${{ steps.target.outputs.target }} --features hive
247
+ - name : Copyobj zlib for gnu binaries
248
+ if : matrix.platform == 'gnu'
249
+ run : |
250
+ target=${{ steps.target.outputs.target }}
251
+ build-tool /usr/bin/${{ matrix.arch }}-linux-gnu-objcopy --compress-debug-sections=zlib-gnu ./target/${target}/release/databend-query
252
+ build-tool /usr/bin/${{ matrix.arch }}-linux-gnu-objcopy --compress-debug-sections=zlib-gnu ./target/${target}/release/databend-meta
253
+ build-tool /usr/bin/${{ matrix.arch }}-linux-gnu-objcopy --compress-debug-sections=zlib-gnu ./target/${target}/release/databend-metactl
254
+ - name : Pack binaries
255
+ run : |
256
+ target=${{ steps.target.outputs.target }}
257
+ version=${{ needs.create_release.outputs.version }}
258
+ mkdir -p release/${target}/{bin,configs}
259
+ cp ./target/${target}/release/databend-* release/${target}/bin/
260
+ rm -f release/${target}/bin/*.d
261
+ cp ./scripts/ci/deploy/config/databend-query-node-1.toml release/${target}/configs/databend-query.toml
262
+ cp ./scripts/ci/deploy/config/databend-meta-node-1.toml release/${target}/configs/databend-meta.toml
263
+ cp ./.github/actions/publish_binary/databend-release-readme.txt release/${target}/readme.txt
264
+ cp -r ./.github/actions/publish_binary/databend-scripts-for-release release/${target}/scripts
265
+ tar -C ./release/${target} -czvf databend-hive-${version}-${target}.tar.gz bin configs scripts readme.txt
266
+ - name : generate sha256sums
267
+ run : |
268
+ target=${{ steps.target.outputs.target }}
269
+ version=${{ needs.create_release.outputs.version }}
270
+ sha256sum databend-hive-${version}-${target}.tar.gz >> sha256-hive-${version}-${target}.txt
271
+ - name : post sha256
272
+ uses : actions/upload-artifact@v2
273
+ with :
274
+ name : sha256sums
275
+ path : sha256-hive-${{ needs.create_release.outputs.version }}-${{ steps.target.outputs.target }}.txt
276
+ retention-days : 1
277
+ - name : Publish Binaries
278
+ uses : ./.github/actions/publish_binary
279
+ with :
280
+ github_token : ${{ secrets.GITHUB_TOKEN }}
281
+ version : hive-${{ needs.create_release.outputs.version }}
282
+ target : ${{ steps.target.outputs.target }}
283
+ repo_role_arn : ${{ secrets.REPO_ROLE_ARN }}
284
+
218
285
publish_sqllogic_testsuites :
219
286
name : sqllogic testsuites
220
287
runs-on : ubuntu-latest
0 commit comments