Show pwsh version #21
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "ci" | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- master | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
bindgen: | |
strategy: | |
matrix: | |
os: [windows-11-preview_aarch64, windows-2025] | |
target: [aarch64-pc-windows-msvc, x86_64-pc-windows-msvc, i686-pc-windows-msvc] | |
exclude: | |
- os: windows-11-preview_aarch64 | |
target: x86_64-pc-windows-msvc | |
- os: windows-11-preview_aarch64 | |
target: i686-pc-windows-msvc | |
- os: windows-2025 | |
target: aarch64-pc-windows-msvc | |
runs-on: ${{ matrix.os }} | |
steps: | |
- if: matrix.os == 'windows-11-preview_aarch64' | |
uses: robinraju/release-downloader@v1 | |
with: | |
repository: 'PowerShell/PowerShell' | |
tag: 'v7.4.6' | |
filename: 'PowerShell-7.4.6-win-arm64.msi' | |
- if: matrix.os == 'windows-11-preview_aarch64' | |
name: Install powershell | |
shell: powershell | |
run: | | |
$args = @('/i', '"${{github.workspace}}\PowerShell-7.4.6-win-arm64.msi"', '/qn', '/norestart', '/L*v', '"${{github.workspace}}\msi-install.log"', 'ALLUSERS=1'); | |
Start-Process "msiexec.exe" -ArgumentList $args -NoNewWindow -Wait | |
Get-Content "${{github.workspace}}\msi-install.log" | |
& "C:/Program Files/PowerShell/7/pwsh.exe" -command '$PSVersionTable.PSVersion.Major' | |
# Add pwsh.exe to github PATH | |
echo "C:/Program Files/PowerShell/7" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append | |
- name: Setup Node 20 | |
if: startsWith(matrix.os, 'windows-11-preview') | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '20' | |
- uses: hustcer/setup-nu@v3 | |
with: | |
version: "0.101.0" | |
- name: Show pwsh version | |
if: startsWith(matrix.os, 'windows-11-preview') | |
run: | | |
pwsh -Command '$PSVersionTable.PSVersion' | |
- run: print $'Nu version info:(char nl)'; version | |
shell: nu {0} |