Skip to content

Commit f9a004d

Browse files
everpcpcsundy-li
andauthored
chore(ci): separate build profile (#16855)
* z * z * z * z * z * z * Update mutable.rs --------- Co-authored-by: sundyli <[email protected]>
1 parent 182b744 commit f9a004d

File tree

7 files changed

+19
-56
lines changed

7 files changed

+19
-56
lines changed

.github/actions/build_linux/action.yml

Lines changed: 4 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -64,49 +64,25 @@ runs:
6464
target=${{ inputs.target }}
6565
echo "BUILD_ARCH=${target/-unknown-linux-*}" >> $GITHUB_ENV
6666
67-
# build all binaries for debug
68-
- name: Build Debug
69-
if: env.BUILD_PROFILE == 'debug' && inputs.artifacts == 'all'
70-
shell: bash
71-
run: |
72-
artifacts="meta,metactl,metabench,query,sqllogictests"
73-
for artifact in ${artifacts//,/ }; do
74-
echo "==> building databend-$artifact ..."
75-
cargo -Zgitoxide=fetch -Zgit=shallow-index,shallow-deps build --target ${{ inputs.target }} --features ${{ inputs.features }} --bin databend-$artifact
76-
done
77-
cargo -Zgitoxide=fetch -Zgit=shallow-index,shallow-deps build --target ${{ inputs.target }} --features ${{ inputs.features }}
78-
ls -lh ./target/${{ inputs.target }}/${{ env.BUILD_PROFILE }}/databend-*
79-
80-
- name: Build Debug for specific artifacts
81-
if: env.BUILD_PROFILE == 'debug' && inputs.artifacts != 'all'
82-
shell: bash
83-
run: |
84-
artifacts="${{ inputs.artifacts }}"
85-
for artifact in ${artifacts//,/ }; do
86-
echo "==> building databend-$artifact ..."
87-
cargo -Zgitoxide=fetch -Zgit=shallow-index,shallow-deps build --target ${{ inputs.target }} --features ${{ inputs.features }} --bin databend-$artifact
88-
done
89-
ls -lh ./target/${{ inputs.target }}/${{ env.BUILD_PROFILE }}/databend-$artifact
90-
9167
- name: Build Release
92-
if: env.BUILD_PROFILE == 'release' && inputs.artifacts == 'all'
68+
if: inputs.artifacts == 'all'
9369
shell: bash
9470
run: |
9571
artifacts="meta,metactl,metabench,query,sqllogictests"
9672
for artifact in ${artifacts//,/ }; do
9773
echo "==> building databend-$artifact ..."
98-
cargo -Zgitoxide=fetch -Zgit=shallow-index,shallow-deps build --target ${{ inputs.target }} --features ${{ inputs.features }} --release --bin 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
9975
done
10076
ls -lh ./target/${{ inputs.target }}/${{ env.BUILD_PROFILE }}/databend-$artifact
10177
10278
- name: Build Release for specific artifacts
103-
if: env.BUILD_PROFILE == 'release' && inputs.artifacts != 'all'
79+
if: inputs.artifacts != 'all'
10480
shell: bash
10581
run: |
10682
artifacts="${{ inputs.artifacts }}"
10783
for artifact in ${artifacts//,/ }; do
10884
echo "==> building databend-$artifact ..."
109-
cargo -Zgitoxide=fetch -Zgit=shallow-index,shallow-deps build --target ${{ inputs.target }} --features ${{ inputs.features }} --release --bin databend-$artifact
85+
cargo -Zgitoxide=fetch -Zgit=shallow-index,shallow-deps build --target ${{ inputs.target }} --features ${{ inputs.features }} --profile ${{ env.BUILD_PROFILE }} --bin databend-$artifact
11086
done
11187
ls -lh ./target/${{ inputs.target }}/${{ env.BUILD_PROFILE }}/databend-$artifact
11288

.github/actions/build_macos/action.yml

Lines changed: 3 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ runs:
3232
echo "JEMALLOC_SYS_WITH_LG_PAGE=14" >> $GITHUB_ENV
3333
echo "JEMALLOC_SYS_WITH_MALLOC_CONF=oversize_threshold:0,dirty_decay_ms:5000,muzzy_decay_ms:5000" >> $GITHUB_ENV
3434
35-
3635
- name: Setup build env
3736
shell: bash
3837
run: |
@@ -41,33 +40,15 @@ runs:
4140
echo "SCCACHE_GHA_ENABLED=true" >> $GITHUB_ENV
4241
echo "RUSTC_WRAPPER=sccache" >> $GITHUB_ENV
4342
44-
- name: Build Debug for all artifacts
45-
if: env.BUILD_PROFILE == 'debug' && inputs.artifacts == 'all'
46-
shell: bash
47-
run: cargo -Zgitoxide=fetch -Zgit=shallow-index,shallow-deps build --target ${{ inputs.target }}
48-
49-
- name: Build Debug for specific artifacts
50-
if: env.BUILD_PROFILE == 'debug' && inputs.artifacts != 'all'
51-
shell: bash
52-
run: |
53-
artifacts="${{ inputs.artifacts }}"
54-
echo "==> building libs ..."
55-
cargo -Zgitoxide=fetch -Zgit=shallow-index,shallow-deps build --target ${{ inputs.target }} --lib
56-
for artifact in ${artifacts//,/ }; do
57-
echo "==> building databend-$artifact ..."
58-
cargo -Zgitoxide=fetch -Zgit=shallow-index,shallow-deps build --target ${{ inputs.target }} --bin databend-$artifact
59-
done
60-
61-
- name: Build Release
62-
if: env.BUILD_PROFILE == 'release'
43+
- name: Build
6344
shell: bash
6445
run: |
6546
artifacts="${{ inputs.artifacts }}"
6647
echo "==> building libs ..."
67-
cargo -Zgitoxide=fetch -Zgit=shallow-index,shallow-deps build --target ${{ inputs.target }} --release --lib
48+
cargo -Zgitoxide=fetch -Zgit=shallow-index,shallow-deps build --target ${{ inputs.target }} --profile ${{ env.BUILD_PROFILE }} --lib
6849
for artifact in ${artifacts//,/ }; do
6950
echo "==> building databend-$artifact ..."
70-
cargo -Zgitoxide=fetch -Zgit=shallow-index,shallow-deps build --target ${{ inputs.target }} --release --bin databend-$artifact
51+
cargo -Zgitoxide=fetch -Zgit=shallow-index,shallow-deps build --target ${{ inputs.target }} --profile ${{ env.BUILD_PROFILE }} --bin databend-$artifact
7152
done
7253
7354
- name: Upload artifact

.github/scripts/bump_version.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,10 @@ module.exports = async ({ github, context, core }) => {
3232
core.setFailed("Stable release must be triggered with a nightly tag");
3333
}
3434
} else {
35+
core.setOutput("sha", context.sha);
3536
if (TAG) {
3637
core.setOutput("tag", TAG);
37-
core.info(`Release create manually with tag ${TAG}`);
38+
core.info(`Release create manually with tag ${TAG} (${context.sha})`);
3839
} else {
3940
let releases = await github.rest.repos.listReleases({
4041
owner: context.repo.owner,
@@ -52,7 +53,6 @@ module.exports = async ({ github, context, core }) => {
5253
let patch = (parseInt(result[3]) + 1).toString();
5354
let next_tag = `v${major}.${minor}.${patch}-nightly`;
5455
core.setOutput("tag", next_tag);
55-
core.setOutput("sha", context.sha);
5656
core.info(`Nightly release ${next_tag} from ${tag} (${context.sha})`);
5757
}
5858
}

.github/workflows/dev.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ jobs:
5050
uses: ./.github/workflows/reuse.linux.yml
5151
secrets: inherit
5252
with:
53-
build_profile: release
53+
build_profile: ci
5454
runner_provider: aws
5555
license_type: trial
5656

@@ -60,7 +60,7 @@ jobs:
6060
uses: ./.github/workflows/reuse.linux.hive.yml
6161
secrets: inherit
6262
with:
63-
build_profile: release
63+
build_profile: ci
6464
runner_provider: aws
6565

6666
ready:

.github/workflows/merge_group.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ jobs:
5454
uses: ./.github/workflows/reuse.linux.yml
5555
secrets: inherit
5656
with:
57-
build_profile: release
57+
build_profile: ci
5858
runner_provider: aws
5959
license_type: enterprise
6060

Cargo.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -569,6 +569,12 @@ overflow-checks = false
569569
opt-level = "s" ## defaults to be 3
570570
incremental = true
571571

572+
[profile.ci]
573+
inherits = "release"
574+
overflow-checks = false
575+
incremental = false
576+
debug-assertions = true
577+
572578
# [profile.release.package]
573579
# databend-common-arrow = { codegen-units = 16 }
574580
# databend-query = { codegen-units = 4 }

src/common/arrow/src/arrow/array/binview/mutable.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -424,7 +424,7 @@ impl MutableBinaryViewArray<str> {
424424
let value = unsafe { self.value_unchecked(self.len() - 1).to_string() };
425425

426426
self.views.pop();
427-
427+
self.total_bytes_len -= value.len();
428428
Some(value)
429429
}
430430
}

0 commit comments

Comments
 (0)