Skip to content

Commit f9cf4e4

Browse files
committed
z
1 parent 24f3cdd commit f9cf4e4

File tree

3 files changed

+75
-84
lines changed

3 files changed

+75
-84
lines changed

.github/actions/artifact_download/action.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ inputs:
88
description: ""
99
required: true
1010
category:
11-
description: "default/hdfs"
11+
description: "default/hdfs/udf"
1212
required: false
1313
default: default
1414
path:
1515
description: "default to ./target/${BUILD_PROFILE}/"
1616
required: false
1717
default: ""
1818
artifacts:
19-
description: "Artifacts to download, only works with s3"
19+
description: "Artifacts to download, only works with s3/gcs"
2020
required: false
2121
default: "meta,query"
2222
outputs:

.github/workflows/bindings.python.yml

+12-14
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,18 @@
11
name: Bindings Python
22

33
on:
4-
## uncomment it when bendpy is enabled
5-
workflow_dispatch:
6-
# pull_request:
7-
# branches:
8-
# - main
9-
# paths:
10-
# - "src/**"
11-
# - ".github/workflows/bindings.python.yml"
12-
# workflow_call:
13-
# inputs:
14-
# tag:
15-
# description: Tag to release
16-
# required: true
17-
# type: string
4+
pull_request:
5+
branches:
6+
- main
7+
paths:
8+
- "src/**"
9+
- ".github/workflows/bindings.python.yml"
10+
workflow_call:
11+
inputs:
12+
tag:
13+
description: Tag to release
14+
required: true
15+
type: string
1816

1917
concurrency:
2018
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }}

.github/workflows/release.yml

+61-68
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ jobs:
324324
with:
325325
sha: ${{ github.sha }}
326326
target: ${{ matrix.target }}
327-
category: defaulta
327+
category: default
328328
- name: Pack Testsuite
329329
run: |
330330
target=${{ matrix.target }}
@@ -359,22 +359,22 @@ jobs:
359359
uses: actions/checkout@v4
360360
with:
361361
ref: ${{ needs.create_release.outputs.version }}
362-
- name: Download binaries for usage
363-
id: download_binaries
364-
env:
365-
GH_TOKEN: ${{ github.token }}
366-
run: |
367-
version="${{ needs.create_release.outputs.version }}"
368-
declare -A platform_targets=( ["arm64"]="aarch64-unknown-linux-gnu" ["amd64"]="x86_64-unknown-linux-gnu")
369-
mkdir -p ./distro/
370-
for platform in ${!platform_targets[@]}; do
371-
target=${platform_targets[$platform]}
372-
gh release download ${version} --pattern "databend-${version}-${target}.tar.gz" --dir distro/
373-
mkdir -p ./target/${target}/release
374-
tar x -C ./target/${target}/release -f ./distro/databend-${version}-${target}.tar.gz --strip-components 1 bin/
375-
mkdir -p ./distro/linux/${platform}
376-
cp ./target/${target}/release/databend-* ./distro/linux/${platform}
377-
done
362+
- name: Download artifacts for x86_64
363+
uses: ./.github/actions/artifact_download
364+
with:
365+
sha: ${{ github.sha }}
366+
target: x86_64-unknown-linux-gnu
367+
category: udf
368+
artifacts: metactl,meta,query
369+
path: distro/linux/amd64
370+
- name: Download artifacts for aarch64
371+
uses: ./.github/actions/artifact_download
372+
with:
373+
sha: ${{ github.sha }}
374+
target: aarch64-unknown-linux-gnu
375+
category: udf
376+
artifacts: metactl,meta,query
377+
path: distro/linux/arm64
378378
- name: Set up QEMU
379379
uses: docker/setup-qemu-action@v3
380380
- uses: ./.github/actions/setup_docker
@@ -444,22 +444,22 @@ jobs:
444444
uses: actions/checkout@v4
445445
with:
446446
ref: ${{ needs.create_release.outputs.version }}
447-
- name: Download binaries for usage
448-
id: download_binaries
449-
env:
450-
GH_TOKEN: ${{ github.token }}
451-
run: |
452-
version="${{ needs.create_release.outputs.version }}"
453-
declare -A platform_targets=( ["arm64"]="aarch64-unknown-linux-gnu" ["amd64"]="x86_64-unknown-linux-gnu")
454-
mkdir -p ./distro/
455-
for platform in ${!platform_targets[@]}; do
456-
target=${platform_targets[$platform]}
457-
gh release download ${version} --pattern "databend-${version}-${target}.tar.gz" --dir distro/
458-
mkdir -p ./target/${target}/release
459-
tar x -C ./target/${target}/release -f ./distro/databend-${version}-${target}.tar.gz --strip-components 1 bin/
460-
mkdir -p ./distro/linux/${platform}
461-
cp ./target/${target}/release/databend-* ./distro/linux/${platform}
462-
done
447+
- name: Download artifacts for x86_64
448+
uses: ./.github/actions/artifact_download
449+
with:
450+
sha: ${{ github.sha }}
451+
target: x86_64-unknown-linux-gnu
452+
category: udf
453+
artifacts: ${{ matrix.service }}
454+
path: distro/linux/amd64
455+
- name: Download artifacts for aarch64
456+
uses: ./.github/actions/artifact_download
457+
with:
458+
sha: ${{ github.sha }}
459+
target: aarch64-unknown-linux-gnu
460+
category: udf
461+
artifacts: ${{ matrix.service }}
462+
path: distro/linux/arm64
463463
- name: Set up QEMU
464464
uses: docker/setup-qemu-action@v3
465465
- uses: ./.github/actions/setup_docker
@@ -507,7 +507,7 @@ jobs:
507507
file: ./docker/${{ matrix.distro }}/${{ matrix.service }}.Dockerfile
508508

