Skip to content

Commit 5b8e893

Browse files
jenkins: improve x64 node.exe caching for arm64 (#3965)
Simplifies caching by removing the downloading step. The x64 node.exe is now expected to be already cached before running compile.cmd. The same change was already applied successfully to the release CI. Refs: #3315
1 parent c26ecff commit 5b8e893

1 file changed

Lines changed: 4 additions & 10 deletions

File tree

jenkins/scripts/windows/compile.cmd

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -37,17 +37,11 @@ if "%nodes:~-6%" == "-arm64" (
3737
:: ARM64 MSI needs x64 node.exe to generate the license file.
3838
:: It is downloaded from vcbuild.bat and is known to hang,
3939
:: thus failing the build after timing out (1-2% runs).
40-
:: Downloading it from here and updating it weekly should
41-
:: decrease, if not remove, these types of CI failures.
42-
:: Download and cache x64 node.exe.
43-
mkdir C:\node_exe_cache
44-
forfiles /p "C:\node_exe_cache" /m "node.exe" /d -7 /c "cmd /c del @path"
45-
if not exist C:\node_exe_cache\node.exe (
46-
curl -L https://nodejs.org/dist/latest/win-x64/node.exe -o C:\node_exe_cache\node.exe
40+
:: Copying it from cache should prevent this from happening.
41+
if exist "C:\node_exe_cache\node.exe" (
42+
mkdir temp-vcbuild
43+
copy C:\node_exe_cache\node.exe temp-vcbuild\node-x64-cross-compiling.exe
4744
)
48-
:: Copy it to where vcbuild expects.
49-
mkdir temp-vcbuild
50-
copy C:\node_exe_cache\node.exe temp-vcbuild\node-x64-cross-compiling.exe
5145
)
5246
) else if "%nodes:~-4%" == "-x86" (
5347
set "VCBUILD_EXTRA_ARGS=x86 %VCBUILD_EXTRA_ARGS%"

0 commit comments

Comments
 (0)