Skip to content

Commit

Permalink
Add long test for windows
Browse files Browse the repository at this point in the history
Use the required prefix $Env: to overwrite go variables of the environmment.

At this time, previously installed go version remains on path. GOROOT_BOOTSTRAP is used to select the loaded version.
  • Loading branch information
iwdgo committed Nov 13, 2024
1 parent ec7211b commit 2e54e22
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 3 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/windows_long_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: windows
on:
push:
branches:
- 'master-windows'
paths:
- 'action.yml'
- 'README.md'
- '.github/workflows/windows_long_test.yml'

jobs:

build:
name: Build
runs-on: windows-latest
steps:

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.22.x
id: go

- name: Build go from tip
uses: iwdgo/gotip-build@master-windows
id: gotip
with:
go_variables: $Env:GO_TEST_SHORT = 0; $Env:GO_TEST_TIMEOUT_SCALE = 5; $Env:GOROOT_BOOTSTRAP = 'C:\hostedtoolcache\windows\go\1.22.8\x64\'

- name: Upload go executable
uses: actions/upload-artifact@v4
with:
name: gotip-${{ runner.os }}-${{ runner.arch }}
path: .\go
3 changes: 1 addition & 2 deletions .github/workflows/windows_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ jobs:
uses: iwdgo/gotip-build@master-windows
id: gotip
with:
go_variables: $GOROOT_BOOTSTRAP = 'C:\hostedtoolcache\windows\go\1.22.8\x64\'
test_build: true
go_variables: $Env:GOROOT_BOOTSTRAP = 'C:\hostedtoolcache\windows\go\1.22.8\x64\'

- name: Upload go executable
uses: actions/upload-artifact@v4
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Usage:
uses: iwdgo/gotip-build@master-windows
id: gotip
with:
go_variables: $CGO_ENABLED = 1
go_variables: $Env:CGO_ENABLED = 1
test_build: false
```
Expand Down

0 comments on commit 2e54e22

Please sign in to comment.