mirror of
https://github.com/go-delve/delve.git
synced 2025-10-26 11:35:16 +08:00
CI: add windows arm64 workflow (#4175)
* CI: add windows arm64 workflow * add win-arm64 capslock * add capslock build tag * add servive test build tag * skip proc_test.go * unskip more tests * skip TestHardcodedBreakpointCounts as flaky * add gotip * add version log to ps1 * switch logic to use stable json endpoint for getting latest go * add continue-on-error for gotip
This commit is contained in:
29
.github/workflows/test-windows-arm64.yml
vendored
Normal file
29
.github/workflows/test-windows-arm64.yml
vendored
Normal file
@ -0,0 +1,29 @@
|
||||
name: Test Windows ARM64
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
branches: [master]
|
||||
|
||||
# Cancel existing runs if user makes another push.
|
||||
concurrency:
|
||||
group: "${{ github.ref }}-${{ github.workflow}}"
|
||||
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
||||
|
||||
jobs:
|
||||
test-windows-arm64:
|
||||
runs-on: windows-11-arm
|
||||
timeout-minutes: 90
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
go-version: ["1.24", "1.25", "tip"]
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v5
|
||||
|
||||
- name: Run tests
|
||||
run: _scripts/test_windows.ps1 -version go${{ matrix.go-version }} -arch arm64 -binDir $env:RUNNER_TOOL_CACHE
|
||||
continue-on-error: ${{ matrix.go-version == 'tip' }}
|
||||
@ -52,7 +52,6 @@ Tests skipped by each supported backend:
|
||||
* 1 broken
|
||||
* 2 not working on windows
|
||||
* 6 see https://github.com/go-delve/delve/issues/2768
|
||||
* windows/arm64 skipped = 5
|
||||
* 3 broken
|
||||
* 1 broken - cgo stacktraces
|
||||
* 1 broken - step concurrent
|
||||
* windows/arm64 skipped = 3
|
||||
* 2 broken - cgo stacktraces
|
||||
* 1 flaky
|
||||
|
||||
40
_scripts/capslock_windows_arm64-output.txt
Normal file
40
_scripts/capslock_windows_arm64-output.txt
Normal file
@ -0,0 +1,40 @@
|
||||
Capslock is an experimental tool for static analysis of Go packages.
|
||||
Share feedback and file bugs at https://github.com/google/capslock.
|
||||
For additional debugging signals, use verbose mode with -output=verbose
|
||||
To get machine-readable full analysis output, use -output=json
|
||||
|
||||
Analyzed packages:
|
||||
github.com/cosiner/argv v0.1.0
|
||||
github.com/cpuguy83/go-md2man/v2 v2.0.6
|
||||
github.com/derekparker/trie/v3 v3.2.0
|
||||
github.com/go-delve/liner v1.2.3-0.20231231155935-4726ab1d7f62
|
||||
github.com/google/go-dap v0.12.0
|
||||
github.com/hashicorp/golang-lru/v2 v2.0.7
|
||||
github.com/inconshreveable/mousetrap v1.1.0
|
||||
github.com/mattn/go-colorable v0.1.13
|
||||
github.com/mattn/go-isatty v0.0.20
|
||||
github.com/mattn/go-runewidth v0.0.13
|
||||
github.com/rivo/uniseg v0.2.0
|
||||
github.com/russross/blackfriday/v2 v2.1.0
|
||||
github.com/spf13/cobra v1.9.1
|
||||
github.com/spf13/pflag v1.0.6
|
||||
go.starlark.net v0.0.0-20231101134539-556fd59b42f6
|
||||
golang.org/x/arch v0.11.0
|
||||
golang.org/x/sync v0.8.0
|
||||
golang.org/x/sys v0.26.0
|
||||
golang.org/x/telemetry v0.0.0-20241106142447-58a1122356f5
|
||||
gopkg.in/yaml.v3 v3.0.1
|
||||
|
||||
CAPABILITY_ARBITRARY_EXECUTION: 2 references
|
||||
CAPABILITY_EXEC: 2 references
|
||||
CAPABILITY_FILES: 2 references
|
||||
CAPABILITY_MODIFY_SYSTEM_STATE: 1 references
|
||||
CAPABILITY_NETWORK: 1 references
|
||||
CAPABILITY_OPERATING_SYSTEM: 1 references
|
||||
CAPABILITY_READ_SYSTEM_STATE: 2 references
|
||||
CAPABILITY_REFLECT: 2 references
|
||||
CAPABILITY_RUNTIME: 1 references
|
||||
CAPABILITY_SYSTEM_CALLS: 2 references
|
||||
CAPABILITY_UNANALYZED: 2 references
|
||||
CAPABILITY_UNSAFE_POINTER: 2 references
|
||||
|
||||
@ -26,6 +26,7 @@ var platforms = []Platform{
|
||||
{GOOS: "darwin", GOARCH: "amd64"},
|
||||
{GOOS: "darwin", GOARCH: "arm64"},
|
||||
{GOOS: "windows", GOARCH: "amd64"},
|
||||
{GOOS: "windows", GOARCH: "arm64", BuildTags: "exp.winarm64"},
|
||||
}
|
||||
|
||||
const (
|
||||
|
||||
@ -18,7 +18,7 @@ if ($arch -eq "amd64")
|
||||
#Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
|
||||
choco install -y mingw
|
||||
} elseif ($arch -eq "arm64") {
|
||||
$llvmVersion = "20220906"
|
||||
$llvmVersion = "20250924"
|
||||
$name = "llvm-mingw-$llvmVersion-ucrt-aarch64"
|
||||
if (-Not(Test-Path "$binDir\llvm-mingw\$name"))
|
||||
{
|
||||
@ -44,6 +44,7 @@ $env:PATH = "$binDir\procdump;$env:PATH"
|
||||
|
||||
function GetGo($version) {
|
||||
$env:GOROOT = "$binDir\go\$version"
|
||||
Write-Host "Installing Go $version to $env:GOROOT"
|
||||
if (-Not(Test-Path $env:GOROOT))
|
||||
{
|
||||
$file = "$version.windows-$arch.zip"
|
||||
@ -57,7 +58,8 @@ function GetGo($version) {
|
||||
|
||||
if ($version -eq "gotip") {
|
||||
#Exit 0
|
||||
$latest = (Invoke-WebRequest -Uri "https://golang.org/VERSION?m=text" -UseBasicParsing | Select-Object -ExpandProperty Content -ErrorAction Stop).Split([Environment]::NewLine) | select -first 1
|
||||
$versions = Invoke-WebRequest -Uri "https://go.dev/dl/?mode=json" -UseBasicParsing | foreach {$_.Content} | ConvertFrom-Json -ErrorAction Stop
|
||||
$latest = $versions[0].version
|
||||
GetGo $latest
|
||||
$env:GOROOT_BOOTSTRAP = $env:GOROOT
|
||||
$env:GOROOT = "$binDir\go\go-tip"
|
||||
|
||||
@ -1467,6 +1467,9 @@ func TestCapsLock(t *testing.T) {
|
||||
if goos == "linux" && goarch == "ppc64le" {
|
||||
args = append([]string{"-buildtags", "exp.linuxppc64le"}, args...)
|
||||
}
|
||||
if goos == "windows" && goarch == "arm64" {
|
||||
args = append([]string{"-buildtags", "exp.winarm64"}, args...)
|
||||
}
|
||||
|
||||
cmd := exec.Command("capslock", args...)
|
||||
cmd.Dir = protest.ProjectRoot()
|
||||
|
||||
@ -440,7 +440,6 @@ func countBreakpoints(p *proc.Target) int {
|
||||
}
|
||||
|
||||
func TestNextConcurrent(t *testing.T) {
|
||||
skipOn(t, "broken", "windows", "arm64")
|
||||
testcases := []nextTest{
|
||||
{8, 9},
|
||||
{9, 10},
|
||||
@ -476,7 +475,6 @@ func TestNextConcurrent(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestNextConcurrentVariant2(t *testing.T) {
|
||||
skipOn(t, "broken", "windows", "arm64")
|
||||
// Just like TestNextConcurrent but instead of removing the initial breakpoint we check that when it happens is for other goroutines
|
||||
testcases := []nextTest{
|
||||
{8, 9},
|
||||
@ -1260,7 +1258,7 @@ func TestBreakpointCounts(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestHardcodedBreakpointCounts(t *testing.T) {
|
||||
skipOn(t, "broken", "windows", "arm64")
|
||||
skipOn(t, "flaky", "windows", "arm64")
|
||||
withTestProcess("hcbpcountstest", t, func(p *proc.Target, grp *proc.TargetGroup, fixture protest.Fixture) {
|
||||
counts := map[int64]int{}
|
||||
for {
|
||||
@ -2108,7 +2106,6 @@ func TestStepOut(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestStepConcurrentDirect(t *testing.T) {
|
||||
skipOn(t, "broken - step concurrent", "windows", "arm64")
|
||||
protest.AllowRecording(t)
|
||||
withTestProcess("teststepconcurrent", t, func(p *proc.Target, grp *proc.TargetGroup, fixture protest.Fixture) {
|
||||
bp := setFileBreakpoint(p, t, fixture.Source, 37)
|
||||
@ -3050,9 +3047,6 @@ func TestCgoStacktrace(t *testing.T) {
|
||||
skipOn(t, "broken - cgo stacktraces", "windows", "arm64")
|
||||
skipOn(t, "broken - cgo stacktraces", "linux", "ppc64le")
|
||||
skipOn(t, "broken - cgo stacktraces", "linux", "riscv64")
|
||||
if !goversion.VersionAfterOrEqual(runtime.Version(), 1, 21) {
|
||||
skipOn(t, "broken - cgo stacktraces", "windows", "arm64")
|
||||
}
|
||||
protest.MustHaveCgo(t)
|
||||
|
||||
// Tests that:
|
||||
@ -4328,6 +4322,7 @@ func TestCgoStacktrace2(t *testing.T) {
|
||||
}
|
||||
skipOn(t, "broken", "386")
|
||||
skipOn(t, "broken - cgo stacktraces", "darwin", "arm64")
|
||||
skipOn(t, "broken - cgo stacktraces", "windows", "arm64")
|
||||
skipOn(t, "broken", "ppc64le")
|
||||
skipOn(t, "broken", "riscv64")
|
||||
protest.MustHaveCgo(t)
|
||||
|
||||
@ -3241,6 +3241,10 @@ func TestGuessSubstitutePath(t *testing.T) {
|
||||
t.Setenv("GOFLAGS", "-tags=exp.linuxriscv64")
|
||||
case "loong64":
|
||||
t.Setenv("GOFLAGS", "-tags=exp.linuxloong64")
|
||||
case "arm64":
|
||||
if runtime.GOOS == "windows" {
|
||||
t.Setenv("GOFLAGS", "-tags=exp.winarm64")
|
||||
}
|
||||
}
|
||||
|
||||
gsp, err := client.GuessSubstitutePath()
|
||||
|
||||
Reference in New Issue
Block a user