Skip to content

Commit 363ef65

Browse files
committed
Retire legacy Windows builds and use modern agent toolchains
1 parent 23a4e4b commit 363ef65

12 files changed

Lines changed: 113 additions & 73 deletions

File tree

‎.github/scripts/ci-plan.mjs‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,8 @@ export function planCi({ files, metadata, root, eventName = "pull_request", rust
147147
duckdb_changed: nativeChanges.has("duckdb"),
148148
duckdb_windows: sharedRust || files.some((file) => file.startsWith("agents/drivers/duckdb/")),
149149
windows_standard: windowsWin7Candidate || files.some((file) => file === ".github/scripts/assert-windows-stack-reserve.test.ps1" || file === ".github/scripts/test-windows-stack-reserve.ps1"),
150-
windows_win7_bundle: win7InfrastructureChanged || win7DependencyChanged || unknownRust || (rust && unknownMember),
150+
// Windows 11+ is the supported desktop baseline; legacy bundles are retired.
151+
windows_win7_bundle: false,
151152
windows_win7_candidate: windowsWin7Candidate,
152153
windows_win7_affected_packages: [...win7Affected].sort(),
153154
windows_win7_reasons: windowsWin7Reasons,

‎.github/scripts/ci-plan.test.mjs‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ test("old Win7 Rust paths remain candidates through the dependency graph", () =>
139139
}
140140
});
141141

