Skip to content

Commit

Permalink
ci: prepare for Windows X64 hosts (#1683)
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaost authored Jan 24, 2025
1 parent b2a9665 commit d840d1a
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pr-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
uses: crate-ci/typos@v1.13.14

golangci-lint:
runs-on: [ self-hosted, X64 ]
runs-on: [ Linux, X64 ]
steps:
- uses: actions/checkout@v4
- name: Set up Go
Expand Down
28 changes: 20 additions & 8 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on: [ push, pull_request ]

jobs:
unit-scenario-test:
runs-on: [ self-hosted, X64 ]
runs-on: [ Linux, X64 ]
steps:
- uses: actions/checkout@v4
- name: Set up Go
Expand Down Expand Up @@ -34,12 +34,26 @@ jobs:
# setting benchtime=100ms is saving our time...
run: go test -bench=. -benchmem -run=none ./... -benchtime=100ms

compatibility-test:
compatibility-test-x64:
strategy:
matrix:
go: [ "1.18", "1.19", "1.20", "1.21", "1.22", "1.23" ]
os: [ X64, ARM64 ]
runs-on: ${{ matrix.os }}
runs-on: [ Linux, X64 ]
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go }}
cache: false # don't use cache for self-hosted runners
- name: Unit Test
run: go test -race ./...

compatibility-test-arm:
strategy:
matrix:
go: [ "1.18", "1.19", "1.20", "1.21", "1.22", "1.23" ]
runs-on: [ ARM64 ] # It's OK under Linux or macOS
steps:
- uses: actions/checkout@v4
- name: Set up Go
Expand Down Expand Up @@ -80,15 +94,13 @@ jobs:
bash ./codegen_run.sh
windows-test:
runs-on: windows-latest
env: # Fixes https://github.com/actions/setup-go/issues/240
GOMODCACHE: 'D:\go\pkg\mod'
GOCACHE: 'D:\go\go-build'
runs-on: [ Windows ]
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: stable
cache: false # don't use cache for self-hosted runners
- name: Windows compatibility test
run: go test -run=^$ ./...

0 comments on commit d840d1a

Please # to comment.