Skip to content

Commit 1f94aa2

Browse files
committed
Update CI
1 parent 3a347a9 commit 1f94aa2

File tree

1 file changed

+45
-6
lines changed

1 file changed

+45
-6
lines changed

.github/workflows/windows-alt.yml

Lines changed: 45 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -63,13 +63,56 @@ jobs:
6363
options: |
6464
CMAKE_SYSTEM_NAME=Windows \
6565
CMAKE_SYSTEM_PROCESSOR=x86_64 \
66-
CMAKE_MAKE_PROGRAM=ninja.exe \
6766
CMAKE_BUILD_TYPE=Release \
6867
- name: Build Project
6968
run: cmake --build ./build --target all
7069
- name: Run tests
7170
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+
uses: ilammy/[email protected]
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+
uses: threeal/[email protected]
95+
with:
96+
options: |
97+
CMAKE_BUILD_TYPE=Release \
98+
- if: ${{ matrix.target == 'x64_arm64' }}
99+
name: Setup CMake
100+
uses: threeal/[email protected]
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:
73116
if: github.repository_owner == 'aws'
74117
strategy:
75118
fail-fast: false
@@ -97,9 +140,6 @@ jobs:
97140
c-compiler: clang-cl
98141
cxx-compiler: clang-cl
99142
options: |
100-
CMAKE_CROSSCOMPILING=${{ ((matrix.target == 'x64') && '0') || '1' }} \
101-
CMAKE_SYSTEM_NAME=Windows \
102-
CMAKE_SYSTEM_PROCESSOR=x86_64 \
103143
CMAKE_BUILD_TYPE=Release \
104144
- if: ${{ matrix.target == 'x64_arm64' }}
105145
name: Setup CMake
@@ -109,7 +149,6 @@ jobs:
109149
c-compiler: clang-cl
110150
cxx-compiler: clang-cl
111151
options: |
112-
CMAKE_CROSSCOMPILING=1 \
113152
CMAKE_SYSTEM_NAME=Windows \
114153
CMAKE_SYSTEM_PROCESSOR=ARM64 \
115154
CMAKE_C_COMPILER_TARGET=arm64-pc-windows-msvc \

0 commit comments

Comments
 (0)