Skip to content

Commit f6690be

Browse files
author
Vasil Pashov
committed
Pin MSVC version in for the CI
1 parent 8ee3763 commit f6690be

File tree

3 files changed

+24
-8
lines changed

3 files changed

+24
-8
lines changed

.github/workflows/build_steps.yml

+16-4
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,6 @@ jobs:
8787
maximum-size: 6GB
8888
disk-root: "D:" # This is also the checkout directory. Total size 12GB.
8989
continue-on-error: true
90-
91-
- name: Enable Windows compiler commands
92-
if: matrix.os == 'windows'
93-
uses: ilammy/[email protected]
9490

9591
- name: Extra envs
9692
# This has to come after msvc-dev-cmd to overwrite the bad VCPKG_ROOT it sets
@@ -122,6 +118,22 @@ jobs:
122118
if: inputs.job_type != 'build-python-wheels'
123119
run: . build_tooling/prep_cpp_build.sh # Also applies to Windows
124120

121+
# When a GitHub Windows image gets update the MSVC compiler also can get updated. New compilers can have compilation errors in Arctic or in the VCPKG dependencies.
122+
# We needd to pin a particular MSVC so that runner updates don't affect us.
123+
# When the MSVC version is update custom-triplets/x64-windows-static-msvc.cmake must also be updated with the correct toolsed version.
124+
- name: Install Required MSVC
125+
if: matrix.os == 'windows'
126+
run: |
127+
choco install -y -f visualstudio2022buildtools --version=117.11.4 --params "--add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 --installChannelUri https://aka.ms/vs/17/release/390666095_1317821361/channel"
128+
129+
- name: Enable Windows compiler commands
130+
if: matrix.os == 'windows'
131+
uses: TheMrMilchmann/setup-msvc-dev@v3
132+
with:
133+
arch: x64
134+
toolset: 14.41
135+
vs-path: 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2022\\BuildTools'
136+
125137
- name: CMake compile
126138
if: inputs.job_type != 'build-python-wheels'
127139
# We are pinning the version to 10.6 because >= 10.7, use node20 which is not supported in the container

cpp/CMakePresets.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,8 @@
6363
"generator": "Ninja",
6464
"environment": { "cmakepreset_expected_host_system": "Windows" },
6565
"cacheVariables": {
66-
"ARCTICDB_USE_PCH": "ON"
66+
"ARCTICDB_USE_PCH": "ON",
67+
"VCPKG_TARGET_TRIPLET": "x64-windows-static-msvc"
6768
}
6869
},
6970
{
@@ -80,8 +81,7 @@
8081
},
8182
"cacheVariables": {
8283
"CMAKE_C_COMPILER": "cl",
83-
"CMAKE_CXX_COMPILER": "cl",
84-
"VCPKG_TARGET_TRIPLET": "x64-windows-static"
84+
"CMAKE_CXX_COMPILER": "cl"
8585
}
8686
},
8787
{
@@ -97,7 +97,7 @@
9797
"installDir": "${sourceDir}/out/install",
9898
"cacheVariables": {
9999
"CMAKE_CXX_FLAGS": "/MP",
100-
"VCPKG_TARGET_TRIPLET": "x64-windows-static",
100+
"VCPKG_TARGET_TRIPLET": "x64-windows-static-msvc",
101101
"ARCTICDB_PYTHON_EXPLICIT_LINK": "ON"
102102
}
103103
},
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
set(VCPKG_TARGET_ARCHITECTURE x64)
2+
set(VCPKG_CRT_LINKAGE static)
3+
set(VCPKG_LIBRARY_LINKAGE static)
4+
set(VCPKG_PLATFORM_TOOLSET_VERSION 14.41)

0 commit comments

Comments
 (0)