Skip to content

Commit 1bf05c3

Browse files
authored
chore(ci): adjust build & test workflows (#17213)
1 parent 976858c commit 1bf05c3

File tree

40 files changed

+113
-427
lines changed

40 files changed

+113
-427
lines changed

.github/actions/build_linux/action.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,11 +69,12 @@ runs:
6969
shell: bash
7070
run: |
7171
artifacts="meta,metactl,metabench,query,sqllogictests"
72+
binaries=""
7273
for artifact in ${artifacts//,/ }; do
73-
echo "==> building databend-$artifact ..."
74-
cargo -Zgitoxide=fetch -Zgit=shallow-index,shallow-deps build --target ${{ inputs.target }} --features ${{ inputs.features }} --profile ${{ env.BUILD_PROFILE }} --bin databend-$artifact
74+
binaries="${binaries} --bin databend-$artifact"
7575
done
76-
ls -lh ./target/${{ inputs.target }}/${{ env.BUILD_PROFILE }}/databend-$artifact
76+
cargo -Zgitoxide=fetch -Zgit=shallow-index,shallow-deps build --target ${{ inputs.target }} --features ${{ inputs.features }} --profile ${{ env.BUILD_PROFILE }} ${binaries}
77+
ls -lh ./target/${{ inputs.target }}/${{ env.BUILD_PROFILE }}/databend-*
7778
7879
- name: Build Release for specific artifacts
7980
if: inputs.artifacts != 'all'
@@ -83,8 +84,8 @@ runs:
8384
for artifact in ${artifacts//,/ }; do
8485
echo "==> building databend-$artifact ..."
8586
cargo -Zgitoxide=fetch -Zgit=shallow-index,shallow-deps build --target ${{ inputs.target }} --features ${{ inputs.features }} --profile ${{ env.BUILD_PROFILE }} --bin databend-$artifact
87+
ls -lh ./target/${{ inputs.target }}/${{ env.BUILD_PROFILE }}/databend-$artifact
8688
done
87-
ls -lh ./target/${{ inputs.target }}/${{ env.BUILD_PROFILE }}/databend-$artifact
8889
8990
- name: Check Binary Info
9091
shell: bash

.github/actions/setup_build_tool/action.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,12 @@ runs:
3838
EOF
3939
4040
RUNNER_PROVIDER="${RUNNER_PROVIDER:-github}"
41-
export SCCACHE_IDLE_TIMEOUT=0
4241
case ${RUNNER_PROVIDER} in
4342
aws)
4443
echo "setting up sccache for AWS S3..."
4544
cat <<EOF >>$BIN_LOCAL/build-tool
4645
export ENABLE_SCCACHE=true
46+
export SCCACHE_IDLE_TIMEOUT=0
4747
export SCCACHE_BUCKET=databend-ci
4848
export SCCACHE_REGION=us-east-2
4949
export SCCACHE_S3_KEY_PREFIX="cache/sccache/"
@@ -57,6 +57,7 @@ runs:
5757
echo "setting up sccache for Google Cloud Storage..."
5858
cat <<EOF >>$BIN_LOCAL/build-tool
5959
export ENABLE_SCCACHE=true
60+
export SCCACHE_IDLE_TIMEOUT=0
6061
export SCCACHE_GCS_RW_MODE=READ_WRITE
6162
export SCCACHE_GCS_BUCKET=databend-ci
6263
export SCCACHE_GCS_KEY_PREFIX="cache/sccache/"
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: "Setup For GNU Test"
2+
description: "Setup For GNU Test"
3+
inputs:
4+
path:
5+
description: "default to ./target/${BUILD_PROFILE}/"
6+
required: false
7+
default: ""
8+
artifacts:
9+
description: "Artifacts to download, only works with s3/gcs"
10+
required: false
11+
default: "meta,query"
12+
runs:
13+
using: "composite"
14+
steps:
15+
- id: target
16+
shell: bash
17+
run: |
18+
arch=$(uname -m)
19+
target="${arch}-unknown-linux-gnu"
20+
echo "target=${target}" >> $GITHUB_OUTPUT
21+
22+
- uses: ./.github/actions/setup_bendsql
23+
24+
- uses: ./.github/actions/artifact_download
25+
with:
26+
sha: ${{ github.sha }}
27+
target: ${{ steps.target.outputs.target }}
28+
category: full
29+
artifacts: ${{ inputs.artifacts }}
30+
path: ${{ inputs.path }}
31+
32+
- uses: actions/setup-python@v5
33+
with:
34+
python-version: "3.12"
35+
36+
- uses: actions/setup-java@v4
37+
with:
38+
distribution: temurin
39+
java-version: "11"
40+
41+
- name: setup java env
42+
shell: bash
43+
run: |
44+
echo "LD_LIBRARY_PATH=${{ env.JAVA_HOME }}/lib/server:${{ env.LD_LIBRARY_PATH }}" >> $GITHUB_ENV

.github/actions/test_cloud_sqllogic_standalone_linux/action.yml

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
name: "Test cloud control sqllogic Standalone"
22
description: "Running cloud control sqllogic tests in standalone mode"
33
inputs:
4-
target:
5-
description: ""
6-
required: true
7-
default: "x86_64-unknown-linux-gnu"
84
dirs:
95
description: "logic test suites dirs"
106
required: true
@@ -21,11 +17,8 @@ inputs:
2117
runs:
2218
using: "composite"
2319
steps:
24-
- name: Download artifact
25-
uses: ./.github/actions/artifact_download
20+
- uses: ./.github/actions/setup_test
2621
with:
27-
sha: ${{ github.sha }}
28-
target: ${{ inputs.target }}
2922
artifacts: sqllogictests,meta,query
3023

3124
- name: Run sqllogic Tests with Standalone mode

.github/actions/test_compat_fuse/action.yml

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,10 @@
11
name: "Test fuse-table format in an old query is compatible with new query"
22
description: "Download old binaries and current binaries, write data with old query, read data with new query"
3-
inputs:
4-
target:
5-
description: ""
6-
required: true
7-
default: "x86_64-unknown-linux-gnu"
83
runs:
94
using: "composite"
105
steps:
11-
- uses: ./.github/actions/setup_bendsql
12-
- name: Download artifact
13-
uses: ./.github/actions/artifact_download
6+
- uses: ./.github/actions/setup_test
147
with:
15-
sha: ${{ github.sha }}
16-
target: ${{ inputs.target }}
178
path: ./bins/current
189
artifacts: sqllogictests,meta,query
1910

.github/actions/test_compat_meta_meta/action.yml

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,10 @@
11
name: "Test protocol compatibility between databend-meta servers"
22
description: "Download old binaries and current binaries, write some data and then read data"
3-
inputs:
4-
target:
5-
description: ""
6-
required: true
7-
default: "x86_64-unknown-linux-gnu"
83
runs:
94
using: "composite"
105
steps:
11-
- name: Download artifact
12-
uses: ./.github/actions/artifact_download
6+
- uses: ./.github/actions/setup_test
137
with:
14-
sha: ${{ github.sha }}
15-
target: ${{ inputs.target }}
168
path: ./bins/current/bin
179
artifacts: meta,metactl,metabench
1810

.github/actions/test_compat_meta_query/action.yml

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,10 @@
11
name: "Test old metasrv is compatible with new query; new meta is compatible with old query"
22
description: "Download old binaries and current binaries, run stateless test with old `meta` and latest `query`"
3-
inputs:
4-
target:
5-
description: ""
6-
required: true
7-
default: "x86_64-unknown-linux-gnu"
83
runs:
94
using: "composite"
105
steps:
11-
- name: Download artifact
12-
uses: ./.github/actions/artifact_download
6+
- uses: ./.github/actions/setup_test
137
with:
14-
sha: ${{ github.sha }}
15-
target: ${{ inputs.target }}
168
path: ./bins/current
179
artifacts: sqllogictests,meta,query
1810

.github/actions/test_ee_management_mode_linux/action.yml

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,9 @@
11
name: "Test ee management mode"
22
description: "Running stateless tests in management mode"
3-
inputs:
4-
target:
5-
description: ""
6-
required: true
7-
default: "x86_64-unknown-linux-gnu"
83
runs:
94
using: "composite"
105
steps:
11-
- uses: ./.github/actions/setup_bendsql
12-
- name: Download artifact
13-
uses: ./.github/actions/artifact_download
14-
with:
15-
sha: ${{ github.sha }}
16-
target: ${{ inputs.target }}
6+
- uses: ./.github/actions/setup_test
177

188
- name: Run Stateful Tests with Standalone mode
199
shell: bash

.github/actions/test_ee_sqllogic_standalone_linux/action.yml

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
name: "Test ee sqllogic Standalone"
22
description: "Running ee sqllogic tests in standalone mode"
33
inputs:
4-
target:
5-
description: ""
6-
required: true
7-
default: "x86_64-unknown-linux-gnu"
84
dirs:
95
description: "logic test suites dirs"
106
required: true
@@ -21,12 +17,8 @@ inputs:
2117
runs:
2218
using: "composite"
2319
steps:
24-
- uses: ./.github/actions/setup_bendsql
25-
- name: Download artifact
26-
uses: ./.github/actions/artifact_download
20+
- uses: ./.github/actions/setup_test
2721
with:
28-
sha: ${{ github.sha }}
29-
target: ${{ inputs.target }}
3022
artifacts: sqllogictests,meta,query
3123

3224
- name: Run sqllogic Tests with Standalone mode

.github/actions/test_ee_standalone_background_linux/action.yml

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,9 @@
11
name: "Test Enterprise Background Service features Standalone"
22
description: "Running stateless tests in standalone mode"
3-
inputs:
4-
target:
5-
description: ""
6-
required: true
7-
default: "x86_64-unknown-linux-gnu"
83
runs:
94
using: "composite"
105
steps:
11-
- uses: ./.github/actions/setup_bendsql
12-
- name: Download artifact
13-
uses: ./.github/actions/artifact_download
14-
with:
15-
sha: ${{ github.sha }}
16-
target: ${{ inputs.target }}
6+
- uses: ./.github/actions/setup_test
177

188
- name: Minio Setup for (ubuntu-latest only)
199
shell: bash

0 commit comments

Comments
 (0)