Skip to content

Update windows runner to 2025 #3705

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 24 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ jobs:
go-version:
- 1.23.8
sys:
- {os: ubuntu-latest}
- {os: macos-13, shell: zsh}
- {os: macos-latest, shell: zsh}
- {os: windows-2019}
- {os: ubuntu-24.04-arm}
- { os: ubuntu-latest }
- { os: macos-13, shell: zsh }
- { os: macos-latest, shell: zsh }
- { os: windows-2025 }
- { os: ubuntu-24.04-arm }
fail-fast: false
runs-on: ${{ matrix.sys.os }}
env:
Expand Down Expand Up @@ -249,13 +249,13 @@ jobs:
shell: bash
if: runner.os == 'Windows' && contains(fromJSON('["refs/heads/beta", "refs/heads/release", "refs/heads/LTS"]'), github.ref)
run: |
export PATH=/c/Program\ Files\ \(x86\)/WiX\ Toolset\ v3.11/bin/:/c/Program\ Files\ \(x86\)/Windows\ Kits/10/bin/10.0.16299.0/x86/:$PATH
export PATH=/c/Program\ Files\ \(x86\)/WiX\ Toolset\ v3.14/bin/:/c/Program\ Files\ \(x86\)/Windows\ Kits/10/bin/10.0.26100.0/x64:$PATH

signtool.exe sign -d "ActiveState State Tool" -f "Cert.p12" -p ${CODE_SIGNING_PASSWD} ./build/state.exe
signtool.exe sign -d "ActiveState State Service" -f "Cert.p12" -p ${CODE_SIGNING_PASSWD} ./build/state-svc.exe
signtool.exe sign -d "ActiveState State Installer" -f "Cert.p12" -p ${CODE_SIGNING_PASSWD} ./build/state-installer.exe
signtool.exe sign -d "ActiveState State Tool Remote Installer" -f "Cert.p12" -p ${CODE_SIGNING_PASSWD} ./build/state-remote-installer.exe
signtool.exe sign -d "ActiveState State MCP" -f "Cert.p12" -p ${CODE_SIGNING_PASSWD} ./build/state-mcp.exe
signtool.exe sign -fd SHA1 -d "ActiveState State Tool" -f "Cert.p12" -p ${CODE_SIGNING_PASSWD} ./build/state.exe
signtool.exe sign -fd SHA1 -d "ActiveState State Service" -f "Cert.p12" -p ${CODE_SIGNING_PASSWD} ./build/state-svc.exe
signtool.exe sign -fd SHA1 -d "ActiveState State Installer" -f "Cert.p12" -p ${CODE_SIGNING_PASSWD} ./build/state-installer.exe
signtool.exe sign -fd SHA1 -d "ActiveState State Tool Remote Installer" -f "Cert.p12" -p ${CODE_SIGNING_PASSWD} ./build/state-remote-installer.exe
signtool.exe sign -fd SHA1 -d "ActiveState State MCP" -f "Cert.p12" -p ${CODE_SIGNING_PASSWD} ./build/state-mcp.exe
env:
CODE_SIGNING_PASSWD: ${{ secrets.CODE_SIGNING_PASSWD }}

