Skip to content

Commit

Permalink
chore: use nushell in ci
Browse files Browse the repository at this point in the history
  • Loading branch information
oberrich committed Jan 10, 2025
1 parent 197a7d1 commit 296d21b
Showing 1 changed file with 31 additions and 24 deletions.
55 changes: 31 additions & 24 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,36 +92,43 @@ jobs:
- name: Use nushell
if: matrix.os == 'windows-11-preview_aarch64'
run: |
use std log
let $nu_version = nu --version;
log info "Using `nu` version `$nu_version`"
log info "Installing LLVM 19.1.5 (aarch64)..."
^r#'${{github.workspace}}\LLVM-19.1.5-woa64.exe'# /S
log info "LLVM 19.1.5 (aarch64) installation completed."
function log {
param(
[Parameter(Mandatory=$true)] [string]$Message,
[string]$Level = "INFO"
)
Write-Host "$(Get-Date -Format 'yyyy-MM-dd HH:mm:ss') [$Level] - $Message"
}
log -Level "INFO" -Message "Installing LLVM 19.1.5 (aarch64)..."
& "$env:GITHUB_WORKSPACE\LLVM-19.1.5-woa64.exe" /S
log -Level "INFO" -Message "LLVM 19.1.5 (aarch64) installation completed."
log info "Installing Git 2.48.0-rc1 (aarch64)..."
^r#'${{github.workspace}}\Git-2.48.0-rc1-arm64.exe'# /VERYSILENT
log info "Git 2.48.0-rc1 (aarch64) installation completed."
log -Level "INFO" -Message "Installing Git 2.48.0-rc1 (aarch64)..."
& "$env:GITHUB_WORKSPACE\Git-2.48.0-rc1-arm64.exe" /VERYSILENT
log -Level "INFO" -Message "Git 2.48.0-rc1 (aarch64) installation completed."
log info "Installing Visual Studio 2022 Build Tools (aarch64)..."
log -Level "INFO" -Message "Installing Visual Studio 2022 Build Tools (aarch64)..."
choco install visualstudio2022buildtools -y --no-progress --package-parameters "--add Microsoft.VisualStudio.Component.VC.Tools.ARM64 --add Microsoft.VisualStudio.Component.Windows11SDK.22621"
log info "Visual Studio 2022 Build Tools (aarch64) installation completed."
log -Level "INFO" -Message "Visual Studio 2022 Build Tools (aarch64) installation completed."
http get "https://win.rustup.rs/aarch64" | save r#'${{github.workspace}}\rustup-init.exe'#
^r#'${{github.workspace}}\rustup-init.exe'# --default-host aarch64-pc-windows-msvc --default-toolchain nightly -y
log info "Rust (nightly, aarch64) installation completed."
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
Write-Host 'Rust (nightly, aarch64) installation completed.'
let exports = [
$'($env.USERPROFILE)/.cargo/bin', # Rust
$'($env.ProgramFiles)/Git/cmd', # Git
$'($env.ProgramFiles)/Git/bin', # Bash
]
$exports = @(
"$env:USERPROFILE\.cargo\bin", # Rust
"$env:ProgramFiles\Git\cmd", # Git
"$env:ProgramFiles\Git\bin" # Bash
)
$exports | ForEach-Object {
$path = $_
Add-Content -Path $env:GITHUB_PATH -Value $path
Write-Host "Added $path to `$env:GITHUB_PATH`"
}
for path in $exports {
$'($path)' | save $env.GITHUB_PATH --append
log info $'added `($path)` to `$env.GITHUB_PATH`'
foreach ($path in $exports) {
}
- name: Install Rust
Expand Down

0 comments on commit 296d21b

Please sign in to comment.