Skip to content

Commit ce82d49

Browse files
committed
chore: update golang to 1.25
1 parent 8e6be19 commit ce82d49

File tree

2 files changed

+52
-2
lines changed

2 files changed

+52
-2
lines changed

.github/workflows/build.yml

Lines changed: 33 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,13 @@ jobs:
8080
- { goos: android, goarch: arm, ndk: armv7a-linux-androideabi34, output: armv7 }
8181
- { goos: android, goarch: arm64, ndk: aarch64-linux-android34, output: arm64-v8 }
8282

83+
# Go 1.24 with special patch can work on Windows 7
84+
# https://github.com/MetaCubeX/go/commits/release-branch.go1.24/
85+
- { goos: windows, goarch: '386', output: '386-go124', goversion: '1.24' }
86+
- { goos: windows, goarch: amd64, goamd64: v1, output: amd64-v1-go124, goversion: '1.24' }
87+
- { goos: windows, goarch: amd64, goamd64: v2, output: amd64-v2-go124, goversion: '1.24' }
88+
- { goos: windows, goarch: amd64, goamd64: v3, output: amd64-v3-go124, goversion: '1.24' }
89+
8390
# Go 1.23 with special patch can work on Windows 7
8491
# https://github.com/MetaCubeX/go/commits/release-branch.go1.23/
8592
- { goos: windows, goarch: '386', output: '386-go123', goversion: '1.23' }
@@ -108,6 +115,12 @@ jobs:
108115
- { goos: windows, goarch: amd64, goamd64: v2, output: amd64-v2-go120, goversion: '1.20' }
109116
- { goos: windows, goarch: amd64, goamd64: v3, output: amd64-v3-go120, goversion: '1.20' }
110117

118+
# Go 1.24 is the last release that will run on macOS 11 Big Sur. Go 1.25 will require macOS 12 Monterey or later.
119+
- { goos: darwin, goarch: arm64, output: arm64-go124, goversion: '1.24' }
120+
- { goos: darwin, goarch: amd64, goamd64: v1, output: amd64-v1-go124, goversion: '1.24' }
121+
- { goos: darwin, goarch: amd64, goamd64: v2, output: amd64-v2-go124, goversion: '1.24' }
122+
- { goos: darwin, goarch: amd64, goamd64: v3, output: amd64-v3-go124, goversion: '1.24' }
123+
111124
# Go 1.22 is the last release that will run on macOS 10.15 Catalina. Go 1.23 will require macOS 11 Big Sur or later.
112125
- { goos: darwin, goarch: arm64, output: arm64-go122, goversion: '1.22' }
113126
- { goos: darwin, goarch: amd64, goamd64: v1, output: amd64-v1-go122, goversion: '1.22' }
@@ -139,7 +152,7 @@ jobs:
139152
if: ${{ matrix.jobs.goversion == '' && matrix.jobs.abi != '1' }}
140153
uses: actions/setup-go@v5
141154
with:
142-
go-version: '1.24'
155+
go-version: '1.25'
143156

