Skip to content

Commit 361bc35

Browse files
cfergeaupraveenkumar
authored andcommitted
ci: Fix appveyor builds
When building in appveyor, the PATH to go binaries is wrong, it's set to C:\go116 to try to use go 1.16, but it should be C:\go116\bin. This resulted in the latest go version being used instead of the intended one. Moreover, when using a non-default go version, we also need to set GOROOT, or weird build errors are going to occur.
1 parent 4dfe9d4 commit 361bc35

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

appveyor.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ before_test:
77
- choco install make
88
- choco install wixtoolset
99
- set PATH=C:\mingw-w64\x86_64-8.1.0-posix-seh-rt_v6-rev0\mingw64\bin;%PATH%
10-
- set PATH=C:\go116;%WIX%bin;%PATH%
10+
- set PATH=C:\go116\bin;%WIX%bin;%PATH%
11+
- set GOROOT=C:\go116
1112
- make out/windows-amd64/crc-windows-installer.zip
1213
- make cross
1314
test_script:

update-go-version.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,4 @@ sed -i "s/GOVERSION: .*\$/GOVERSION: \"${latest_version}\"/" .circleci/config.ym
1818
sed -i "s/^GO_VERSION=.*$/GO_VERSION=${latest_version}/" centos_ci.sh
1919
appveyor_go_version=$(echo $golang_base_version | tr -d .)
2020
sed -i 's/set PATH=C:\\go[0-9]\+/set PATH=C:\\go'${appveyor_go_version}'/' ./appveyor.yml
21+
sed -i 's/set GOROOT=C:\\go[0-9]\+/set GOROOT=C:\\go'${appveyor_go_version}'"/' ./appveyor.yml

0 commit comments

Comments
 (0)