4040 - name : Install Build Tools
4141 if : matrix.os == 'windows-11-preview_aarch64'
4242 run : |
43- Set-ExecutionPolicy Bypass -Scope Process -Force
44- [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072
45-
46- function Log { param([string]$Message, [string]$Level = "INFO")
47- $timestamp = Get-Date -Format 'yyyy-MM-dd HH:mm:ss'
48- if ($Level -eq "ERROR") {
49- Write-Host "$timestamp [ERROR] - $Message" -ForegroundColor Red
50- } else {
51- Write-Host "$timestamp [$Level] - $Message"
52- }
53- }
54-
5543 $deps = @(
5644 @{ Name = 'Visual Studio 2022 Build Tools (aarch64)';
5745 Url = 'https://aka.ms/vs/17/release/vs_buildtools.exe';
@@ -68,26 +56,35 @@ jobs:
6856 Url = 'https://static.rust-lang.org/rustup/dist/aarch64-pc-windows-msvc/rustup-init.exe';
6957 Args = @('--default-host', 'aarch64-pc-windows-msvc', '--default-toolchain', 'nightly', '-y') }
7058 )
71-
59+
60+ $paths = @(
61+ " $env:ProgramFiles\G it\c md" , # Git
62+ " $env:ProgramFiles\G it\b in" , # Bash
63+ " $env:ProgramData\c hocolatey\b in" , # Chocolatey
64+ " $env:USERPROFILE\. cargo\b in" # Rust
65+ )
66+
67+ function Log { param([string]$Message, [string]$Level = "INFO")
68+ $timestamp = Get-Date -Format 'yyyy-MM-dd HH:mm:ss'
69+ if ($Level -eq "ERROR") {
70+ Write-Host "$timestamp [ERROR] - $Message" -ForegroundColor Red
71+ } else {
72+ Write-Host "$timestamp [$Level] - $Message"
73+ }
74+ }
75+
7276 $deps | ForEach-Object {
7377 $install_file = $_.Url
7478 if ($_.Url -match "^https?://") {
7579 Log "Downloading $($_.Name) from '$($_.Url)'..."
7680 $install_file = Join-Path "${{ github.workspace }}" (Split-Path $_.Url -Leaf)
77- Invoke-WebRequest -Uri $_.Url -OutFile $install_file
81+ Invoke-WebRequest -Uri $_.Url -OutFile $install_file -UseBasicParsing
7882 }
7983
8084 Log "Installing $($_.Name)..."
8185 Start-Process -FilePath $install_file -ArgumentList $_.Args -NoNewWindow -Wait
8286 Log "$($_.Name) installation completed."
8387 }
84-
85- $paths = @(
86- "$env:ProgramFiles\Git\cmd", # Git
87- "$env:ProgramFiles\Git\bin", # Bash
88- "$env:ProgramData\chocolatey\bin", # Chocolatey
89- "$env:USERPROFILE\.cargo\bin" # Rust
90- )
9188
9289 $paths | ForEach-Object {
9390 Add-Content -Path $env:GITHUB_PATH -Value "$($_)" -Encoding utf8
0 commit comments