From 860ed0d9d066aed87c09d237a5ef5fc1fed68e46 Mon Sep 17 00:00:00 2001 From: visualfc Date: Sat, 27 Apr 2024 20:27:53 +0800 Subject: [PATCH] fix -race for macos-latest(arm) --- .github/workflows/go118.yml | 33 +++++++++++++++++++++++++++++++++ .github/workflows/go119.yml | 7 +++++-- .github/workflows/go120.yml | 7 +++++-- .github/workflows/go121.yml | 7 +++++-- .github/workflows/go122.yml | 7 +++++-- 5 files changed, 53 insertions(+), 8 deletions(-) diff --git a/.github/workflows/go118.yml b/.github/workflows/go118.yml index c491727f..332e6e7e 100644 --- a/.github/workflows/go118.yml +++ b/.github/workflows/go118.yml @@ -8,6 +8,39 @@ on: jobs: + macos: + name: Test Go1.18 for macOS + runs-on: macos-latest + steps: + + - name: Set up Go 1.18 + uses: actions/setup-go@v2 + with: + go-version: 1.18.x + + - name: Check out code into the Go module directory + uses: actions/checkout@v2 + + - name: Get dependencies + run: | + go get -v -t -d ./... + + - name: Build + run: go build -v . + + - name: Install igop + run: go install -v ./cmd/igop + + - name: Go Test + run: go test -v . + + - name: Test $GOROOT/test + run: go run ./cmd/igoptest + + - name: Go Test race + run: CGO_ENABLED=1 GOARCH=amd64 go test -race -v . + + macos: name: Test Go1.18 for macOS runs-on: macos-latest diff --git a/.github/workflows/go119.yml b/.github/workflows/go119.yml index d048348d..0df35c30 100644 --- a/.github/workflows/go119.yml +++ b/.github/workflows/go119.yml @@ -32,10 +32,13 @@ jobs: run: go install -v ./cmd/igop - name: Go Test - run: GOARCH=amd64 go test -race -v . + run: go test -v . - name: Test $GOROOT/test - run: GOARCH=amd64 go run ./cmd/igoptest + run: go run ./cmd/igoptest + + - name: Go Test race + run: CGO_ENABLED=1 GOARCH=amd64 go test -race -v . linux: name: Test Go1.19 for Linux diff --git a/.github/workflows/go120.yml b/.github/workflows/go120.yml index d6347952..54bcf0f5 100644 --- a/.github/workflows/go120.yml +++ b/.github/workflows/go120.yml @@ -32,10 +32,13 @@ jobs: run: go install -v ./cmd/igop - name: Go Test - run: GOARCH=amd64 go test -race -v . + run: go test -v . - name: Test $GOROOT/test - run: GOARCH=amd64 go run ./cmd/igoptest + run: go run ./cmd/igoptest + + - name: Go Test race + run: CGO_ENABLED=1 GOARCH=amd64 go test -race -v . linux: name: Test Go1.20 for Linux diff --git a/.github/workflows/go121.yml b/.github/workflows/go121.yml index ec7fb05e..94c2a8e9 100644 --- a/.github/workflows/go121.yml +++ b/.github/workflows/go121.yml @@ -32,10 +32,13 @@ jobs: run: go install -v ./cmd/igop - name: Go Test - run: GOARCH=amd64 go test -race -v . + run: go test -v . - name: Test $GOROOT/test - run: GOARCH=amd64 go run ./cmd/igoptest + run: go run ./cmd/igoptest + + - name: Go Test race + run: CGO_ENABLED=1 GOARCH=amd64 go test -race -v . linux: name: Test Go1.21 for Linux diff --git a/.github/workflows/go122.yml b/.github/workflows/go122.yml index 2185f2df..afa79888 100644 --- a/.github/workflows/go122.yml +++ b/.github/workflows/go122.yml @@ -32,10 +32,13 @@ jobs: run: go install -v ./cmd/igop - name: Go Test - run: GOARCH=amd64 go test -race -v . + run: go test -v . - name: Test $GOROOT/test - run: GOARCH=amd64 go run ./cmd/igoptest + run: go run ./cmd/igoptest + + - name: Go Test race + run: CGO_ENABLED=1 GOARCH=amd64 go test -race -v . linux: name: Test Go1.22 for Linux