mirror of
https://gitea.com/gitea/runner.git
synced 2026-11-04 15:40:06 +00:00
Adds a weekly and on-demand workflow that runs the cross-compiled tests on Windows Server 2025 Core in a [dockur/windows](https://github.com/dockur/windows) QEMU VM, and fixes the Windows bugs it found in host and UNC paths, env handling, shell quoting, post-task scripts, health checks, checkout, action symlinks, step summaries, Git client certificates and docker mode from a Windows host. Host-mode steps now emit UTF-8, `bash` falls back to Git's bash instead of the WSL launcher, the runner can run as a native Windows service, steps can keep background helpers with `RUNNER_TRACKING_ID`, and Windows arm64 binaries are released. Fixes: https://gitea.com/gitea/runner/issues/1339 Fixes: https://gitea.com/gitea/runner/issues/637 Fixes: https://gitea.com/gitea/runner/issues/1172 Fixes: https://gitea.com/gitea/runner/issues/347 Reviewed-on: https://gitea.com/gitea/runner/pulls/1348 Reviewed-by: bircni <bircni@icloud.com>
31 lines
794 B
Go
31 lines
794 B
Go
// Copyright 2022 The Gitea Authors. All rights reserved.
|
|
// Copyright 2022 The nektos/act Authors. All rights reserved.
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
package container
|
|
|
|
import (
|
|
"context"
|
|
"path"
|
|
"strings"
|
|
)
|
|
|
|
func JoinPath(elem ...string) string { // path.Join would collapse the leading // of a UNC act path on a Windows host
|
|
if len(elem) > 0 && strings.HasPrefix(elem[0], "//") {
|
|
return "/" + path.Join(elem...)
|
|
}
|
|
return path.Join(elem...)
|
|
}
|
|
|
|
type ExecutionsEnvironment interface {
|
|
Container
|
|
ToContainerPath(string) string
|
|
GetActPath() string
|
|
GetPathVariableName() string
|
|
DefaultPathVariable() string
|
|
JoinPathVariable(...string) string
|
|
GetRunnerContext(ctx context.Context) map[string]any
|
|
// On windows PATH and Path are the same key
|
|
IsEnvironmentCaseInsensitive() bool
|
|
}
|