142-
test("Win7 infrastructure changes remain candidates outside the Cargo graph", () => {
142+
test("Windows infrastructure changes retain standard checks without legacy bundles", () => {
143143
for (const file of [
144144
".github/scripts/assert-win7-pe-compat.ps1",
145145
".github/scripts/assert-windows-stack-reserve.ps1",
@@ -170,7 +170,7 @@ test("Win7 infrastructure changes remain candidates outside the Cargo graph", ()
170170
const result = plan([file]);
171171
assert.equal(result.windows_win7_candidate, true, file);
172172
assert.equal(result.windows_standard, true, file);
173-
assert.equal(result.windows_win7_bundle, true, file);
173+
assert.equal(result.windows_win7_bundle, false, file);
174174
}
175175
});
176176

@@ -182,27 +182,27 @@ test("Windows stack test changes run the standard Windows checks", () => {
182182
}
183183
});
184184

185-
test("Win7 dependency inputs fail open", () => {
185+
test("dependency inputs retain standard Windows coverage without legacy bundles", () => {
186186
for (const file of ["Cargo.toml", "Cargo.lock", "src-tauri/Cargo.toml", "crates/dbx-cli/Cargo.toml"]) {
187187
assert.equal(plan([file]).windows_win7_candidate, true, file);
188188
assert.equal(plan([file]).windows_standard, true, file);
189-
assert.equal(plan([file]).windows_win7_bundle, true, file);
189+
assert.equal(plan([file]).windows_win7_bundle, false, file);
190190
}
191191
});
192192

193-
test("unknown Rust changes and unknown diffs remain Win7 candidates", () => {
193+
test("unknown Rust changes retain standard Windows coverage without legacy bundles", () => {
194194
for (const files of [["crates/new-engine/src/lib.rs"], null]) {
195195
const result = plan(files);
196196
assert.equal(result.windows_win7_candidate, true);
197197
assert.equal(result.windows_standard, true);
198-
assert.equal(result.windows_win7_bundle, true);
198+
assert.equal(result.windows_win7_bundle, false);
199199
}
200200
const fixture = structuredClone(metadata);
201201
fixture.workspace_members.push("new-engine");
202202
fixture.packages.push({ id: "new-engine", name: "new-engine", manifest_path: `${root}/crates/new-engine/Cargo.toml`, dependencies: [] });
203203
const result = plan(["crates/dbx-web/src/lib.rs"], { metadata: fixture });
204204
assert.equal(result.windows_standard, true);
205-
assert.equal(result.windows_win7_bundle, true);
205+
assert.equal(result.windows_win7_bundle, false);
206206
assert.equal(result.windows_win7_reasons.unknown_member, true);
207207
assert.equal(plan(["docs/README.md"], { metadata: fixture }).windows_win7_bundle, false);
208208
});
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
import test from "node:test";
2+
import assert from "node:assert/strict";
3+
import fs from "node:fs";
4+
5+
const read = (file) => fs.readFileSync(new URL(file, import.meta.url), "utf8");
6+
function job(file, name) {
7+
const source = read(`../workflows/${file}`);
8+
return source.split(`\n ${name}:\n`)[1]?.split(/\n [\w-]+:\n/)[0] ?? "";
9+
}
10+
11+
test("automatic CI and releases do not build legacy Windows bundles", () => {
12+
assert.match(read("./ci-plan.mjs"), /windows_win7_bundle: false/);
13+
for (const name of ["build-windows-7-offline", "build-windows-7-static-browser"]) {
14+
assert.match(job("release.yml", name), /\n if: false\n/);
15+
}
16+
const cleanup = job("release.yml", "cleanup-release-signatures");
17+
assert.match(cleanup, /needs: \[build, build-windows\]/);
18+
});
19+
20+
test("DuckDB Windows CI uses the supported stable target", () => {
21+
const driver = job("ci.yml", "duckdb-windows-driver");
22+
assert.match(driver, /RUSTUP_TOOLCHAIN: 1\.99\.1/);
23+
assert.match(driver, /--target x86_64-pc-windows-msvc/);
24+
assert.doesNotMatch(driver, /nightly|build-std|win7|Windows 7/);
25+
assert.match(driver, /validate_windows_pe_dependencies\.py/);
26+
assert.match(driver, /"\$DRIVER" < \/dev\/null/);
27+
});
28+
29+
test("Windows agent release matrices and Go compilers use modern targets", () => {
30+
const source = read("../workflows/agents-release.yml");
31+
assert.doesNotMatch(source, /target: x86_64-win7-windows-msvc|win7: true|go-version: "1\.20\.14"/);
32+
for (const name of ["build-duckdb-native", "build-tdengine-native"]) {
33+
const block = job("agents-release.yml", name);
34+
assert.match(block, /target: x86_64-pc-windows-msvc/);
35+
assert.match(block, /platform: windows-x64/);
36+
}
37+
assert.match(source, /go-version: "1\.27\.3"/);
38+
});

‎.github/workflows/agents-release.yml‎

Lines changed: 25 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ jobs:
169169
- uses: actions/checkout@v7.0.1
170170
- uses: actions/setup-go@v7.0.0
171171
with:
172-
go-version: "1.20.14"
172+
go-version: "1.27.3"
173173
- name: Test Oracle native agent
174174
working-directory: agents/drivers/oracle-go
175175
run: go test ./...
@@ -195,20 +195,20 @@ jobs:
195195
CGO_ENABLED=0 GOOS="$goos" GOARCH="$goarch" go build -trimpath -ldflags="-s -w" -o "$output" .
196196
done
197197
ls -lh ../../../release-native
198-
# Go 1.20 is the last release that supports Windows 7; keep other targets on Go 1.22.
199-
- name: Set up Go for Windows 7-compatible Oracle agent
198+
# Windows x64 uses the same current stable Go toolchain as the other targets.
199+
- name: Set up Go for Windows x64 Oracle agent
200200
uses: actions/setup-go@v7.0.0
201201
with:
202-
go-version: "1.20.14"
202+
go-version: "1.27.3"
203203
cache-dependency-path: agents/drivers/oracle-go/go.sum
204-
- name: Build Windows 7-compatible Oracle agent
204+
- name: Build Windows x64 Oracle agent
205205
shell: bash
206206
working-directory: agents/drivers/oracle-go
207207
run: |
208208
output="../../../release-native/dbx-agent-oracle-windows-x64.exe"
209209
CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -trimpath -ldflags="-s -w" -o "$output" .
210210
go version -m "$output" | tee /tmp/oracle-windows-x64-build-info.txt
211-
grep -q ': go1\.20\.14$' /tmp/oracle-windows-x64-build-info.txt
211+
grep -q ': go1\.27\.3$' /tmp/oracle-windows-x64-build-info.txt
212212
- uses: actions/upload-artifact@v7.0.2
213213
with:
214214
name: oracle-native
@@ -225,7 +225,7 @@ jobs:
225225
- uses: actions/checkout@v7.0.1
226226
- uses: actions/setup-go@v7.0.0
227227
with:
228-
# godror 需要 Go >= 1.21;thin 的 Windows 7 兼容线仍由 build-oracle-native 用 Go 1.20 构建。
228+
# godror 与 thin 变体使用同一当前稳定 Go 工具链。
229229
go-version: "1.27.x"
230230
cache-dependency-path: agents/drivers/oracle-go/go.sum
231231
- name: Prepare MinGW-w64 and the Oracle Instant Client
@@ -290,7 +290,7 @@ jobs:
290290
run: |
291291
mkdir -p ../../../release-native
292292
output="../../../release-native/dbx-agent-oracle-oci-windows-x64.exe"
293-
# go.mod 的 go 指令保持 1.20(thin 的 Windows 7 兼容线);OCI 变体要求更高,
293+
# OCI 变体的构建目标要求更高的 Go 语言基线,
294294
# 因此允许就地更新 go.mod —— 只影响本任务的检出目录,不会被提交。
295295
go build -mod=mod -tags oci -trimpath -ldflags="-s -w" -o "$output" .
296296
ls -lh ../../../release-native
@@ -307,7 +307,7 @@ jobs:
307307
- uses: actions/checkout@v7.0.1
308308
- uses: actions/setup-go@v7.0.0
309309
with:
310-
go-version: "1.20.14"
310+
go-version: "1.27.3"
311311
- name: Test Xugu native agent
312312
working-directory: agents/drivers/xugu
313313
run: GONOSUMDB=gitee.com/XuguDB/go-xugu-driver go test ./...
@@ -347,7 +347,7 @@ jobs:
347347
- uses: actions/checkout@v7.0.1
348348
- uses: actions/setup-go@v7.0.0
349349
with:
350-
go-version: "1.20.14"
350+
go-version: "1.27.3"
351351
- name: Test RabbitMQ native agent
352352
working-directory: agents/drivers/rabbitmq
353353
run: go test ./...
@@ -373,20 +373,20 @@ jobs:
373373
CGO_ENABLED=0 GOOS="$goos" GOARCH="$goarch" go build -trimpath -ldflags="-s -w" -o "$output" .
374374
done
375375
ls -lh ../../../release-native
376-
# Go 1.20 is the last release that supports Windows 7; keep other targets on Go 1.22.
377-
- name: Set up Go for Windows 7-compatible RabbitMQ agent
376+
# Windows x64 uses the same current stable Go toolchain as the other targets.
377+
- name: Set up Go for Windows x64 RabbitMQ agent
378378
uses: actions/setup-go@v7.0.0
379379
with:
380-
go-version: "1.20.14"
380+
go-version: "1.27.3"
381381
cache-dependency-path: agents/drivers/rabbitmq/go.sum
382-
- name: Build Windows 7-compatible RabbitMQ agent
382+
- name: Build Windows x64 RabbitMQ agent
383383
shell: bash
384384
working-directory: agents/drivers/rabbitmq
385385
run: |
386386
output="../../../release-native/dbx-agent-rabbitmq-windows-x64.exe"
387387
CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -trimpath -ldflags="-s -w" -o "$output" .
388388
go version -m "$output" | tee /tmp/rabbitmq-windows-x64-build-info.txt
389-
grep -q ': go1\.20\.14$' /tmp/rabbitmq-windows-x64-build-info.txt
389+
grep -q ': go1\.27\.3$' /tmp/rabbitmq-windows-x64-build-info.txt
390390
- uses: actions/upload-artifact@v7.0.2
391391
with:
392392
name: rabbitmq-native
@@ -680,7 +680,7 @@ jobs:
680680
- uses: actions/checkout@v7.0.1
681681
- uses: actions/setup-go@v7.0.0
682682
with:
683-
go-version: "1.20.14"
683+
go-version: "1.27.3"
684684
- name: Test Kingbase native agent
685685
working-directory: agents/drivers/kingbase-go
686686
run: go test ./...
@@ -900,29 +900,22 @@ jobs:
900900
platform: windows-aarch64
901901
extension: .exe
902902
- runner: windows-2022
903-
target: x86_64-win7-windows-msvc
903+
target: x86_64-pc-windows-msvc
904904
platform: windows-x64
905905
extension: .exe
906-
win7: true
907906
runs-on: ${{ matrix.runner }}
908907
env:
909-
RUSTUP_TOOLCHAIN: ${{ matrix.win7 == true && 'nightly-2026-10-25' || '1.99.1' }}
908+
RUSTUP_TOOLCHAIN: 1.99.1
910909
CARGO_INCREMENTAL: "0"
911910
CARGO_TARGET_DIR: ${{ github.workspace }}/target/duckdb-driver
912911
RUSTC_WRAPPER: sccache
913912
SCCACHE_GHA_ENABLED: ${{ secrets.SCCACHE_S3_BUCKET == '' && 'true' || 'false' }}
914913
steps:
915914
- uses: actions/checkout@v7.0.1
916915
- uses: dtolnay/rust-toolchain@1.99.1
917-
if: runner.os != 'Linux' && matrix.win7 != true
916+
if: runner.os != 'Linux'
918917
with:
919918
targets: ${{ matrix.target }}
920-
- name: Setup Rust for Windows 7
921-
if: matrix.win7 == true
922-
uses: dtolnay/rust-toolchain@nightly
923-
with:
924-
toolchain: ${{ env.RUSTUP_TOOLCHAIN }}
925-
components: rust-src
926919
- uses: actions/setup-python@v7.1.0
927920
if: runner.os == 'Windows'
928921
with:
@@ -965,7 +958,7 @@ jobs:
965958
run: |
966959
if [ "${{ runner.os }}" = "Windows" ]; then
967960
# An env RUSTFLAGS replaces .cargo/config.toml target rustflags; keep
968-
# the 8 MiB main-thread stack of the DBX app for the Win7 driver too.
961+
# the 8 MiB main-thread stack of the DBX app for the Windows driver too.
969962
export RUSTFLAGS="${RUSTFLAGS:+$RUSTFLAGS }-C target-feature=+crt-static -C link-arg=/STACK:8388608"
970963
fi
971964
if [ -n "${{ matrix.manylinux_image }}" ]; then
@@ -1013,18 +1006,13 @@ jobs:
10131006
fi
10141007
'
10151008
else
1016-
BUILD_STD=()
1017-
if [ "${{ matrix.win7 }}" = "true" ]; then
1018-
BUILD_STD=(-Z build-std=std,panic_abort)
1019-
fi
10201009
pushd agents/drivers/duckdb
10211010
cargo build \
10221011
--manifest-path Cargo.toml \
10231012
--locked \
10241013
--release \
10251014
--bin dbx-duckdb-driver \
1026-
--target "${{ matrix.target }}" \
1027-
"${BUILD_STD[@]}"
1015+
--target "${{ matrix.target }}"
10281016
popd
10291017
fi
10301018
mkdir -p release-native
@@ -1135,30 +1123,23 @@ jobs:
11351123
platform: windows-aarch64
11361124
extension: .exe
11371125
- runner: windows-2022
1138-
target: x86_64-win7-windows-msvc
1126+
target: x86_64-pc-windows-msvc
11391127
platform: windows-x64
11401128
extension: .exe
11411129
smoke: true
1142-
win7: true
11431130
runs-on: ${{ matrix.runner }}
11441131
env:
1145-
RUSTUP_TOOLCHAIN: ${{ matrix.win7 == true && 'nightly-2026-10-25' || '1.99.1' }}
1132+
RUSTUP_TOOLCHAIN: 1.99.1
11461133
CARGO_INCREMENTAL: "0"
11471134
CARGO_TARGET_DIR: ${{ github.workspace }}/target/tdengine-driver
11481135
RUSTC_WRAPPER: sccache
11491136
SCCACHE_GHA_ENABLED: ${{ secrets.SCCACHE_S3_BUCKET == '' && 'true' || 'false' }}
11501137
steps:
11511138
- uses: actions/checkout@v7.0.1
11521139
- uses: dtolnay/rust-toolchain@1.99.1
1153-
if: runner.os != 'Linux' && matrix.win7 != true
1140+
if: runner.os != 'Linux'
11541141
with:
11551142
targets: ${{ matrix.target }}
1156-
- name: Setup Rust for Windows 7
1157-
if: matrix.win7 == true
1158-
uses: dtolnay/rust-toolchain@nightly
1159-
with:
1160-
toolchain: ${{ env.RUSTUP_TOOLCHAIN }}
1161-
components: rust-src
11621143
- uses: mozilla-actions/sccache-action@fc920bf0ec8de6ee65d409111f7ec508035751ba # v0.0.11
11631144
with:
11641145
version: "v0.16.0"
@@ -1240,17 +1221,12 @@ jobs:
12401221
fi
12411222
'
12421223
else
1243-
BUILD_STD=()
1244-
if [ "${{ matrix.win7 }}" = "true" ]; then
1245-
BUILD_STD=(-Z build-std=std,panic_abort)
1246-
fi
12471224
cargo build \
12481225
--manifest-path agents/drivers/tdengine/Cargo.toml \
12491226
--locked \
12501227
--release \
12511228
--bin dbx-tdengine-driver \
1252-
--target "${{ matrix.target }}" \
1253-
"${BUILD_STD[@]}"
1229+
--target "${{ matrix.target }}"
12541230
fi
12551231
mkdir -p release-native
12561232
cp \

‎.github/workflows/ci.yml‎

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -845,13 +845,13 @@ jobs:
845845
runs-on: windows-2022
846846
timeout-minutes: 60
847847
env:
848-
RUSTUP_TOOLCHAIN: nightly-2026-10-25
848+
RUSTUP_TOOLCHAIN: 1.99.1
849849
CARGO_INCREMENTAL: "0"
850850
CARGO_TARGET_DIR: ${{ github.workspace }}/target/duckdb-driver
851851
# An env RUSTFLAGS replaces .cargo/config.toml target rustflags, so the
852852
# 8 MiB main-thread stack must be repeated here: without it the Windows PE
853853
# keeps the 1 MiB linker default and deep connect/serde call stacks abort
854-
# with 0xC00000FD ("DBX 已停止工作"). Guarded by assert-win7-pe-compat.ps1.
854+
# with 0xC00000FD ("DBX 已停止工作"). The standard Windows stack check covers the same reservation.
855855
RUSTFLAGS: -C debuginfo=line-tables-only -C target-feature=+crt-static -C link-arg=/STACK:8388608
856856
RUSTC_WRAPPER: sccache
857857
# Prefer S3 when available; GitHub's 10 GB cache quota evicts the shared
@@ -864,11 +864,10 @@ jobs:
864864
steps:
865865
- uses: actions/checkout@v7.0.1
866866

867-
- name: Setup Rust for Windows 7
868-
uses: dtolnay/rust-toolchain@nightly
867+
- name: Setup Rust for supported Windows
868+
uses: dtolnay/rust-toolchain@1.99.1
869869
with:
870870
toolchain: ${{ env.RUSTUP_TOOLCHAIN }}
871-
components: rust-src
872871

873872
- name: Setup MSVC
874873
uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1
@@ -907,12 +906,12 @@ jobs:
907906
- name: Build DuckDB Windows driver
908907
shell: pwsh
909908
working-directory: agents/drivers/duckdb
910-
run: cargo build --locked --release --bin dbx-duckdb-driver --target x86_64-win7-windows-msvc -Z build-std=std,panic_abort
909+
run: cargo build --locked --release --bin dbx-duckdb-driver --target x86_64-pc-windows-msvc
911910

912911
- name: Validate DuckDB Windows driver
913912
shell: bash
914913
run: |
915-
DRIVER="target/duckdb-driver/x86_64-win7-windows-msvc/release/dbx-duckdb-driver.exe"
914+
DRIVER="target/duckdb-driver/x86_64-pc-windows-msvc/release/dbx-duckdb-driver.exe"
916915
python agents/scripts/validate_windows_pe_dependencies.py "$DRIVER"
917916
"$DRIVER" < /dev/null
918917

‎.github/workflows/release.yml‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -596,6 +596,8 @@ jobs:
596596
}
597597
598598
build-windows-7-offline:
599+
# Retired: supported Windows desktop releases target Windows 11+.
600+
if: false
599601
needs: release-ready
600602
runs-on: windows-2022
601603
environment: release-signing
@@ -764,6 +766,8 @@ jobs:
764766
}
765767
766768
build-windows-7-static-browser:
769+
# Retired: supported Windows desktop releases target Windows 11+.
770+
if: false
767771
needs: release-ready
768772
runs-on: windows-2022
769773
strategy:
@@ -996,7 +1000,7 @@ jobs:
9961000
run: ${SCCACHE_PATH} --show-stats
9971001

9981002
cleanup-release-signatures:
999-
needs: [build, build-windows, build-windows-7-offline]
1003+
needs: [build, build-windows]
10001004
runs-on: ubuntu-latest
10011005
steps:
10021006
- name: Remove standalone updater signature assets

0 commit comments

Comments
 (0)