mirror of
https://github.com/desktop/desktop
synced 2024-09-12 21:01:16 +00:00
Download Windows arm64 node lib in CI
This commit is contained in:
parent
ed8f1e88be
commit
3172a87f58
4
.github/workflows/ci.yml
vendored
4
.github/workflows/ci.yml
vendored
|
@ -52,6 +52,10 @@ jobs:
|
|||
${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
||||
${{ runner.os }}-yarn-
|
||||
|
||||
- name: Get NodeJS node-gyp lib for Windows arm64
|
||||
if: ${{ matrix.os == 'windows-2019' && matrix.arch == 'arm64' }}
|
||||
run: .\script\download-nodejs-win-arm64.ps1 ${{ matrix.node }}
|
||||
|
||||
- name: Install and build dependencies
|
||||
run: yarn
|
||||
env:
|
||||
|
|
19
script/download-nodejs-win-arm64.ps1
Normal file
19
script/download-nodejs-win-arm64.ps1
Normal file
|
@ -0,0 +1,19 @@
|
|||
$nodeVersion = $args[0]
|
||||
|
||||
If ($null -eq $nodeVersion) {
|
||||
Write-Error "No NodeJS version given as argument to this file. Run it like download-nodejs-win-arm64.ps1 12.10.1"
|
||||
exit 1
|
||||
}
|
||||
|
||||
$url = "https://unofficial-builds.nodejs.org/download/release/v$nodeVersion/win-arm64/node.lib"
|
||||
$cacheFolder = "$env:LOCALAPPDATA\node-gyp\Cache\$nodeVersion\arm64"
|
||||
|
||||
If (!(Test-Path $cacheFolder)) {
|
||||
New-Item -ItemType Directory -Force -Path $cacheFolder
|
||||
}
|
||||
|
||||
$output = "$cacheFolder\node.lib"
|
||||
$start_time = Get-Date
|
||||
|
||||
Invoke-WebRequest -Uri $url -OutFile $output
|
||||
Write-Output "Downloaded arm64 NodeJS lib $nodeVersion in $((Get-Date).Subtract($start_time).Seconds) second(s)"
|
Loading…
Reference in a new issue