40
40
- name : Install Build Tools
41
41
if : matrix.os == 'windows-11-preview_aarch64'
42
42
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
-
55
43
$deps = @(
56
44
@{ Name = 'Visual Studio 2022 Build Tools (aarch64)';
57
45
Url = 'https://aka.ms/vs/17/release/vs_buildtools.exe';
@@ -68,26 +56,35 @@ jobs:
68
56
Url = 'https://static.rust-lang.org/rustup/dist/aarch64-pc-windows-msvc/rustup-init.exe';
69
57
Args = @('--default-host', 'aarch64-pc-windows-msvc', '--default-toolchain', 'nightly', '-y') }
70
58
)
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
+
72
76
$deps | ForEach-Object {
73
77
$install_file = $_.Url
74
78
if ($_.Url -match "^https?://") {
75
79
Log "Downloading $($_.Name) from '$($_.Url)'..."
76
80
$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
78
82
}
79
83
80
84
Log "Installing $($_.Name)..."
81
85
Start-Process -FilePath $install_file -ArgumentList $_.Args -NoNewWindow -Wait
82
86
Log "$($_.Name) installation completed."
83
87
}
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
- )
91
88
92
89
$paths | ForEach-Object {
93
90
Add-Content -Path $env:GITHUB_PATH -Value "$($_)" -Encoding utf8
0 commit comments