This repository was archived by the owner on Dec 15, 2022. It is now read-only.
Commit 4ca913b 1 parent dfb4b6f commit 4ca913b Copy full SHA for 4ca913b
File tree 3 files changed +56
-3
lines changed
3 files changed +56
-3
lines changed Original file line number Diff line number Diff line change 45
45
if: ${{ matrix.os == 'ubuntu-16.04' }}
46
46
name: Install additional dependencies
47
47
48
+ # This step can be removed as soon as official Windows arm64 builds are published:
49
+ # https://github.com/nodejs/build/issues/2450#issuecomment-705853342
50
+ - run : |
51
+ $NodeVersion = (node --version) -replace '^.'
52
+ $NodeFallbackVersion = "15.2.1"
53
+ & .\script\download-node-lib-win-arm64.ps1 $NodeVersion $NodeFallbackVersion
54
+ if: ${{ matrix.os == 'windows-latest' }}
55
+ name: Install Windows arm64 node.lib
56
+
48
57
- run : npm install
49
58
name : Setup environment
50
59
@@ -68,16 +77,19 @@ jobs:
68
77
- run : npm run prebuild-napi-x64
69
78
name : Prebuild (x64)
70
79
80
+ - run : npm run prebuild-napi-arm64
81
+ name : Prebuild (arm64)
82
+ if : ${{ matrix.os != 'macos-latest' }}
83
+
71
84
- run : |
72
- npm run prebuild-napi-arm64
73
85
docker build -t node-keytar/i386 docker/i386
74
86
docker run --rm -v ${PWD}:/project node-keytar/i386 /bin/bash -c "cd /project && npm run prebuild-napi-ia32"
75
87
if: ${{ matrix.os == 'ubuntu-16.04' }}
76
- name: Prebuild (x86 and arm64 )
88
+ name: Prebuild (Linux x86 )
77
89
78
90
- run : npm run prebuild-napi-ia32
79
91
if : ${{ matrix.os == 'windows-latest' }}
80
- name : Prebuild (x86)
92
+ name : Prebuild (Windows x86)
81
93
82
94
- run : |
83
95
ls prebuilds/
Original file line number Diff line number Diff line change @@ -24,6 +24,11 @@ build_script:
24
24
- npm test
25
25
- npm run prebuild-napi-x64
26
26
- npm run prebuild-napi-ia32
27
+ - ps : >-
28
+ $NodeVersion = (node --version) -replace '^.'
29
+ $NodeFallbackVersion = "15.2.1"
30
+ & .\script\download-node-lib-win-arm64.ps1 $NodeVersion $NodeFallbackVersion
31
+ npm run prebuild-napi-arm64
27
32
- if defined APPVEYOR_REPO_TAG_NAME (npm run upload)
28
33
29
34
test : off
Original file line number Diff line number Diff line change
1
+ # This script can be removed as soon as official Windows arm64 builds are published:
2
+ # https://github.com/nodejs/build/issues/2450#issuecomment-705853342
3
+
4
+ $nodeVersion = $args [0 ]
5
+ $fallbackVersion = $args [1 ]
6
+
7
+ If ($null -eq $nodeVersion -Or $null -eq $fallbackVersion ) {
8
+ Write-Error " No NodeJS version given as argument to this file. Run it like download-nodejs-win-arm64.ps1 NODE_VERSION NODE_FALLBACK_VERSION"
9
+ exit 1
10
+ }
11
+
12
+ $url = " https://unofficial-builds.nodejs.org/download/release/v$nodeVersion /win-arm64/node.lib"
13
+ $fallbackUrl = " https://unofficial-builds.nodejs.org/download/release/v$fallbackVersion /win-arm64/node.lib"
14
+
15
+ # Always write to the $nodeVersion cache folder, even if we're using the fallbackVersion
16
+ $cacheFolder = " $env: LOCALAPPDATA \Temp\prebuild\napi\$nodeVersion \arm64"
17
+
18
+ If (! (Test-Path $cacheFolder )) {
19
+ New-Item - ItemType Directory - Force - Path $cacheFolder
20
+ }
21
+
22
+ $output = " $cacheFolder \node.lib"
23
+ $start_time = Get-Date
24
+
25
+ try {
26
+ Invoke-WebRequest - Uri $url - OutFile $output
27
+ $downloadedNodeVersion = $nodeVersion
28
+ } catch {
29
+ if ($_.Exception.Response -And $_.Exception.Response.StatusCode -eq " NotFound" ) {
30
+ Write-Output " No arm64 node.lib found for Node Windows $nodeVersion , trying fallback version $fallbackVersion ..."
31
+ Invoke-WebRequest - Uri $fallbackUrl - OutFile $output
32
+ $downloadedNodeVersion = $fallbackVersion
33
+ }
34
+ }
35
+
36
+ Write-Output " Downloaded arm64 NodeJS lib v$downloadedNodeVersion to $output in $ ( (Get-Date ).Subtract($start_time ).Seconds) second(s)"
You can’t perform that action at this time.
0 commit comments