diff --git a/.github/workflows/go_latest_test.yml b/.github/workflows/go_latest_test.yml new file mode 100644 index 000000000..dec6cc605 --- /dev/null +++ b/.github/workflows/go_latest_test.yml @@ -0,0 +1,28 @@ +name: Push Check Go-Latest-Linux-X64 + +on: push + +jobs: + build: + runs-on: [self-hosted, X64] + steps: + - name: Clear repository + run: sudo rm -fr $GITHUB_WORKSPACE && mkdir $GITHUB_WORKSPACE + + - uses: actions/checkout@v2 + + - name: Set up Go + uses: actions/setup-go@v2 + with: + go-version: 1.20.x + + - uses: actions/cache@v2 + with: + path: ~/go/pkg/mod + key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} + restore-keys: | + ${{ runner.os }}-go- + + - name: script + run: | + sh ./scripts/go_latest.sh master diff --git a/scripts/go_latest.sh b/scripts/go_latest.sh new file mode 100755 index 000000000..8bcd9501a --- /dev/null +++ b/scripts/go_latest.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +BRANCH=$1 + +git clone https://github.com/golang/go.git go_$BRANCH + +cd go_$BRANCH/src +git checkout -b build/$BRANCH origin/$BRANCH + +./all.bash + +cd .. +export GOROOT=$PWD +export PATH=$GOROOT/bin:$PATH +go version + +cd .. +GOMAXPROCS=4 go test -v -race ./... \ No newline at end of file