Skip to content

Commit

Permalink
chore(ci): add build for udf feature (#15682)
Browse files Browse the repository at this point in the history
  • Loading branch information
everpcpc authored May 30, 2024
1 parent 112a1f9 commit 195a552
Show file tree
Hide file tree
Showing 14 changed files with 245 additions and 173 deletions.
4 changes: 2 additions & 2 deletions .github/actions/artifact_download/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ inputs:
description: ""
required: true
category:
description: "default/hdfs"
description: "default/hdfs/udf"
required: false
default: default
path:
description: "default to ./target/${BUILD_PROFILE}/"
required: false
default: ""
artifacts:
description: "Artifacts to download, only works with s3"
description: "Artifacts to download, only works with s3/gcs"
required: false
default: "meta,query"
outputs:
Expand Down
10 changes: 3 additions & 7 deletions .github/actions/build_linux/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ runs:
uses: ./.github/actions/setup_build_tool
with:
target: ${{ inputs.target }}
bypass_env_vars: RUSTFLAGS,RUST_LOG,PYO3_PYTHON,LD_LIBRARY_PATH,PYO3_CROSS_PYTHON_VERSION
bypass_env_vars: RUSTFLAGS,RUST_LOG

- name: Cross setup
if: startsWith(inputs.target, 'aarch64-')
Expand Down Expand Up @@ -61,9 +61,6 @@ runs:
echo "RUSTFLAGS=${flags} -C link-arg=-Wl,--compress-debug-sections=zlib" >> $GITHUB_ENV
target=${{ inputs.target }}
echo "BUILD_ARCH=${target/-unknown-linux-*}" >> $GITHUB_ENV
echo "LD_LIBRARY_PATH=/usr/local/lib" >> $GITHUB_ENV
echo "PYO3_PYTHON=python3.12" >> $GITHUB_ENV
echo "PYO3_CROSS_PYTHON_VERSION=/3.12" >> $GITHUB_ENV
# build all binaries for debug
- name: Build Debug
Expand Down Expand Up @@ -113,10 +110,9 @@ runs:
- name: Check Binary Info
shell: bash
continue-on-error: true
run: |
readelf -p .comment ./target/${{ inputs.target }}/${{ env.BUILD_PROFILE }}/databend-query
ldd ./target/${{ inputs.target }}/${{ env.BUILD_PROFILE }}/databend-query
readelf -p .comment ./target/${{ inputs.target }}/${{ env.BUILD_PROFILE }}/databend-query || true
ldd ./target/${{ inputs.target }}/${{ env.BUILD_PROFILE }}/databend-query || true
# - name: Compress Binaries with UPX
# if: env.BUILD_PROFILE == 'debug'
Expand Down
10 changes: 1 addition & 9 deletions .github/actions/build_linux_sanitizer/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ runs:
uses: ./.github/actions/setup_build_tool
with:
target: ${{ inputs.target }}
bypass_env_vars: RUSTFLAGS,RUST_LOG,PYO3_PYTHON,LD_LIBRARY_PATH
bypass_env_vars: RUSTFLAGS,RUST_LOG

- name: Cross setup
if: startsWith(inputs.target, 'aarch64-')
Expand Down Expand Up @@ -56,11 +56,3 @@ runs:
cargo -Zbuild-std -Zgitoxide=fetch -Zgit=shallow-index,shallow-deps build --target ${{ inputs.target }} --features ${{ inputs.features }} --manifest-path src/binaries/Cargo.toml --bin databend-$artifact
done
ls -lh ./target/${{ inputs.target }}/${{ env.BUILD_PROFILE }}/databend-*
- name: Check Binary Info
if: env.BUILD_PROFILE == 'debug' && endsWith(inputs.target, '-gnu')
shell: bash
continue-on-error: true
run: |
readelf -p .comment ./target/${{ inputs.target }}/${{ env.BUILD_PROFILE }}/databend-query
ldd ./target/${{ inputs.target }}/${{ env.BUILD_PROFILE }}/databend-query
2 changes: 1 addition & 1 deletion .github/actions/check/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ runs:
- name: Setup Build Tool
uses: ./.github/actions/setup_build_tool
with:
bypass_env_vars: RUSTFLAGS,RUST_LOG,GITHUB_TOKEN,PYO3_PYTHON,LD_LIBRARY_PATH
bypass_env_vars: RUSTFLAGS,RUST_LOG,GITHUB_TOKEN

- name: Check Apache License Header
uses: korandoru/hawkeye@v2
Expand Down
5 changes: 4 additions & 1 deletion .github/actions/publish_binary/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ inputs:
description: "Release target"
required: true
category:
description: "Release default/hdfs/testsuite"
description: "Release default/hdfs/udf/testsuite"
required: false
default: default

Expand All @@ -26,6 +26,9 @@ runs:
hdfs)
publish_name="databend-hdfs-${{ inputs.version }}-${{ inputs.target }}"
;;
udf )
publish_name="databend-udf-${{ inputs.version }}-${{ inputs.target }}"
;;
testsuite)
publish_name="databend-testsuite-${{ inputs.version }}-${{ inputs.target }}"
;;
Expand Down
5 changes: 1 addition & 4 deletions .github/actions/setup_build_tool/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ inputs:
bypass_env_vars:
description: "Environment variables bypass to docker container"
required: false
default: RUSTFLAGS,RUST_LOG,PYO3_PYTHON,LD_LIBRARY_PATH
default: RUSTFLAGS,RUST_LOG
runs:
using: "composite"
steps:
Expand All @@ -28,9 +28,6 @@ runs:
cat <<EOF >$BIN_LOCAL/build-tool
#!/bin/bash
script_name=\$(basename "\$0")
export PYO3_PYTHON=python3.12
export LD_LIBRARY_PATH=/usr/local/lib
export PYO3_CROSS_PYTHON_VERSION=3.12
export INTERACTIVE=false
export TARGET=${{ inputs.target }}
export CARGO_INCREMENTAL=0
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/test_unit/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ runs:
- name: Setup Build Tool
uses: ./.github/actions/setup_build_tool
with:
bypass_env_vars: RUSTFLAGS,RUSTDOCFLAGS,RUST_TEST_THREADS,RUST_LOG,RUST_BACKTRACE,PYO3_PYTHON,LD_LIBRARY_PATH
bypass_env_vars: RUSTFLAGS,RUSTDOCFLAGS,RUST_TEST_THREADS,RUST_LOG,RUST_BACKTRACE

- shell: bash
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cancel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Cancel workflow runs for the PR
uses: actions/github-script@v6
uses: actions/github-script@v7
with:
github-token: ${{ github.token }}
script: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ jobs:
- linux_hive
steps:
- name: Check Ready to Merge
uses: actions/github-script@v6
uses: actions/github-script@v7
env:
SRC_CHANGED: ${{ needs.changes.outputs.any_src_changed }}
LINUX_BUILD_RESULT: ${{ needs.linux.result }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ jobs:
- linux
steps:
- name: Check Ready to Merge
uses: actions/github-script@v6
uses: actions/github-script@v7
env:
SRC_CHANGED: ${{ needs.changes.outputs.any_src_changed }}
LINUX_BUILD_RESULT: ${{ needs.linux.result }}
Expand Down
Loading

0 comments on commit 195a552

Please sign in to comment.