From 1f766c36fb61f7b1969664645bf38dae93f568a2 Mon Sep 17 00:00:00 2001 From: Michael Yang Date: Sat, 8 Feb 2025 21:07:00 +0000 Subject: [PATCH] ci: use windows-2022 to sign and bundle (#8941) ollama requires vcruntime140_1.dll which isn't found on 2019. previously the job used the windows runner (2019) but it explicitly installs 2022 to build the app. since the sign job doesn't actually build anything, it can use the windows-2022 runner instead. --- .github/workflows/release.yaml | 2 +- scripts/build_windows.ps1 | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index ca83a429b..acae0050d 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -242,7 +242,7 @@ jobs: dist\${{ matrix.os }}-${{ matrix.arch }}-app.exe windows-sign: - runs-on: windows + runs-on: windows-2022 environment: release needs: [windows-depends, windows-build] steps: diff --git a/scripts/build_windows.ps1 b/scripts/build_windows.ps1 index b0c7e32f2..68f3b11d4 100644 --- a/scripts/build_windows.ps1 +++ b/scripts/build_windows.ps1 @@ -162,8 +162,11 @@ function gatherDependencies() { $depArch=$script:TARGET_ARCH } if ($depArch -eq "x64") { + write-host "cp ${env:VCToolsRedistDir}\${depArch}\Microsoft.VC*.CRT\msvcp140*.dll ${script:DIST_DIR}\lib\ollama\" cp "${env:VCToolsRedistDir}\${depArch}\Microsoft.VC*.CRT\msvcp140*.dll" "${script:DIST_DIR}\lib\ollama\" + write-host "cp ${env:VCToolsRedistDir}\${depArch}\Microsoft.VC*.CRT\vcruntime140.dll ${script:DIST_DIR}\lib\ollama\" cp "${env:VCToolsRedistDir}\${depArch}\Microsoft.VC*.CRT\vcruntime140.dll" "${script:DIST_DIR}\lib\ollama\" + write-host "cp ${env:VCToolsRedistDir}\${depArch}\Microsoft.VC*.CRT\vcruntime140_1.dll ${script:DIST_DIR}\lib\ollama\" cp "${env:VCToolsRedistDir}\${depArch}\Microsoft.VC*.CRT\vcruntime140_1.dll" "${script:DIST_DIR}\lib\ollama\" $llvmCrtDir="$env:VCToolsRedistDir\..\..\..\Tools\Llvm\${depArch}\bin" foreach ($part in $("runtime", "stdio", "filesystem", "math", "convert", "heap", "string", "time", "locale", "environment")) {