@@ -63,13 +63,56 @@ jobs:
63
63
options : |
64
64
CMAKE_SYSTEM_NAME=Windows \
65
65
CMAKE_SYSTEM_PROCESSOR=x86_64 \
66
- CMAKE_MAKE_PROGRAM=ninja.exe \
67
66
CMAKE_BUILD_TYPE=Release \
68
67
- name : Build Project
69
68
run : cmake --build ./build --target all
70
69
- name : Run tests
71
70
run : cmake --build ./build --target run_tests
72
- clang-cl :
71
+ clang-cl-msbuild :
72
+ if : github.repository_owner == 'aws'
73
+ strategy :
74
+ fail-fast : false
75
+ matrix :
76
+ target :
77
+ - x64
78
+ - x64_arm64
79
+ runs-on : windows-latest
80
+ env :
81
+ CMAKE_GENERATOR : " Visual Studio 17 2022"
82
+ CMAKE_GENERATOR_TOOLSET : " ClangCL,host=x64"
83
+ steps :
84
+ - if : ${{ matrix.target == 'x64' }}
85
+ name : Install NASM
86
+
87
+ - name : Checkout
88
+ uses : actions/checkout@v4
89
+ - uses : TheMrMilchmann/setup-msvc-dev@v3
90
+ with :
91
+ arch : ${{ matrix.target }}
92
+ - if : ${{ matrix.target == 'x64' }}
93
+ name : Setup CMake
94
+
95
+ with :
96
+ options : |
97
+ CMAKE_BUILD_TYPE=Release \
98
+ - if : ${{ matrix.target == 'x64_arm64' }}
99
+ name : Setup CMake
100
+
101
+ with :
102
+ options : |
103
+ CMAKE_GENERATOR_PLATFORM=ARM64 \
104
+ CMAKE_SYSTEM_NAME=Windows \
105
+ CMAKE_SYSTEM_PROCESSOR=ARM64 \
106
+ CMAKE_BUILD_TYPE=Release \
107
+ - name : Build Project
108
+ run : cmake --build ./build --target all_tests
109
+ - if : ${{ matrix.target == 'x64' }}
110
+ name : Run crypto_test
111
+ # MSVC places the tests executables in a different location.
112
+ # With MSVC, the "run_tests" target cannot locate the tests.
113
+ # We run "crypto_test" as a sanity check.
114
+ run : cmake --build ./build --target crypto_test
115
+ clang-cl-ninja :
73
116
if : github.repository_owner == 'aws'
74
117
strategy :
75
118
fail-fast : false
97
140
c-compiler : clang-cl
98
141
cxx-compiler : clang-cl
99
142
options : |
100
- CMAKE_CROSSCOMPILING=${{ ((matrix.target == 'x64') && '0') || '1' }} \
101
- CMAKE_SYSTEM_NAME=Windows \
102
- CMAKE_SYSTEM_PROCESSOR=x86_64 \
103
143
CMAKE_BUILD_TYPE=Release \
104
144
- if : ${{ matrix.target == 'x64_arm64' }}
105
145
name : Setup CMake
@@ -109,7 +149,6 @@ jobs:
109
149
c-compiler : clang-cl
110
150
cxx-compiler : clang-cl
111
151
options : |
112
- CMAKE_CROSSCOMPILING=1 \
113
152
CMAKE_SYSTEM_NAME=Windows \
114
153
CMAKE_SYSTEM_PROCESSOR=ARM64 \
115
154
CMAKE_C_COMPILER_TARGET=arm64-pc-windows-msvc \
0 commit comments