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 876d98a commit c58da7e
Showing 1 changed file with 25 additions and 37 deletions.
62 changes: 25 additions & 37 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,49 +48,40 @@ jobs:
latest: true
filename: 'Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle'
out-file-path: 'deps'
- if: matrix.os == 'windows-11-preview_aarch64'
uses: robinraju/release-downloader@v1
with:
repository: 'MrKristofere/WSA-with-GApps-Releases'
tag: 'wsap-2407.40000.4.0'
extract: true
filename: 'Deps.for.WSA.zip'
out-file-path: 'deps'

- if: matrix.os == 'windows-11-preview_aarch64'
uses: robinraju/release-downloader@v1
with:
repository: 'microsoft/microsoft-ui-xaml'
tag: 'v2.8.6'
filename: 'Microsoft.UI.Xaml.2.8.arm64.appx'
out-file-path: 'deps'
- name: Use nushell
if: matrix.os == 'windows-11-preview_aarch64'
run: |
function log {
param(
[Parameter(Mandatory=$true)] [string]$Message,
[string]$Level = "INFO"
)
Write-Host "$(Get-Date -Format 'yyyy-MM-dd HH:mm:ss') [$Level] - $Message"
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."
function Install {
param(
[Parameter(Mandatory=$true)] [string]$Name,
[Parameter(Mandatory=$true)] [scriptblock]$Action,
[string]$Level = "INFO"
)
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 -Level $Level -Message "Installing $SoftwareName..."
&$Action
log -Level $Level -Message "$SoftwareName installation completed."
}
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 -Level "INFO" -Message "Visual Studio 2022 Build Tools (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.'
$installs = @(
@{ Name = "LLVM 19.1.5 (aarch64)"; Action = { & "$env:GITHUB_WORKSPACE\LLVM-19.1.5-woa64.exe" /S } },
@{ Name = "Git 2.48.0-rc1 (aarch64)"; Action = { & "$env:GITHUB_WORKSPACE\Git-2.48.0-rc1-arm64.exe" /VERYSILENT } },
@{ Name = "Visual Studio 2022 Build Tools (aarch64)"; Action = { choco install visualstudio2022buildtools -y --no-progress --package-parameters "--add Microsoft.VisualStudio.Component.VC.Tools.ARM64 --add Microsoft.VisualStudio.Component.Windows11SDK.22621" } },
@{ Name = "Rust (nightly, aarch64)"; Action = { & '${{github.workspace}}\rustup-init.exe' --default-host aarch64-pc-windows-msvc --default-toolchain nightly -y } }
)
$installs | ForEach-Object {
Install-Name $_.Name -Action $_.Action
}
$exports = @(
"$env:USERPROFILE\.cargo\bin", # Rust
"$env:ProgramFiles\Git\cmd", # Git
Expand All @@ -103,9 +94,6 @@ jobs:
Write-Host "Added $path to `$env:GITHUB_PATH`"
}
foreach ($path in $exports) {
}
- name: Install Rust
if: matrix.os != 'windows-11-preview_aarch64'
uses: dtolnay/rust-toolchain@nightly
Expand Down

0 comments on commit c58da7e

Please sign in to comment.