Skip to content

Commit b206904

Browse files
committed
Use Go version specified by go directive for "Compare Performance" build
The Go version compatibility at one ref may be different than at another. This was already managed for very old versions of the project, but there is a need for such a system even for newer versions.
1 parent e2f2455 commit b206904

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

.github/workflows/compare-performance.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
name: Compare Performance
22

33
env:
4-
# See: https://github.com/actions/setup-go/tree/v2#readme
5-
GO_VERSION: "1.16"
64
REPORTS_ARTIFACT_NAME: reports
75

86
# See: https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows
@@ -118,7 +116,8 @@ jobs:
118116
id: go-version
119117
run: |
120118
if [[ -f "go.mod" ]]; then
121-
USE_GO_VERSION="${{ env.GO_VERSION }}"
119+
# This will use the runner's pre-installed Go
120+
USE_GO_VERSION="$(go mod edit -json | jq --raw-output '.Go')"
122121
else
123122
# Dependency installation for old engine versions fails when not in GOPATH mode. Go <1.16 uses
124123
# GO111MODULE=auto by default, meaning it will use GOPATH mode. Old Go versions were used by the old engine

0 commit comments

Comments
 (0)