-
Notifications
You must be signed in to change notification settings - Fork 752
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(query): spilt binary symbol (#16861)
* chore(query): spilt binary symbol * chore(query): spilt binary symbol * chore(query): spilt binary symbol * chore(query): spilt binary symbol * chore(query): spilt binary symbol * chore(query): spilt binary symbol * chore(query): spilt binary symbol * chore(query): spilt binary symbol * chore(query): spilt binary symbol * chore(query): spilt binary symbol * Update action.yml * chore(query): spilt binary symbol * chore(query): spilt binary symbol * chore(query): spilt binary symbol * chore(query): spilt binary symbol * chore(query): spilt binary symbol * chore(query): spilt binary symbol * chore(query): spilt binary symbol * chore(query): spilt binary symbol * chore(query): spilt binary symbol * chore(query): spilt binary symbol * chore(query): spilt binary symbol * chore(query): spilt binary symbol * chore(query): spilt binary symbol * chore(query): spilt binary symbol * chore(query): spilt binary symbol * chore(query): spilt binary symbol * chore(query): spilt binary symbol * chore(query): spilt binary symbol * chore(query): spilt binary symbol
- Loading branch information
Showing
7 changed files
with
252 additions
and
80 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
name: "Pack Binary" | ||
description: "Pack releases binaries" | ||
inputs: | ||
target: | ||
description: "Release target" | ||
required: true | ||
category: | ||
description: "Release default/hdfs/udf/testsuite" | ||
required: false | ||
default: default | ||
version: | ||
description: "Release version" | ||
required: true | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Download artifact | ||
uses: ./.github/actions/artifact_download | ||
with: | ||
sha: ${{ github.sha }} | ||
target: ${{ inputs.target }} | ||
category: ${{ inputs.category }} | ||
path: distro/bin | ||
artifacts: metactl,meta,query,query.debug | ||
- name: Pack Binaries | ||
id: pack_binaries | ||
shell: bash | ||
run: | | ||
target=${{ inputs.target }} | ||
version=${{ inputs.version }} | ||
case ${{ inputs.category }} in | ||
default) | ||
pkg_name="databend-${version}-${target}" | ||
;; | ||
*) | ||
pkg_name="databend-${{ inputs.category }}-${version}-${target}" | ||
;; | ||
esac | ||
mkdir -p distro/{bin,configs,systemd,scripts} | ||
cp ./scripts/distribution/systemd/databend-* distro/systemd/ | ||
cp ./scripts/distribution/configs/databend-* distro/configs/ | ||
cp ./scripts/distribution/release-readme.txt distro/readme.txt | ||
cp -r ./scripts/distribution/local-scripts/* distro/scripts/ | ||
cp -r ./scripts/distribution/package-scripts/* distro/scripts/ | ||
tar -C ./distro --exclude='*.debug' -czvf ${pkg_name}.tar.gz bin configs systemd scripts readme.txt | ||
sha256sum ${pkg_name}.tar.gz >> sha256-${pkg_name}.txt | ||
echo "pkg_name=$pkg_name" >> $GITHUB_OUTPUT | ||
- name: post sha256 | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: sha256sums-${{ inputs.category }}-${{ inputs.target }} | ||
path: sha256-${{ steps.pack_binaries.outputs.pkg_name }}.txt | ||
retention-days: 1 | ||
- name: post binaries | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: ${{ steps.pack_binaries.outputs.pkg_name }}.tar.gz | ||
path: ${{ steps.pack_binaries.outputs.pkg_name }}.tar.gz | ||
retention-days: 1 | ||
- name: Pack DBG Binaries | ||
id: pack_dbg_binaries | ||
shell: bash | ||
run: | | ||
target=${{ inputs.target }} | ||
version=${{ inputs.version }} | ||
case ${{ inputs.category }} in | ||
default) | ||
pkg_name="databend-${version}-${target}-dbg" | ||
;; | ||
*) | ||
pkg_name="databend-${{ inputs.category }}-${version}-${target}-dbg" | ||
;; | ||
esac | ||
mkdir -p distro/{bin,configs,systemd,scripts} | ||
cp ./scripts/distribution/systemd/databend-* distro/systemd/ | ||
cp ./scripts/distribution/configs/databend-* distro/configs/ | ||
cp ./scripts/distribution/release-readme.txt distro/readme.txt | ||
cp -r ./scripts/distribution/local-scripts/* distro/scripts/ | ||
cp -r ./scripts/distribution/package-scripts/* distro/scripts/ | ||
tar -C ./distro -czvf ${pkg_name}.tar.gz bin configs systemd scripts readme.txt | ||
sha256sum ${pkg_name}.tar.gz >> sha256-${pkg_name}.txt | ||
echo "pkg_name=$pkg_name" >> $GITHUB_OUTPUT | ||
- name: post dbg sha256 | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: sha256sums-${{ inputs.category }}-${{ inputs.target }}-gdb | ||
path: sha256-${{ steps.pack_dbg_binaries.outputs.pkg_name }}.txt | ||
retention-days: 1 | ||
- name: post dbg binaries | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: ${{ steps.pack_dbg_binaries.outputs.pkg_name }}.tar.gz | ||
path: ${{ steps.pack_dbg_binaries.outputs.pkg_name }}.tar.gz | ||
retention-days: 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
name: "Pack Deb" | ||
description: "Pack releases deb" | ||
inputs: | ||
arch: | ||
description: "Release arch" | ||
required: true | ||
packager: | ||
description: "Release default/hdfs/udf/testsuite" | ||
required: false | ||
default: default | ||
version: | ||
description: "Release version" | ||
required: true | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Install nfpm@latest | ||
shell: bash | ||
run: | | ||
curl -sSLo nfpm.tar.gz https://github.com/goreleaser/nfpm/releases/download/v2.26.0/nfpm_2.26.0_Linux_x86_64.tar.gz | ||
tar xf nfpm.tar.gz | ||
sudo mv nfpm /usr/local/bin | ||
sudo chmod a+x /usr/local/bin/nfpm | ||
rm nfpm.tar.gz | ||
- name: Get target | ||
id: target | ||
shell: bash | ||
run: | | ||
echo 'target=${{ inputs.arch }}-unknown-linux-gnu' >> $GITHUB_OUTPUT | ||
- name: Download artifacts | ||
uses: ./.github/actions/artifact_download | ||
with: | ||
sha: ${{ github.sha }} | ||
target: ${{ steps.target.outputs.target }} | ||
category: default | ||
artifacts: metactl,meta,query,query.debug | ||
path: distro/bin | ||
- name: Build Packages | ||
shell: bash | ||
id: build_packages | ||
run: | | ||
export name="databend" | ||
export version="${{ inputs.version }}" | ||
export path="distro" | ||
case "${{ inputs.arch }}" in | ||
x86_64) | ||
export arch="amd64" | ||
;; | ||
aarch64) | ||
export arch="arm64" | ||
;; | ||
esac | ||
deb_version=${version/-/.} | ||
pkg_name="databend_${deb_version/v/}_${{ inputs.arch }}.${{ inputs.packager }}" | ||
mkdir -p distro/{bin,configs,systemd,scripts} | ||
cp ./scripts/distribution/systemd/databend-* distro/systemd/ | ||
cp ./scripts/distribution/configs/databend-* distro/configs/ | ||
cp ./scripts/distribution/release-readme.txt distro/readme.txt | ||
cp -r ./scripts/distribution/local-scripts/* distro/scripts/ | ||
cp -r ./scripts/distribution/package-scripts/* distro/scripts/ | ||
nfpm pkg --packager ${{ inputs.packager }} -t "$pkg_name" -f <(envsubst '${name} ${version} ${path} ${arch}' < scripts/distribution/nfpm.yaml) | ||
echo "pkg_name=$pkg_name" >> $GITHUB_OUTPUT | ||
- name: Build dbg Packages | ||
shell: bash | ||
id: build_dbg_packages | ||
run: | | ||
export name="databend_dbg" | ||
export version="${{ inputs.version }}" | ||
export path="distro" | ||
case "${{ inputs.arch }}" in | ||
x86_64) | ||
export arch="amd64" | ||
;; | ||
aarch64) | ||
export arch="arm64" | ||
;; | ||
esac | ||
deb_version=${version/-/.} | ||
pkg_name="databend_${deb_version/v/}_${{ inputs.arch }}_dbg.${{ inputs.packager }}" | ||
nfpm pkg --packager ${{ inputs.packager }} -t "$pkg_name" -f <(envsubst '${name} ${version} ${path} ${arch}' < scripts/distribution/nfpm-dbg.yaml) | ||
echo "pkg_name=$pkg_name" >> $GITHUB_OUTPUT | ||
- name: Update release to github | ||
shell: bash | ||
env: | ||
GH_TOKEN: ${{ github.token }} | ||
# Reference: https://cli.github.com/manual/gh_release_upload | ||
run: | | ||
version="${{ inputs.version }}" | ||
# name looks like: `databend_0.8.144~nightly_amd64.deb` | ||
gh release upload ${version} ${{ steps.build_packages.outputs.pkg_name }} --clobber | ||
gh release upload ${version} ${{ steps.build_dbg_packages.outputs.pkg_name }} --clobber |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
name: "${name}" | ||
arch: "${arch}" | ||
platform: "linux" | ||
version: "${version}" | ||
section: "database" | ||
priority: "extra" | ||
maintainer: "Databend Authors <[email protected]>" | ||
description: | | ||
Databend is a powerful cloud data warehouse. Built for elasticity and efficiency. | ||
Free and open. Also available in the cloud: https://app.databend.com | ||
vendor: "Datafuse Labs" | ||
homepage: "https://databend.com" | ||
license: "Apache-2.0" | ||
contents: | ||
# Binaries | ||
- src: ${path}/bin/databend-query.debug | ||
dst: /usr/bin/databend-query.debug |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters