Skip to content

Commit d79de9d

Browse files
authored
[CI] enable Windows-2016 and support 32 bits build requirements (#19199) (#22347)
1 parent aa23e12 commit d79de9d

File tree

2 files changed

+23
-4
lines changed

2 files changed

+23
-4
lines changed

.ci/scripts/install-tools.bat

+18-2
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,25 @@
11
set GOPATH=%WORKSPACE%
22
set MAGEFILE_CACHE=%WORKSPACE%\.magefile
3-
set PATH=%WORKSPACE%\bin;C:\ProgramData\chocolatey\bin;%PATH%
3+
set PATH=%WORKSPACE%\bin;C:\ProgramData\chocolatey\bin;C:\tools\mingw64\bin;%PATH%
44

55
where /q curl
66
IF ERRORLEVEL 1 (
77
choco install curl -y --no-progress --skipdownloadcache
88
)
99
mkdir %WORKSPACE%\bin
10+
11+
REM If 32 bits then install the GVM accordingly
12+
IF NOT EXIST "%PROGRAMFILES(X86)%" (
13+
curl -sL -o %WORKSPACE%\bin\gvm.exe https://github.com/andrewkroh/gvm/releases/download/v0.2.2/gvm-windows-386.exe
14+
)
15+
1016
where /q gvm
1117
IF ERRORLEVEL 1 (
12-
curl -sL -o %WORKSPACE%\bin\gvm.exe https://github.com/andrewkroh/gvm/releases/download/v0.2.2/gvm-windows-amd64.exe
18+
IF EXIST "%PROGRAMFILES(X86)%" (
19+
curl -sL -o %WORKSPACE%\bin\gvm.exe https://github.com/andrewkroh/gvm/releases/download/v0.2.2/gvm-windows-amd64.exe
20+
) ELSE (
21+
curl -sL -o %WORKSPACE%\bin\gvm.exe https://github.com/andrewkroh/gvm/releases/download/v0.2.2/gvm-windows-386.exe
22+
)
1323
)
1424
FOR /f "tokens=*" %%i IN ('"gvm.exe" use %GO_VERSION% --format=batch') DO %%i
1525

@@ -25,3 +35,9 @@ if not exist C:\Python38\python.exe (
2535
python --version
2636
where python
2737

38+
if not exist C:\tools\mingw64\bin\gcc.exe (
39+
REM Install mingw 5.3.0
40+
choco install mingw -y -r --no-progress --version 5.3.0 || echo ERROR && exit /b
41+
)
42+
gcc --version
43+
where gcc

dev-tools/mage/gotest.go

+5-2
Original file line numberDiff line numberDiff line change
@@ -193,8 +193,11 @@ func GoTest(ctx context.Context, params GoTestArgs) error {
193193
args := []string{"test"}
194194
args = append(args, "-v")
195195

196-
if params.Race {
197-
args = append(args, "-race")
196+
// -race is only supported on */amd64
197+
if os.Getenv("DEV_ARCH") == "amd64" {
198+
if params.Race {
199+
args = append(args, "-race")
200+
}
198201
}
199202
if len(params.Tags) > 0 {
200203
args = append(args, "-tags", strings.Join(params.Tags, " "))

0 commit comments

Comments
 (0)