-
Notifications
You must be signed in to change notification settings - Fork 230
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
3 changed files
with
72 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,43 @@ | ||
name: kitex version tests | ||
|
||
on: push | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Clear repository | ||
run: sudo rm -fr $GITHUB_WORKSPACE && mkdir $GITHUB_WORKSPACE | ||
|
||
- uses: actions/checkout@v2 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v1 | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: 1.22.4 | ||
|
||
- uses: actions/cache@v2 | ||
with: | ||
path: ~/go/pkg/mod | ||
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | ||
restore-keys: | | ||
${{ runner.os }}-go- | ||
- name: build go image | ||
run: | | ||
sh ./go_latest.sh go1.23 | ||
PWD=$(pwd) | ||
export GOROOT=$PWD/go1.23 | ||
export PATH=$GOROOT/bin:$PATH | ||
go version | ||
continue-on-error: true | ||
|
||
- name: run on specific version kitex | ||
run: | | ||
go version | ||
sh ./update_kitext.sh 0bc4a44e9521a73914965c8c3b236e100edd1a95 | ||
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,9 @@ | ||
#!/bin/bash | ||
|
||
TAG=$1 | ||
|
||
git clone -b release-branch.$TAG https://github.com/golang/go.git $TAG | ||
|
||
cd $TAG/src | ||
|
||
./all.bash |
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,20 @@ | ||
#!/bin/bash | ||
|
||
version=$1 | ||
|
||
# find go.mod and update dependencies | ||
find . -name go.mod -print0 | while IFS= read -r -d '' script; do | ||
# get absolute dir path | ||
pwd=$(pwd) | ||
script_dir=$(dirname "$script") | ||
cd "$script_dir" | ||
go get -v "github.com/cloudwego/kitex@$version" | ||
go mod tidy | ||
cd "$pwd" | ||
done | ||
|
||
find . -name test.sh -print0 | while IFS= read -r -d '' script; do | ||
script_dir=$(dirname "$script") | ||
chmod +x "$script" | ||
(cd "$script_dir" && bash "./$(basename "$script")") | ||
done |