-
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.
- Loading branch information
Showing
28 changed files
with
545 additions
and
371 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,48 @@ | ||
name: 'Build Debug' | ||
description: 'Build with debug profile' | ||
name: "Build Debug" | ||
description: "Build with debug profile" | ||
inputs: | ||
github_token: | ||
description: "Github Token" | ||
required: true | ||
target: | ||
description: "" | ||
required: true | ||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Maximize build space | ||
uses: ./.github/actions/cleanup | ||
|
||
- uses: arduino/setup-protoc@v1 | ||
if: "contains(inputs.target, 'apple')" | ||
with: | ||
version: '3.x' | ||
version: "3.x" | ||
repo-token: ${{ inputs.github_token }} | ||
|
||
- name: Add rust target | ||
shell: bash | ||
run: rustup target add ${{ matrix.config.target }} | ||
- shell: bash | ||
if: "contains(inputs.target, 'apple')" | ||
run: rustup target add ${{ inputs.target }} | ||
|
||
- name: Setup Build Tool | ||
if: "contains(inputs.target, 'linux')" | ||
uses: ./.github/actions/setup_build_tool | ||
with: | ||
image: datafuselabs/build-tool:multiarch | ||
|
||
# If you need to reset the cache version, increment the number after `v` | ||
- uses: Swatinem/rust-cache@v1 | ||
with: | ||
sharedKey: debug-v1 | ||
sharedKey: debug-${{ inputs.target }}-v2 | ||
|
||
- uses: actions-rs/cargo@v1 | ||
with: | ||
command: build | ||
use-cross: ${{ matrix.config.cross }} | ||
args: --target ${{ matrix.config.target }} | ||
- shell: bash | ||
run: cargo build --target ${{ inputs.target }} | ||
|
||
- name: Upload artifact | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: debug-${{ github.sha }}-${{ matrix.config.os }}-${{ matrix.config.target }} | ||
path: ./target/${{ matrix.config.target }}/debug/databend-* | ||
name: debug-${{ github.sha }}-${{ inputs.target }} | ||
path: ./target/${{ inputs.target }}/debug/databend-* | ||
|
||
# for cache | ||
- shell: bash | ||
run: cargo metadata --all-features --format-version 1 > ./target/metadata.json |
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
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,46 @@ | ||
name: "Setup Build Tool Binaries" | ||
description: "Setup Build Tool Binaries" | ||
inputs: | ||
image: | ||
description: "Build Tool Docker Image to use" | ||
required: true | ||
default: datafuselabs/build-tool:dev-debian-amd64 | ||
bypass_env_vars: | ||
description: "Environment variables bypass to docker container" | ||
required: false | ||
default: RUSTFLAGS,RUST_LOG | ||
runs: | ||
using: "composite" | ||
steps: | ||
- name: clean the existing toolchain | ||
shell: bash | ||
run: | | ||
rm -rf /home/runner/.cargo | ||
rm -rf /home/runner/.rustup | ||
- name: setup build-tool binary | ||
shell: bash | ||
run: | | ||
BIN_LOCAL=$HOME/.cargo/bin | ||
mkdir -p $BIN_LOCAL | ||
echo "$BIN_LOCAL" >> $GITHUB_PATH | ||
cat <<EOF >$BIN_LOCAL/build-tool | ||
#!/bin/bash | ||
script_name=\$(basename "\$0") | ||
export IMAGE=${{ inputs.image }} | ||
export BYPASS_ENV_VARS=${{ inputs.bypass_env_vars }} | ||
if [[ \${script_name} == "build-tool" ]]; then | ||
scripts/setup/run_build_tool.sh \$@ | ||
else | ||
scripts/setup/run_build_tool.sh \${script_name} \$@ | ||
fi | ||
EOF | ||
chmod +x $BIN_LOCAL/build-tool | ||
ln -s build-tool $BIN_LOCAL/rustc | ||
ln -s build-tool $BIN_LOCAL/cargo | ||
ln -s build-tool $BIN_LOCAL/rustup | ||
- name: check cargo version | ||
shell: bash | ||
run: rustup show |
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,34 @@ | ||
name: "Test Stateless Cluster" | ||
description: "Running stateless tests in cluster mode" | ||
inputs: | ||
profile: | ||
description: "The profile for this test" | ||
required: true | ||
default: "debug" | ||
target: | ||
description: "" | ||
required: true | ||
default: "x86_64-unknown-linux-gnu" | ||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Maximize build space | ||
uses: ./.github/actions/cleanup | ||
|
||
- name: Setup Build Tool | ||
uses: ./.github/actions/setup_build_tool | ||
|
||
- uses: actions/download-artifact@v2 | ||
with: | ||
name: ${{ inputs.profile }}-${{ github.sha }}-${{ inputs.target }} | ||
path: ./target/debug | ||
|
||
- name: Set up file as executable | ||
shell: bash | ||
run: | | ||
chmod +x ./target/debug/databend-* | ||
- name: Run Stateless Tests with Cluster mode | ||
shell: bash | ||
run: | | ||
build-tool bash ./scripts/ci/ci-run-stateless-tests-cluster.sh |
Oops, something went wrong.