Skip to content

Commit 1d9ebe8

Browse files
committed
all: add Windows 11 builder
Add a new host type, host-windows11-arm64-mini. It should support both ARM64 and ARM builds but for starters let's focus on ARM64. For golang/go#48946, golang/go#47019. Change-Id: I7ff07a97661fb6621237b9801ff0d0e338c6d4f4 Reviewed-on: https://go-review.googlesource.com/c/build/+/377696 Trust: Heschi Kreinick <[email protected]> Run-TryBot: Heschi Kreinick <[email protected]> Reviewed-by: Alex Rakoczy <[email protected]> TryBot-Result: Gopher Robot <[email protected]>
1 parent 310cfe7 commit 1d9ebe8

File tree

5 files changed

+29
-4
lines changed

5 files changed

+29
-4
lines changed

Diff for: cmd/buildlet/stage0/Makefile

+4
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ buildlet-stage0.windows-amd64: FORCE
2222
go install golang.org/x/build/cmd/upload
2323
upload --verbose --osarch=$@ --file=go:golang.org/x/build/cmd/buildlet/stage0 --public --cacheable=false go-builder-data/$@
2424

25+
buildlet-stage0.windows-arm64: FORCE
26+
go install golang.org/x/build/cmd/upload
27+
upload --verbose --osarch=$@ --file=go:golang.org/x/build/cmd/buildlet/stage0 --public --cacheable=false go-builder-data/$@
28+
2529
buildlet-stage0.linux-arm: FORCE
2630
go install golang.org/x/build/cmd/upload
2731
upload --verbose --osarch=$@ --file=go:golang.org/x/build/cmd/buildlet/stage0 --public --cacheable=false go-builder-data/$@

Diff for: cmd/buildlet/stage0/stage0.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ Download:
202202
cmd.Args = append(cmd.Args, reverseHostTypeArgs(hostType)...)
203203
case "windows/arm64":
204204
switch buildEnv {
205-
case "host-windows-arm64-mini":
205+
case "host-windows-arm64-mini", "host-windows11-arm64-mini":
206206
cmd.Args = append(cmd.Args,
207207
"--halt=true",
208208
"--reverse-type="+buildEnv,

Diff for: dashboard/builders.go

+19-1
Original file line numberDiff line numberDiff line change
@@ -539,7 +539,14 @@ var Hosts = map[string]*HostConfig{
539539
buildletURLTmpl: "http://storage.googleapis.com/$BUCKET/buildlet.windows-arm64",
540540
goBootstrapURLTmpl: "https://storage.googleapis.com/$BUCKET/gobootstrap-windows-arm64-f22ec5.tar.gz",
541541
IsReverse: true,
542-
ExpectNum: 7,
542+
ExpectNum: 6,
543+
},
544+
"host-windows11-arm64-mini": &HostConfig{
545+
Notes: "macOS hosting Windows 11 in qemu with HVM acceleration.",
546+
buildletURLTmpl: "http://storage.googleapis.com/$BUCKET/buildlet.windows-arm64",
547+
goBootstrapURLTmpl: "https://storage.googleapis.com/$BUCKET/gobootstrap-windows-arm64-f22ec5.tar.gz",
548+
IsReverse: true,
549+
ExpectNum: 1,
543550
},
544551
"host-darwin-10_12": &HostConfig{
545552
IsReverse: true,
@@ -2475,6 +2482,17 @@ func init() {
24752482
"GOARCH=arm64",
24762483
},
24772484
})
2485+
addBuilder(BuildConfig{
2486+
Name: "windows-arm64-11",
2487+
HostType: "host-windows11-arm64-mini",
2488+
numTryTestHelpers: 1,
2489+
buildsRepo: func(repo, branch, goBranch string) bool {
2490+
return atLeastGo1(goBranch, 18) && buildRepoByDefault(repo)
2491+
},
2492+
env: []string{
2493+
"GOARCH=arm64",
2494+
},
2495+
})
24782496
addBuilder(BuildConfig{
24792497
Name: "darwin-amd64-10_12",
24802498
HostType: "host-darwin-10_12",

Diff for: env/windows-arm64/README.md

+4-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ a1.metal instances then saving the image manually.
1313
- Convert vhdx images to qcow2 via the following command:
1414

1515
```shell
16-
qemu-image convert -O qcow2 win.vhdx win.qcow2
16+
qemu-img convert -O qcow2 win.vhdx win.qcow2
1717
```
1818

1919
- SSH to your instance tunneling port 5903, and run `win10-arm64.sh`
@@ -29,6 +29,9 @@ a1.metal instances then saving the image manually.
2929
- Alternatively, you can modify `win10-arm64.sh` to forward ssh
3030
access to the VM, and run PowerShell in the CLI, which is a bit
3131
easier than through VNC.
32+
- Verify autologin works after a reboot. If not, try
33+
https://docs.microsoft.com/en-us/sysinternals/downloads/autologon.
34+
- Set GO_BUILDER_ENV and install a builder key.
3235
- Once the image is complete, download the image to your workstation
3336
and upload to `s3://go-builder-data`.
3437
- You can find the appropriate the S3 path referenced in

Diff for: env/windows-arm64/startup.ps1

+1-1
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ $vs_buildtools = "$builder_dir\vs_buildtools.exe"
135135
Get-FileFromUrl -URL "https://aka.ms/vs/16/release/vs_buildtools.exe" -Output "$vs_buildtools"
136136

137137
Write-Host "installing Visual Studio Build Tools"
138-
& $vs_buildtools --quiet --wait --norestart --nocache --installPath "$dep_dir\vs" --all --add Microsoft.VisualStudio.Component.VC.Tools.ARM64
138+
& $vs_buildtools --quiet --wait --norestart --nocache --installPath "$dep_dir\vs" --all --add Microsoft.VisualStudio.Component.VC.Tools.ARM64 --add Microsoft.VisualStudio.Component.VC.Tools.ARM
139139

140140
# Create a buildlet user
141141
Write-Host "creating buildlet user"

0 commit comments

Comments
 (0)