509509
distribution:
510-
runs-on: ubuntu-latest
510+
runs-on: [self-hosted, X64, Linux, 4c8g, gcp]
511511
needs: [create_release, build_default]
512512
strategy:
513513
matrix:
@@ -532,16 +532,14 @@ jobs:
532532
id: target
533533
run: |
534534
echo 'target=${{ matrix.arch }}-unknown-linux-gnu' >> $GITHUB_OUTPUT
535-
- name: Download binaries for usage
536-
id: download_binaries
537-
env:
538-
GH_TOKEN: ${{ github.token }}
539-
run: |
540-
target=${{ steps.target.outputs.target }}
541-
version="${{ needs.create_release.outputs.version }}"
542-
mkdir -p ./distro/
543-
gh release download ${version} --pattern "databend-${version}-${target}.tar.gz" --dir distro/
544-
tar x -C distro -f ./distro/databend-${version}-${target}.tar.gz
535+
- name: Download artifacts
536+
uses: ./.github/actions/artifact_download
537+
with:
538+
sha: ${{ github.sha }}
539+
target: ${{ steps.target.outputs.target }}
540+
category: udf
541+
artifacts: metactl,meta,query
542+
path: distro
545543
- name: Build Packages
546544
id: build_packages
547545
run: |
@@ -587,7 +585,7 @@ jobs:
587585
gpg_signing_key: ${{ secrets.GPG_KEY_DEB }}
588586

589587
sha256sums:
590-
needs: [create_release, linux, distribution]
588+
needs: [create_release, publish, distribution]
591589
runs-on: ubuntu-latest
592590
steps:
593591
- name: checkout
@@ -627,25 +625,20 @@ jobs:
627625
target: all
628626

629627
sqlsmith:
630-
needs: [create_release, linux]
631-
runs-on: ubuntu-latest
628+
needs: [create_release, build_default]
629+
runs-on: [self-hosted, X64, Linux, 4c8g, gcp]
632630
steps:
633631
- uses: actions/checkout@v4
634632
with:
635633
ref: ${{ needs.create_release.outputs.version }}
636-
- name: Download artifact for release
637-
env:
638-
GH_TOKEN: ${{ github.token }}
639-
run: |
640-
version=${{ needs.create_release.outputs.version }}
641-
target=x86_64-unknown-linux-gnu
642-
mkdir -p ./distro/
643-
mkdir -p ./target/release/
644-
gh release download ${version} --pattern "databend-${version}-${target}.tar.gz" --dir distro/
645-
gh release download ${version} --pattern "databend-testsuite-${version}-${target}.tar.gz" --dir distro/
646-
tar x -C ./target/release -f ./distro/databend-${version}-${target}.tar.gz --strip-components 1 bin/
647-
tar x -C ./target/release -f ./distro/databend-testsuite-${version}-${target}.tar.gz --strip-components 1 bin/
648-
chmod +x ./target/release/databend-*
634+
- name: Download artifacts
635+
uses: ./.github/actions/artifact_download
636+
with:
637+
sha: ${{ github.sha }}
638+
target: x86_64-unknown-linux-gnu
639+
category: udf
640+
artifacts: meta,query,sqlsmith
641+
path: distro
649642
- name: Run sqlsmith
650643
timeout-minutes: 60
651644
shell: bash
@@ -657,20 +650,20 @@ jobs:
657650
with:
658651
name: test-sqlsmith
659652

660-
# bindings_python:
661-
# if: inputs.stable
662-
# needs: create_release
663-
# uses: ./.github/workflows/bindings.python.yml
664-
# secrets: inherit
665-
# with:
666-
# tag: ${{ needs.create_release.outputs.version }}
653+
bindings_python:
654+
if: inputs.stable
655+
needs: create_release
656+
uses: ./.github/workflows/bindings.python.yml
657+
secrets: inherit
658+
with:
659+
tag: ${{ needs.create_release.outputs.version }}
667660

668661
notify:
669662
runs-on: ubuntu-latest
670663
if: always()
671664
needs:
672665
- create_release
673-
- linux
666+
- publish
674667
- docker_all_in_one
675668
- docker_service
676669
- distribution

0 commit comments

Comments
 (0)