Skip to content
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
51 changes: 51 additions & 0 deletions .github/actions/build_debug_hive/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
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"
repo-token: ${{ inputs.github_token }}

- shell: bash
if: "contains(inputs.target, 'apple')"
run: rustup target add ${{ inputs.target }}

- shell: bash
if: "contains(inputs.target, 'apple')"
run: brew install thrift

- name: Setup Build Tool
if: "contains(inputs.target, 'linux')"
uses: ./.github/actions/setup_build_tool
with:
image: ${{ inputs.target }}

- shell: bash
run: cargo build --target ${{ inputs.target }} --bin databend-query --features hive

- shell: bash
if: "contains(inputs.target, 'linux')"
run: readelf -p .comment ./target/${{ inputs.target }}/debug/databend-query

- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: debug-${{ github.sha }}-${{ inputs.target }}-hive
path: ./target/${{ inputs.target }}/debug/databend-*

# for cache
- shell: bash
run: cargo metadata --all-features --format-version 1 > ./target/metadata.json
17 changes: 7 additions & 10 deletions .github/actions/test_stateful_hive_standalone/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,15 @@ runs:
with:
image: ${{ inputs.target }}

# If you need to reset the cache version, increment the number after `v`
- uses: Swatinem/rust-cache@v1
- uses: actions/download-artifact@v2
with:
sharedKey: debug-hive-${{ inputs.target }}-v2
name: ${{ inputs.profile }}-${{ github.sha }}-${{ inputs.target }}-hive
path: ./target/debug

# for the time being, only databend-query is needed
- shell: bash
run: cargo build --bin databend-query --features hive

# for cache
- shell: bash
run: cargo metadata --all-features --format-version 1 > ./target/metadata.json
- name: Set up file as executable
shell: bash
run: |
chmod +x ./target/debug/databend-*

# hive cluster setup
- name: Hive Cluster Setup
Expand Down
19 changes: 2 additions & 17 deletions .github/mergify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,33 +5,18 @@ queue_rules:

# Must write expected checks explicitly
# Reference: https://docs.mergify.com/conditions/#validating-all-status-checks
# We only require linux checks to pass
- check-success=check
- check-success=test_unit
- check-success=test_metactl
- check-success=test_stateless_standalone_linux
# MacOS's stateless standalone has been disabled.
# - check-success=test_stateless_standalone_macos
- check-success=test_stateless_cluster_linux
- check-success=test_stateless_cluster_macos
- check-success=test_stateful_standalone

pull_request_rules:
- name: put bug fix pr to queue with high priority
- name: put bug fix pr to queue
conditions:
- "#approved-reviews-by>=2"
- check-success=check
- label=pr-bugfix

actions:
queue:
name: shared_queue

- name: put other pr to queue
conditions:
- "#approved-reviews-by>=2"
- check-success=check
- label!=pr-bugfix

actions:
queue:
name: shared_queue
Expand Down
23 changes: 19 additions & 4 deletions .github/workflows/developing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ jobs:
github_token: ${{ secrets.GITHUB_TOKEN }}

build_macos:
name: "build_macos(optional)"
runs-on: macos-11
needs: check
strategy:
matrix:
target:
Expand All @@ -58,7 +58,6 @@ jobs:

build_linux:
runs-on: [self-hosted, x64, Linux]
needs: check
strategy:
matrix:
target:
Expand All @@ -75,7 +74,6 @@ jobs:

test_unit:
runs-on: [self-hosted, x64, Linux]
needs: check
steps:
- uses: actions/checkout@v3
with:
Expand Down Expand Up @@ -134,6 +132,7 @@ jobs:
- uses: ./.github/actions/test_stateless_cluster_linux

test_stateless_cluster_macos:
name: "test_stateless_cluster_macos(optional)"
runs-on: macos-11
needs: build_macos
steps:
Expand All @@ -144,6 +143,7 @@ jobs:
- uses: ./.github/actions/test_stateless_cluster_macos

test_sqllogic_standalone_macos:
name: "test_sqllogic_standalone_macos(optional)"
runs-on: macos-11
needs: build_macos
steps:
Expand Down Expand Up @@ -171,9 +171,24 @@ jobs:
fetch-depth: 0
- uses: ./.github/actions/test_stateful_standalone

build_linux_hive:
runs-on: [ self-hosted, x64, Linux ]
strategy:
matrix:
target:
- x86_64-unknown-linux-gnu
steps:
- uses: actions/checkout@v3
with:
# fetch all tags, metasrv and metaclient need tag as its version.
fetch-depth: 0
- uses: ./.github/actions/build_debug_hive
with:
target: ${{ matrix.target }}

test_stateful_hive_standalone:
runs-on: ubuntu-latest
needs: check
needs: build_linux_hive
steps:
- uses: actions/checkout@v3
with:
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ jobs:

build_macos:
runs-on: macos-11
needs: check
strategy:
matrix:
target:
Expand All @@ -48,7 +47,6 @@ jobs:

build_linux:
runs-on: [self-hosted, x64, Linux]
needs: check
strategy:
matrix:
target:
Expand All @@ -65,7 +63,6 @@ jobs:

test_unit:
runs-on: [self-hosted, x64, Linux]
needs: check
steps:
- uses: actions/checkout@v3
with:
Expand Down