Skip to content

Commit dc94f34

Browse files
Preparation for Go 1.25
1 parent ec0a636 commit dc94f34

File tree

4 files changed

+776
-0
lines changed

4 files changed

+776
-0
lines changed

.github/workflows/test-go1_25.yml

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
name: Build patched Go 1.25 for tests
2+
3+
on:
4+
workflow_dispatch:
5+
schedule:
6+
- cron: '30 0 * * 4,6'
7+
push:
8+
branches:
9+
- build
10+
- "release-branch.go1.25"
11+
paths:
12+
- ".github/workflows/test-go1_25.yml"
13+
- "**/*.go"
14+
pull_request:
15+
types: [opened, synchronize, reopened]
16+
branches:
17+
- build
18+
- "release-branch.go1.25"
19+
paths:
20+
- ".github/workflows/test-go1_25.yml"
21+
- "**/*.go"
22+
23+
jobs:
24+
build:
25+
runs-on: ubuntu-latest
26+
permissions:
27+
contents: write
28+
strategy:
29+
matrix:
30+
goos: [windows]
31+
goarch: [amd64, 386]
32+
buildtarget: ['release-branch.go1.25']
33+
fail-fast: false
34+
env:
35+
GOOS: ${{ matrix.goos }}
36+
GOARCH: ${{ matrix.goarch }}
37+
CGO_ENABLED: 0
38+
steps:
39+
- name: Show workflow information
40+
run: |
41+
_NAME="$GOOS-$GOARCH"
42+
echo "GOOS: $GOOS, GOARCH: $GOARCH, APPLY-BRANCH: ${{ matrix.buildtarget }}"
43+
echo "ASSET_NAME=$_NAME" >> $GITHUB_ENV
44+
45+
- name: Download source
46+
uses: actions/checkout@v4
47+
with:
48+
repository: 'golang/go'
49+
ref: ${{ matrix.buildtarget }}
50+
51+
# Patches for Go 1.25.x before more minor changes introduces.
52+
- name: Apply patch
53+
run: |
54+
curl -L -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" https://github.com/XTLS/go-win7/raw/refs/heads/build/unified-1-25-patch.diff | patch --verbose -p 1
55+
# curl -L -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" https://github.com/XTLS/go-win7/commit/830f1acfc984be44520621b001096845ebf40c7a.diff | patch --verbose -p 1
56+
# curl -L -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" https://github.com/XTLS/go-win7/commit/b5e4a6d5b3d0b076414d04cc3d6002f816bc0c25.diff | patch --verbose -p 1
57+
# curl -L -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" https://github.com/XTLS/go-win7/commit/949393bde276adbeaf41688f086feb23e24abe88.diff | patch --verbose -p 1
58+
# curl -L -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" https://github.com/XTLS/go-win7/commit/fc29c4ae1cd53d6761d4324c4625cc8a149c55d3.diff | patch --verbose -p 1
59+
60+
- name: Set-up Go
61+
uses: actions/setup-go@v5
62+
with:
63+
#go-version-file: 'src/go.mod'
64+
check-latest: true
65+
66+
- name: Build patched Go
67+
shell: bash
68+
run: |
69+
cd ./src
70+
. ./make.bash "$@" --no-banner
71+
../bin/go tool dist banner
72+
cd ..
73+
74+
- name: Copy binaries into bin
75+
if: matrix.goos != 'linux' || matrix.goarch != 'amd64'
76+
shell: bash
77+
run: |
78+
cd ./bin
79+
DIR="${GOOS}_${GOARCH}"
80+
if [ -d "${DIR}" ]; then
81+
echo "Found ${DIR} copying binaries"
82+
rm ./go*
83+
for BINARY in "${DIR}"/*
84+
do
85+
echo "mv ./${BINARY} ./"
86+
mv ./${BINARY} ./
87+
done
88+
rm -r ./"${DIR}"
89+
rm -r ../pkg/tool/linux_amd64/
90+
fi
91+
cd ..
92+
ls -al ./bin
93+
94+
- name: Upload package to Artifacts
95+
uses: actions/upload-artifact@v4
96+
with:
97+
name: go-for-win7-${{ env.ASSET_NAME }}
98+
path: |
99+
./*

README-eng.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,3 +73,17 @@ These patches must be applied from up to down:
7373
1. https://github.com/XTLS/go-win7/commit/b6c99a977f732ee5553ddc75ae0fe3b47927fc1c / [Git diff](https://github.com/XTLS/go-win7/commit/b6c99a977f732ee5553ddc75ae0fe3b47927fc1c.diff)
7474
1. https://github.com/XTLS/go-win7/commit/36d7775e030192d3bf2dc111d1f6cfa89eae5f0c / [Git diff](https://github.com/XTLS/go-win7/commit/36d7775e030192d3bf2dc111d1f6cfa89eae5f0c.diff)
7575
1. https://github.com/XTLS/go-win7/commit/a3e4d4735a5d89f60b907308b556c5a53614914d / [Git diff](https://github.com/XTLS/go-win7/commit/a3e4d4735a5d89f60b907308b556c5a53614914d.diff)
76+
77+
### Go 1.25
78+
79+
- Windows 8.1 Update 3 / Windows Server 2012 R2: Can run official distributed Go SDK and binaries built from official SDK.
80+
- Windows 7 SP1 / Windows Server 2008 R2: Require patches in SDK, and binaries must be built with patched SDK.
81+
82+
#### Patches for Windows 7 / Windows Server 2008 R2
83+
84+
These patches must be applied from up to down:
85+
86+
1. https://github.com/XTLS/go-win7/commit/830f1acfc984be44520621b001096845ebf40c7a / [Git diff](https://github.com/XTLS/go-win7/commit/830f1acfc984be44520621b001096845ebf40c7a.diff)
87+
1. https://github.com/XTLS/go-win7/commit/b5e4a6d5b3d0b076414d04cc3d6002f816bc0c25 / [Git diff](https://github.com/XTLS/go-win7/commit/b5e4a6d5b3d0b076414d04cc3d6002f816bc0c25.diff)
88+
1. https://github.com/XTLS/go-win7/commit/949393bde276adbeaf41688f086feb23e24abe88 / [Git diff](https://github.com/XTLS/go-win7/commit/949393bde276adbeaf41688f086feb23e24abe88.diff)
89+
1. https://github.com/XTLS/go-win7/commit/fc29c4ae1cd53d6761d4324c4625cc8a149c55d3 / [Git diff](https://github.com/XTLS/go-win7/commit/fc29c4ae1cd53d6761d4324c4625cc8a149c55d3.diff)

README-zho-hans.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,3 +73,17 @@
7373
1. https://github.com/XTLS/go-win7/commit/b6c99a977f732ee5553ddc75ae0fe3b47927fc1c / [Git diff](https://github.com/XTLS/go-win7/commit/b6c99a977f732ee5553ddc75ae0fe3b47927fc1c.diff)
7474
1. https://github.com/XTLS/go-win7/commit/36d7775e030192d3bf2dc111d1f6cfa89eae5f0c / [Git diff](https://github.com/XTLS/go-win7/commit/36d7775e030192d3bf2dc111d1f6cfa89eae5f0c.diff)
7575
1. https://github.com/XTLS/go-win7/commit/a3e4d4735a5d89f60b907308b556c5a53614914d / [Git diff](https://github.com/XTLS/go-win7/commit/a3e4d4735a5d89f60b907308b556c5a53614914d.diff)
76+
77+
### Go 1.25
78+
79+
- Windows 8.1 Update 3 / Windows Server 2012 R2: 可直接运行官方 Go SDK 及其构建的二进制文件。
80+
- Windows 7 SP1 / Windows Server 2008 R2:需要在 SDK 中植入补丁,并且只能运行用修补后的 SDK 构建的二进制。
81+
82+
#### 用于 Windows 7 / Windows Server 2008 R2 的补丁
83+
84+
这些补丁必须按照从上到下的顺序来修补:
85+
86+
1. https://github.com/XTLS/go-win7/commit/830f1acfc984be44520621b001096845ebf40c7a / [Git diff](https://github.com/XTLS/go-win7/commit/830f1acfc984be44520621b001096845ebf40c7a.diff)
87+
1. https://github.com/XTLS/go-win7/commit/b5e4a6d5b3d0b076414d04cc3d6002f816bc0c25 / [Git diff](https://github.com/XTLS/go-win7/commit/b5e4a6d5b3d0b076414d04cc3d6002f816bc0c25.diff)
88+
1. https://github.com/XTLS/go-win7/commit/949393bde276adbeaf41688f086feb23e24abe88 / [Git diff](https://github.com/XTLS/go-win7/commit/949393bde276adbeaf41688f086feb23e24abe88.diff)
89+
1. https://github.com/XTLS/go-win7/commit/fc29c4ae1cd53d6761d4324c4625cc8a149c55d3 / [Git diff](https://github.com/XTLS/go-win7/commit/fc29c4ae1cd53d6761d4324c4625cc8a149c55d3.diff)

0 commit comments

Comments
 (0)