144157
- name: Set up Go
145158
if: ${{ matrix.jobs.goversion != '' && matrix.jobs.abi != '1' }}
@@ -154,6 +167,24 @@ jobs:
154167
sudo tar zxf go1.24.0.linux-amd64-abi1.tar.gz -C /usr/local
155168
echo "/usr/local/go/bin" >> $GITHUB_PATH
156169
170+
# modify from https://github.com/restic/restic/issues/4636#issuecomment-1896455557
171+
# this patch file only works on golang1.25.x
172+
# that means after golang1.26 release it must be changed
173+
# see: https://github.com/MetaCubeX/go/commits/release-branch.go1.25/
174+
# revert:
175+
# 693def151adff1af707d82d28f55dba81ceb08e1: "crypto/rand,runtime: switch RtlGenRandom for ProcessPrng"
176+
# 7c1157f9544922e96945196b47b95664b1e39108: "net: remove sysSocket fallback for Windows 7"
177+
# 48042aa09c2f878c4faa576948b07fe625c4707a: "syscall: remove Windows 7 console handle workaround"
178+
# a17d959debdb04cd550016a3501dd09d50cd62e7: "runtime: always use LoadLibraryEx to load system libraries"
179+
- name: Revert Golang1.25 commit for Windows7/8
180+
if: ${{ matrix.jobs.goos == 'windows' && matrix.jobs.goversion == '' }}
181+
run: |
182+
cd $(go env GOROOT)
183+
curl https://github.com/MetaCubeX/go/commit/8cb5472d94c34b88733a81091bd328e70ee565a4.diff | patch --verbose -p 1
184+
curl https://github.com/MetaCubeX/go/commit/6788c4c6f9fafb56729bad6b660f7ee2272d699f.diff | patch --verbose -p 1
185+
curl https://github.com/MetaCubeX/go/commit/a5b2168bb836ed9d6601c626f95e56c07923f906.diff | patch --verbose -p 1
186+
curl https://github.com/MetaCubeX/go/commit/f56f1e23507e646c85243a71bde7b9629b2f970c.diff | patch --verbose -p 1
187+
157188
# modify from https://github.com/restic/restic/issues/4636#issuecomment-1896455557
158189
# this patch file only works on golang1.24.x
159190
# that means after golang1.25 release it must be changed
@@ -164,7 +195,7 @@ jobs:
164195
# 48042aa09c2f878c4faa576948b07fe625c4707a: "syscall: remove Windows 7 console handle workaround"
165196
# a17d959debdb04cd550016a3501dd09d50cd62e7: "runtime: always use LoadLibraryEx to load system libraries"
166197
- name: Revert Golang1.24 commit for Windows7/8
167-
if: ${{ matrix.jobs.goos == 'windows' && matrix.jobs.goversion == '' }}
198+
if: ${{ matrix.jobs.goos == 'windows' && matrix.jobs.goversion == '1.24' }}
168199
run: |
169200
cd $(go env GOROOT)
170201
curl https://github.com/MetaCubeX/go/commit/2a406dc9f1ea7323d6ca9fccb2fe9ddebb6b1cc8.diff | patch --verbose -p 1

.github/workflows/test.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ jobs:
2424
- 'ubuntu-24.04-arm' # arm64 linux
2525
- 'macos-13' # amd64 macos
2626
go-version:
27+
- '1.25'
2728
- '1.24'
2829
- '1.23'
2930
- '1.22'
@@ -47,6 +48,24 @@ jobs:
4748
with:
4849
go-version: ${{ matrix.go-version }}
4950

51+
# modify from https://github.com/restic/restic/issues/4636#issuecomment-1896455557
52+
# this patch file only works on golang1.25.x
53+
# that means after golang1.26 release it must be changed
54+
# see: https://github.com/MetaCubeX/go/commits/release-branch.go1.25/
55+
# revert:
56+
# 693def151adff1af707d82d28f55dba81ceb08e1: "crypto/rand,runtime: switch RtlGenRandom for ProcessPrng"
57+
# 7c1157f9544922e96945196b47b95664b1e39108: "net: remove sysSocket fallback for Windows 7"
58+
# 48042aa09c2f878c4faa576948b07fe625c4707a: "syscall: remove Windows 7 console handle workaround"
59+
# a17d959debdb04cd550016a3501dd09d50cd62e7: "runtime: always use LoadLibraryEx to load system libraries"
60+
- name: Revert Golang1.25 commit for Windows7/8
61+
if: ${{ matrix.jobs.goos == 'windows' && matrix.jobs.goversion == '1.25' }}
62+
run: |
63+
cd $(go env GOROOT)
64+
curl https://github.com/MetaCubeX/go/commit/8cb5472d94c34b88733a81091bd328e70ee565a4.diff | patch --verbose -p 1
65+
curl https://github.com/MetaCubeX/go/commit/6788c4c6f9fafb56729bad6b660f7ee2272d699f.diff | patch --verbose -p 1
66+
curl https://github.com/MetaCubeX/go/commit/a5b2168bb836ed9d6601c626f95e56c07923f906.diff | patch --verbose -p 1
67+
curl https://github.com/MetaCubeX/go/commit/f56f1e23507e646c85243a71bde7b9629b2f970c.diff | patch --verbose -p 1
68+
5069
# modify from https://github.com/restic/restic/issues/4636#issuecomment-1896455557
5170
# this patch file only works on golang1.24.x
5271
# that means after golang1.25 release it must be changed

0 commit comments

Comments
 (0)