From abb09843ebed96d01322dae9a494e668d72620bd Mon Sep 17 00:00:00 2001
From: Justin W Smith <justsmth@amazon.com>
Date: Wed, 10 Jul 2024 21:51:32 +0000
Subject: [PATCH] Update CI

---
 .github/workflows/windows-alt.yml | 33 ++++++++++---------------------
 1 file changed, 10 insertions(+), 23 deletions(-)

diff --git a/.github/workflows/windows-alt.yml b/.github/workflows/windows-alt.yml
index c81f5877913..27de3c80d31 100644
--- a/.github/workflows/windows-alt.yml
+++ b/.github/workflows/windows-alt.yml
@@ -11,6 +11,8 @@ jobs:
   mingw:
     if: github.repository_owner == 'aws'
     runs-on: windows-latest
+    env:
+      CMAKE_BUILD_TYPE: Release
     steps:
       - name: Install NASM
         uses: ilammy/setup-nasm@v1.5.1
@@ -35,7 +37,6 @@ jobs:
             CMAKE_FIND_ROOT_PATH_MODE_PROGRAM=NEVER \
             CMAKE_FIND_ROOT_PATH_MODE_LIBRARY=ONLY \
             CMAKE_FIND_ROOT_PATH_MODE_INCLUDE=ONLY \
-            CMAKE_BUILD_TYPE=Release \
       - name: Build Project
         run: cmake --build ./build --target all
       - name: Run tests
@@ -43,6 +44,8 @@ jobs:
   clang:
     if: github.repository_owner == 'aws'
     runs-on: windows-latest
+    env:
+      CMAKE_BUILD_TYPE: Release
     steps:
       - name: Install NASM
         uses: ilammy/setup-nasm@v1.5.1
@@ -63,8 +66,6 @@ jobs:
           options: |
             CMAKE_SYSTEM_NAME=Windows \
             CMAKE_SYSTEM_PROCESSOR=x86_64 \
-            CMAKE_MAKE_PROGRAM=ninja.exe \
-            CMAKE_BUILD_TYPE=Release \
       - name: Build Project
         run: cmake --build ./build --target all
       - name: Run tests
@@ -78,12 +79,14 @@ jobs:
           - x64
           - x64_arm64
     runs-on: windows-latest
+    env:
+      CMAKE_GENERATOR: "Visual Studio 17 2022"
+      CMAKE_GENERATOR_TOOLSET: "ClangCL,host=x64"
+      CMAKE_BUILD_TYPE: Release
     steps:
       - if: ${{ matrix.target  == 'x64' }}
         name: Install NASM
         uses: ilammy/setup-nasm@v1.5.1
-      - name: Remove wrong clang-cl.exe
-        run:  rm "C:/Program Files/LLVM/bin/clang-cl.exe"
       - name: Checkout
         uses: actions/checkout@v4
       - uses: TheMrMilchmann/setup-msvc-dev@v3
@@ -92,32 +95,16 @@ jobs:
       - if: ${{ matrix.target  == 'x64' }}
         name: Setup CMake
         uses: threeal/cmake-action@v1.3.0
-        with:
-          generator: Ninja
-          c-compiler: clang-cl
-          cxx-compiler: clang-cl
-          options: |
-            CMAKE_CROSSCOMPILING=${{ ((matrix.target  == 'x64') && '0') || '1' }} \
-            CMAKE_SYSTEM_NAME=Windows \
-            CMAKE_SYSTEM_PROCESSOR=x86_64 \
-            CMAKE_BUILD_TYPE=Release \
       - if: ${{ matrix.target  == 'x64_arm64' }}
         name: Setup CMake
         uses: threeal/cmake-action@v1.3.0
         with:
-          generator: Ninja
-          c-compiler: clang-cl
-          cxx-compiler: clang-cl
           options: |
-            CMAKE_CROSSCOMPILING=1 \
+            CMAKE_GENERATOR_PLATFORM=ARM64 \
             CMAKE_SYSTEM_NAME=Windows \
             CMAKE_SYSTEM_PROCESSOR=ARM64 \
-            CMAKE_C_COMPILER_TARGET=arm64-pc-windows-msvc \
-            CMAKE_ASM_COMPILER_TARGET=arm64-pc-windows-msvc \
-            CMAKE_CXX_COMPILER_TARGET=arm64-pc-windows-msvc \
-            CMAKE_BUILD_TYPE=Release \
       - name: Build Project
-        run: cmake --build ./build --target all
+        run: cmake --build ./build --target all_tests
       - if: ${{ matrix.target  == 'x64' }}
         name: Run tests
         run: cmake --build ./build --target run_tests