From 367ccead2c2761b249be29a438298b46841621f1 Mon Sep 17 00:00:00 2001 From: oberrich Date: Fri, 10 Jan 2025 07:20:35 +0100 Subject: [PATCH] chore: use nushell in ci --- .github/workflows/rust.yml | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index f6f9673..43a7aef 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -62,26 +62,27 @@ jobs: Set-ExecutionPolicy Bypass -Scope Process -Force [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072 + Invoke-WebRequest -Uri 'https://win.rustup.rs/aarch64' -OutFile '${{github.workspace}}\rustup-init.exe'; + Invoke-WebRequest -Uri 'https://chocolatey.org/install.ps1' -OutFile '${{github.workspace}}\install.ps1'; $installs = @( - @{ Name = 'Chocolatey'; Action = { - iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1')) - }}, + @{ Name = 'Chocolatey'; Url = 'https://chocolatey.org/install.ps1'; Action = { & "${{github.workspace}}\install.ps1" }}, @{ Name = 'Visual Studio 2022 Build Tools (aarch64)'; Action = { choco install visualstudio2022buildtools -y --no-progress --silent --package-parameters '--add Microsoft.VisualStudio.Component.VC.Tools.ARM64 --add Microsoft.VisualStudio.Component.Windows11SDK.22621' }}, - @{ Name = 'Rust (nightly, aarch64)'; Action = { + @{ Name = 'Rust (nightly, aarch64)'; Url = 'https://win.rustup.rs/aarch64'; Action = { Invoke-WebRequest -Uri 'https://win.rustup.rs/aarch64' -OutFile '${{github.workspace}}\rustup-init.exe'; & '${{github.workspace}}\rustup-init.exe' --default-host aarch64-pc-windows-msvc --default-toolchain nightly -y }}, - @{ Name = 'LLVM 19.1.5'; Action = { - & '${{github.workspace}}\LLVM-19.1.5-woa64.exe' /S - }}, - @{ Name = 'Git 2.48.0-rc1'; Action = { - & '${{github.workspace}}\Git-2.48.0-rc1-arm64.exe' /VERYSILENT - }} + @{ Name = 'LLVM 19.1.5'; Url = $null; Action = { & '${{github.workspace}}\LLVM-19.1.5-woa64.exe' /S }}, + @{ Name = 'Git 2.48.0-rc1'; Url = $null; Action = { & '${{github.workspace}}\Git-2.48.0-rc1-arm64.exe' /VERYSILENT }} ) $installs | ForEach-Object { + if ($_.Url -ne $null) { + Write-Host "Downloading $_.Name from $_.Url..." + Invoke-WebRequest -Uri $install.Url -OutFile "${{github.workspace}}\" + (Split-Path $_.Url -Leaf) + } + Log "Starting installation of $($_.Name)..." try { & $_.Action > $null 2>&1