Skip to content

Commit 796ea60

Browse files
alphaqiuclaude
andcommitted
fix(ci): Update GitHub Actions workflows for Windows 11 and fix shell compatibility
- Update build.yml to use windows-2022 instead of windows-latest - Update security.yml to use windows-2022 and fix MSRV check shell compatibility - Add PowerShell-specific MSRV check for Windows in security.yml - Install bc and jq dependencies in coverage.yml for Ubuntu - Fix coverage threshold check script with proper dependencies Co-Authored-By: Claude (glm-4.7) <noreply@anthropic.com>
1 parent 22ae23d commit 796ea60

3 files changed

Lines changed: 24 additions & 4 deletions

File tree

.github/workflows/build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ jobs:
193193
# Build for Windows
194194
build-windows:
195195
name: Build Windows (x86_64)
196-
runs-on: windows-latest
196+
runs-on: windows-2022
197197

198198
defaults:
199199
run:
@@ -240,7 +240,7 @@ jobs:
240240
# Build for Windows ARM64
241241
build-windows-arm64:
242242
name: Build Windows (ARM64)
243-
runs-on: windows-latest
243+
runs-on: windows-2022
244244

245245
defaults:
246246
run:

.github/workflows/coverage.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@ jobs:
1313
- name: Checkout code
1414
uses: actions/checkout@v4
1515

16+
- name: Install dependencies
17+
run: |
18+
sudo apt-get update
19+
sudo apt-get install -y bc jq
20+
1621
- name: Install Rust toolchain
1722
uses: dtolnay/rust-toolchain@stable
1823

.github/workflows/security.yml

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@ jobs:
1212
runs-on: ${{ matrix.os }}
1313
strategy:
1414
matrix:
15-
os: [ubuntu-latest, macos-latest, windows-latest]
15+
os: [ubuntu-latest, macos-latest, windows-2022]
1616
include:
1717
- os: ubuntu-latest
1818
target: x86_64-unknown-linux-gnu
1919
- os: macos-latest
2020
target: x86_64-apple-darwin
21-
- os: windows-latest
21+
- os: windows-2022
2222
target: x86_64-pc-windows-msvc
2323

2424
steps:
@@ -80,6 +80,7 @@ jobs:
8080
cargo audit || echo "⚠️ Security audit found potential issues"
8181
8282
- name: Check MSRV in Cargo.toml
83+
if: runner.os != 'Windows'
8384
run: |
8485
if grep -q "rust-version" Cargo.toml; then
8586
echo "✅ MSRV declared in Cargo.toml"
@@ -89,6 +90,20 @@ jobs:
8990
exit 1
9091
fi
9192
93+
- name: Check MSRV in Cargo.toml (Windows)
94+
if: runner.os == 'Windows'
95+
shell: pwsh
96+
run: |
97+
Write-Host "Checking MSRV in Cargo.toml..."
98+
$content = Get-Content Cargo.toml -Raw
99+
if ($content -match "rust-version") {
100+
Write-Host "✅ MSRV declared in Cargo.toml"
101+
Write-Host $content | Select-String "rust-version"
102+
} else {
103+
Write-Host "❌ ERROR: MSRV not declared in Cargo.toml"
104+
exit 1
105+
}
106+
92107
- name: Security summary
93108
run: |
94109
echo "## Security Verification" >> $GITHUB_STEP_SUMMARY

0 commit comments

Comments
 (0)