Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(ci): cargo build with -Zgitoxide #12504

Merged
merged 2 commits into from
Aug 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/actions/build_linux/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ runs:
if: env.BUILD_PROFILE == 'debug' && inputs.artifacts == 'all'
shell: bash
run: |
cargo build --target ${{ inputs.target }} --features ${{ inputs.features }}
cargo -Zgitoxide=fetch,shallow-index,shallow-deps build --target ${{ inputs.target }} --features ${{ inputs.features }}
ls -lh ./target/${{ inputs.target }}/${{ env.BUILD_PROFILE }}/databend-*

- name: Build Debug for specific artifacts
Expand All @@ -77,7 +77,7 @@ runs:
artifacts="${{ inputs.artifacts }}"
for artifact in ${artifacts//,/ }; do
echo "==> building databend-$artifact ..."
cargo build --target ${{ inputs.target }} --features ${{ inputs.features }} --bin databend-$artifact
cargo -Zgitoxide=fetch,shallow-index,shallow-deps build --target ${{ inputs.target }} --features ${{ inputs.features }} --bin databend-$artifact
ls -lh ./target/${{ inputs.target }}/${{ env.BUILD_PROFILE }}/databend-$artifact
done

Expand All @@ -88,7 +88,7 @@ runs:
artifacts="meta,metactl,query,sqllogictests"
for artifact in ${artifacts//,/ }; do
echo "==> building databend-$artifact ..."
cargo build --target ${{ inputs.target }} --features ${{ inputs.features }} --release --bin databend-$artifact
cargo -Zgitoxide=fetch,shallow-index,shallow-deps build --target ${{ inputs.target }} --features ${{ inputs.features }} --release --bin databend-$artifact
ls -lh ./target/${{ inputs.target }}/${{ env.BUILD_PROFILE }}/databend-$artifact
done

Expand All @@ -99,7 +99,7 @@ runs:
artifacts="${{ inputs.artifacts }}"
for artifact in ${artifacts//,/ }; do
echo "==> building databend-$artifact ..."
cargo build --target ${{ inputs.target }} --features ${{ inputs.features }} --release --bin databend-$artifact
cargo -Zgitoxide=fetch,shallow-index,shallow-deps build --target ${{ inputs.target }} --features ${{ inputs.features }} --release --bin databend-$artifact
ls -lh ./target/${{ inputs.target }}/${{ env.BUILD_PROFILE }}/databend-$artifact
done

Expand Down
10 changes: 5 additions & 5 deletions .github/actions/build_macos/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,18 +41,18 @@ runs:
- name: Build Debug for all artifacts
if: env.BUILD_PROFILE == 'debug' && inputs.artifacts == 'all'
shell: bash
run: cargo build --target ${{ inputs.target }}
run: cargo -Zgitoxide=fetch,shallow-index,shallow-deps build --target ${{ inputs.target }}

- name: Build Debug for specific artifacts
if: env.BUILD_PROFILE == 'debug' && inputs.artifacts != 'all'
shell: bash
run: |
artifacts="${{ inputs.artifacts }}"
echo "==> building libs ..."
cargo build --target ${{ inputs.target }} --lib
cargo -Zgitoxide=fetch,shallow-index,shallow-deps build --target ${{ inputs.target }} --lib
for artifact in ${artifacts//,/ }; do
echo "==> building databend-$artifact ..."
cargo build --target ${{ inputs.target }} --bin databend-$artifact
cargo -Zgitoxide=fetch,shallow-index,shallow-deps build --target ${{ inputs.target }} --bin databend-$artifact
done

- name: Build Release
Expand All @@ -61,10 +61,10 @@ runs:
run: |
artifacts="${{ inputs.artifacts }}"
echo "==> building libs ..."
cargo build --target ${{ inputs.target }} --release --lib
cargo -Zgitoxide=fetch,shallow-index,shallow-deps build --target ${{ inputs.target }} --release --lib
for artifact in ${artifacts//,/ }; do
echo "==> building databend-$artifact ..."
cargo build --target ${{ inputs.target }} --release --bin databend-$artifact
cargo -Zgitoxide=fetch,shallow-index,shallow-deps build --target ${{ inputs.target }} --release --bin databend-$artifact
done

- name: Upload artifact
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/check/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,4 @@ runs:

- name: Clippy
shell: bash
run: cargo clippy --workspace --all-targets --all-features -- -D warnings
run: cargo -Zgitoxide=fetch,shallow-index,shallow-deps clippy --workspace --all-targets --all-features -- -D warnings
4 changes: 2 additions & 2 deletions .github/actions/test_unit/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ runs:
bypass_env_vars: RUSTFLAGS,RUSTDOCFLAGS,RUST_TEST_THREADS,RUST_LOG,RUST_BACKTRACE

- shell: bash
run: cargo test
run: cargo -Zgitoxide=fetch,shallow-index,shallow-deps test
env:
RUST_TEST_THREADS: "2"
RUST_TEST_THREADS: "8"
RUST_LOG: ERROR
# RUST_BACKTRACE: full

Expand Down
Loading