Expand Down Expand Up @@ -536,5 +536,5 @@ jobs:
session-build-ubuntu-latest
session-build-macos-13
session-build-macos-latest
session-build-windows-2019
session-build-windows-2025
session-build-ubuntu-24.04-arm
2 changes: 1 addition & 1 deletion internal/runbits/runtime/progress/progress.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ func NewRuntimeProgressIndicator(out output.Outputer) events.Handler {
if out.Type() != output.PlainFormatName {
w = nil
}
if out.Config().Interactive {
if os.Getenv("DOTPROGRESS") == "" && out.Config().Interactive {
return newProgressIndicator(w, out)
}
return newDotProgressIndicator(out)
Expand Down
6 changes: 3 additions & 3 deletions internal/runners/clean/run_win.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,19 +32,19 @@ func (u *Uninstall) runUninstall(params *UninstallParams) error {
logFile, err := os.CreateTemp("", "state-clean-uninstall")
if err != nil {
logging.Error("Could not create temporary log file: %s", errs.JoinMessage(err))
aggErr = locale.WrapError(aggErr, "err_clean_logfile", "Could not create temporary log file")
aggErr = locale.WrapError(aggErr, "err_clean_logfile", "Could not create temporary log file: {{.V0}}", err.Error())
}

stateExec, err := installation.StateExec()
if err != nil {
logging.Debug("Could not get State Tool executable: %s", errs.JoinMessage(err))
aggErr = locale.WrapError(aggErr, "err_state_exec")
aggErr = locale.WrapError(aggErr, "err_state_exec_with_error", "Could not get State Tool executable: {{.V0}}", err.Error())
}

err = removeInstall(logFile.Name(), params, u.cfg)
if err != nil {
logging.Debug("Could not remove installation: %s", errs.JoinMessage(err))
aggErr = locale.WrapError(aggErr, "uninstall_remove_executables_err", "Failed to remove all State Tool files in installation directory {{.V0}}", filepath.Dir(stateExec))
aggErr = locale.WrapError(aggErr, "uninstall_remove_executables_err", "Failed to remove all State Tool files in installation directory {{.V0}}: {{.V1}}", filepath.Dir(stateExec), err.Error())
}

err = removeApp()
Expand Down
1 change: 1 addition & 0 deletions internal/testhelpers/tagsuite/tagsuite.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ const (
Config = "config"
Critical = "critical"
Cve = "cve"
Debug = "debug"
DeleteProjects = "delete-uuid-projects"
Deploy = "deploy"
Edit = "edit"
Expand Down
9 changes: 6 additions & 3 deletions test/integration/analytics_int_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,11 @@ import (
"testing"
"time"

"github.com/ActiveState/termtest"
"github.com/thoas/go-funk"

"github.com/ActiveState/cli/internal/runbits/runtime/trigger"
"github.com/ActiveState/cli/internal/testhelpers/suite"
"github.com/thoas/go-funk"

"github.com/ActiveState/cli/internal/analytics/client/sync/reporters"
anaConst "github.com/ActiveState/cli/internal/analytics/constants"
Expand Down Expand Up @@ -463,7 +465,7 @@ func (suite *AnalyticsIntegrationTestSuite) TestInputError() {
}

func (suite *AnalyticsIntegrationTestSuite) TestAttempts() {
suite.OnlyRunForTags(tagsuite.Analytics)
suite.OnlyRunForTags(tagsuite.Critical, tagsuite.Analytics, tagsuite.Debug)

ts := e2e.New(suite.T(), false)
defer ts.Close()
Expand All @@ -473,7 +475,8 @@ func (suite *AnalyticsIntegrationTestSuite) TestAttempts() {
cp := ts.SpawnWithOpts(
e2e.OptArgs("activate", "ActiveState-CLI/Alternate-Python"),
e2e.OptWD(ts.Dirs.Work),
e2e.OptAppendEnv(constants.DisableActivateEventsEnvVarName+"=false"),
e2e.OptAppendEnv(constants.DisableActivateEventsEnvVarName+"=false", "DOTPROGRESS=true"),
e2e.OptTermTest(termtest.OptVerboseLogger()),
)

cp.Expect("Creating a Virtual Environment")
Expand Down
2 changes: 1 addition & 1 deletion test/integration/branch_int_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ func (suite *BranchIntegrationTestSuite) TestBranch_List() {

ts.PrepareProject("ActiveState-CLI/Branches", "35af7414-b44b-4fd7-aa93-2ecad337ed2b")

cp := ts.SpawnWithOpts(e2e.OptArgs("branch"), e2e.OptTermTest(termtest.OptVerboseLogger()))
cp := ts.SpawnWithOpts(e2e.OptArgs("branch"))
// Sometimes there's a space before the line break, unsure exactly why, but hence the regex
cp.ExpectRe(`main \(Current\)\s?\n ├─ firstbranch\s?\n │ └─ firstbranchchild\s?\n │ └─ childoffirstbranchchild\s?\n ├─ secondbranch\s?\n └─ thirdbranch`, termtest.OptExpectTimeout(5*time.Second))
cp.Expect("To switch to another branch,")
Expand Down
14 changes: 7 additions & 7 deletions test/integration/errors_int_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,35 +17,35 @@ func (suite *ErrorsIntegrationTestSuite) TestTips() {
suite.OnlyRunForTags(tagsuite.Errors, tagsuite.Critical)
ts := e2e.New(suite.T(), false)
defer ts.Close()
ts.IgnoreLogErrors()

cp := ts.Spawn("__test", "multierror")
cp.Expect("Need More Help?")
cp.Expect("Run →")
cp.Expect("Ask For Help →")
cp.ExpectExitCode(1)
ts.IgnoreLogErrors()
}

func (suite *ErrorsIntegrationTestSuite) TestMultiErrorWithInput() {
suite.OnlyRunForTags(tagsuite.Errors, tagsuite.Critical)
ts := e2e.New(suite.T(), false)
defer ts.Close()
ts.IgnoreLogErrors()

cp := ts.Spawn("__test", "multierror-input")
cp.ExpectRe(`\s+x error1.\s+\s+x error2.\s+x error3.\s+x error4.\s+█\s+Need More Help`)
cp := ts.SpawnWithOpts(e2e.OptArgs("__test", "multierror-input"))
cp.ExpectRe(`x error1.\s+\s+x error2.\s+x error3.\s+x error4.`)
cp.ExpectExitCode(1)
ts.IgnoreLogErrors()
}

func (suite *ErrorsIntegrationTestSuite) TestMultiErrorWithoutInput() {
suite.OnlyRunForTags(tagsuite.Errors, tagsuite.Critical)
ts := e2e.New(suite.T(), false)
defer ts.Close()
ts.IgnoreLogErrors()

cp := ts.Spawn("__test", "multierror-noinput")
cp.ExpectRe(`\s+x error1.\s+\s+x error2.\s+x error3.\s+x error4.\s+█\s+Need More Help`)
cp := ts.SpawnWithOpts(e2e.OptArgs("__test", "multierror-noinput"))
cp.ExpectRe(`x error1.\s+\s+x error2.\s+x error3.\s+x error4.`)
cp.ExpectExitCode(1)
ts.IgnoreLogErrors()
}

func TestErrorsIntegrationTestSuite(t *testing.T) {
Expand Down
3 changes: 1 addition & 2 deletions test/integration/hello_int_example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@ func (suite *HelloIntegrationTestSuite) TestHello() {
ts.IgnoreLogErrors()

cp = ts.Spawn("_hello", "Person", "--extra")
cp.Expect("Project: ActiveState-CLI/Empty")
cp.Expect("Current commit message:")
cp.Expect("You are on commit")
cp.ExpectExitCode(0)

cp = ts.Spawn("_hello", "Person", "--echo", "example")
Expand Down
2 changes: 1 addition & 1 deletion test/integration/shells_int_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ func (suite *ShellsIntegrationTestSuite) TestShells() {
e2e.OptAppendEnv(constants.OverrideShellEnvVarName+"="),
)
cp.SendLine(e2e.QuoteCommand(shell, ts.ExecutablePath(), "checkout", "ActiveState-CLI/small-python", string(shell)))
cp.Expect("Checked out project")
cp.Expect("Checked out project", e2e.RuntimeSourcingTimeoutOpt)
cp.SendLine("exit")
if shell != e2e.Cmd {
cp.ExpectExitCode(0)
Expand Down
16 changes: 8 additions & 8 deletions test/integration/uninstall_int_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,19 +110,19 @@ func (suite *UninstallIntegrationTestSuite) testUninstall(all bool) {
}

if all {
suite.NoDirExists(ts.Dirs.Cache, "Cache dir should not exist after full uninstall")
suite.NoDirExists(ts.Dirs.Config, "Config dir should not exist after full uninstall")
suite.NoDirExists(ts.Dirs.Cache, ts.DebugMessage("Cache dir should not exist after full uninstall"))
suite.NoDirExists(ts.Dirs.Config, ts.DebugMessage("Config dir should not exist after full uninstall"))
} else {
suite.DirExists(ts.Dirs.Cache, "Cache dir should still exist after partial uninstall")
suite.DirExists(ts.Dirs.Config, "Config dir should still exist after partial uninstall")
suite.DirExists(ts.Dirs.Cache, ts.DebugMessage("Cache dir should still exist after partial uninstall"))
suite.DirExists(ts.Dirs.Config, ts.DebugMessage("Config dir should still exist after partial uninstall"))
}

if fileutils.FileExists(stateExe) {
suite.Fail("State tool executable should not exist after uninstall")
suite.Fail(ts.DebugMessage("State tool executable should not exist after uninstall"))
}

if fileutils.FileExists(svcExe) {
suite.Fail("State service executable should not exist after uninstall")
suite.Fail(ts.DebugMessage("State service executable should not exist after uninstall"))
}

if runtime.GOOS == "linux" {
Expand All @@ -135,7 +135,7 @@ func (suite *UninstallIntegrationTestSuite) testUninstall(all bool) {

if runtime.GOOS == "darwin" {
if fileutils.DirExists(filepath.Join(binDir, "system")) {
suite.Fail("system directory should not exist after uninstall")
suite.Fail(ts.DebugMessage("system directory should not exist after uninstall"))
}
}

Expand All @@ -145,7 +145,7 @@ func (suite *UninstallIntegrationTestSuite) testUninstall(all bool) {
}

if fileutils.DirExists(binDir) {
suite.Fail("bin directory should not exist after uninstall")
suite.Fail(ts.DebugMessage("bin directory should not exist after uninstall"))
}
}

Expand Down
Loading