Skip to content

Commit 0a90276

Browse files
authored
Merge pull request #9137 from PsiACE/hive-release
ci: try to add hive release
2 parents 59b8eaf + d95ed4b commit 0a90276

File tree

2 files changed

+76
-0
lines changed

2 files changed

+76
-0
lines changed

.github/workflows/databend-release.yml

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,73 @@ jobs:
215215
target: ${{ steps.target.outputs.target }}
216216
repo_role_arn: ${{ secrets.REPO_ROLE_ARN }}
217217

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+
218285
publish_sqllogic_testsuites:
219286
name: sqllogic testsuites
220287
runs-on: ubuntu-latest

.github/workflows/production.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,15 @@ jobs:
6464
target: ${{ matrix.target }}
6565
profile: release
6666

67+
build_hive:
68+
runs-on: [self-hosted, X64, Linux, development]
69+
steps:
70+
- uses: actions/checkout@v3
71+
- uses: ./.github/actions/build_linux_hive
72+
with:
73+
target: x86_64-unknown-linux-gnu
74+
profile: release
75+
6776
test_unit:
6877
timeout-minutes: 30
6978
runs-on: [self-hosted, X64, Linux]

0 commit comments

Comments
 (0)