-
Notifications
You must be signed in to change notification settings - Fork 726
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* build: update GitHub Actions ref #4399 Signed-off-by: disksing <[email protected]> * tidy Signed-off-by: disksing <[email protected]> * move docker out of check Signed-off-by: disksing <[email protected]> * Update scripts/ci-subtask.sh Co-authored-by: JmPotato <[email protected]> Signed-off-by: disksing <[email protected]> * clean up Signed-off-by: disksing <[email protected]> * 6 workers for pd-tests Signed-off-by: disksing <[email protected]> * merge together Signed-off-by: disksing <[email protected]> * minor update Signed-off-by: disksing <[email protected]> * simplify test Signed-off-by: disksing <[email protected]> Co-authored-by: JmPotato <[email protected]> Co-authored-by: Ti Chi Robot <[email protected]>
- Loading branch information
1 parent
2aaca94
commit cd51927
Showing
8 changed files
with
84 additions
and
73 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
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,21 @@ | ||
name: PD Docker Image | ||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
branches: | ||
- master | ||
jobs: | ||
chunks: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: true | ||
steps: | ||
- uses: actions/setup-go@v2 | ||
with: | ||
go-version: 1.17 | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
- name: Make | ||
run: make docker-image |
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
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,30 @@ | ||
#!/bin/bash | ||
|
||
# ./ci-subtask.sh <TOTAL_TASK_N> <TASK_INDEX> | ||
|
||
packages=(`go list ./...`) | ||
dirs=(`find . -iname "*_test.go" -exec dirname {} \; | sort -u | sed -e "s/^\./github.com\/tikv\/pd/"`) | ||
tasks=($(comm -12 <(printf "%s\n" "${packages[@]}") <(printf "%s\n" "${dirs[@]}"))) | ||
|
||
weight () { | ||
[[ $1 == "github.com/tikv/pd/server/api" ]] && return 30 | ||
[[ $1 == "github.com/tikv/pd/server/schedule" ]] && return 30 | ||
[[ $1 == "github.com/tikv/pd/tests/client" ]] && return 30 | ||
[[ $1 =~ "pd/tests" ]] && return 5 | ||
return 1 | ||
} | ||
|
||
scores=(`seq "$1" | xargs -I{} echo 0`) | ||
|
||
res=() | ||
for t in ${tasks[@]}; do | ||
min_i=0 | ||
for i in ${!scores[@]}; do | ||
[[ ${scores[i]} -lt ${scores[$min_i]} ]] && min_i=$i | ||
done | ||
weight $t | ||
scores[$min_i]=$((${scores[$min_i]} + $?)) | ||
[[ $(($min_i+1)) -eq $2 ]] && res+=($t) | ||
done | ||
|
||
printf "%s " "${res[@]}" |
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