From 9f4e5168a3fe105e76f3074c11f9f8253c099d9e Mon Sep 17 00:00:00 2001 From: Shen-Ta Hsieh Date: Wed, 12 Jun 2024 18:25:39 +0800 Subject: [PATCH] [CI] Update windows sdk to 22621 Signed-off-by: Shen-Ta Hsieh --- .github/workflows/build.yml | 16 +++++++++++----- .github/workflows/release.yml | 14 +++++++++----- 2 files changed, 20 insertions(+), 10 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4943f32..39fd120 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -26,20 +26,26 @@ jobs: uses: crazy-max/ghaction-chocolatey@v1 with: args: install cmake ninja vswhere + - name: Upgrade dependency + uses: crazy-max/ghaction-chocolatey@v1 + with: + args: upgrade llvm - - uses: GuillaumeFalourd/setup-windows10-sdk-action@v1 + - uses: GuillaumeFalourd/setup-windows10-sdk-action@v2 with: - sdk-version: 19041 + sdk-version: 22621 + + - name: Checkout by pushing tags + run: git clone --branch llvmorg-17.0.6 --depth 1 https://github.com/llvm/llvm-project.git - name: Build llvm run: | $vsPath = (vswhere -latest -property installationPath) Import-Module (Join-Path $vsPath "Common7\Tools\Microsoft.VisualStudio.DevShell.dll") - Enter-VsDevShell -VsInstallPath $vsPath -SkipAutomaticLocation -DevCmdArguments "-arch=x64 -host_arch=x64 -winsdk=10.0.19041.0" + Enter-VsDevShell -VsInstallPath $vsPath -SkipAutomaticLocation -DevCmdArguments "-arch=x64 -host_arch=x64 -winsdk=10.0.22621.0" $Env:CC = "clang-cl" $Env:CXX = "clang-cl" - $cmake_sys_ver = "10.0.19041.0" - git clone --branch llvmorg-17.0.6 --depth 1 https://github.com/llvm/llvm-project.git + $cmake_sys_ver = "10.0.22621.0" cmake -Bbuild -GNinja "-DCMAKE_SYSTEM_VERSION=$cmake_sys_ver" -DCMAKE_MSVC_RUNTIME_LIBRARY=${{ matrix.rtlib }} -DCMAKE_BUILD_TYPE=Release -DCPACK_GENERATOR=ZIP "-DCMAKE_INSTALL_PREFIX=$pwd\\prefix" -DLLVM_TARGETS_TO_BUILD="X86" -DLLVM_ENABLE_PROJECTS="lld;clang;clang-tools-extra" -DLLVM_ENABLE_DIA_SDK=OFF llvm-project\\llvm cmake --build build diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 138d713..6fdc99f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -30,7 +30,7 @@ jobs: upload_assets: name: Build llvm on Windows needs: create_release - runs-on: windows-latest + runs-on: windows-2022 strategy: matrix: rtlib: ["MultiThreadedDLL"] @@ -39,10 +39,14 @@ jobs: uses: crazy-max/ghaction-chocolatey@v1 with: args: install cmake ninja vswhere + - name: Upgrade dependency + uses: crazy-max/ghaction-chocolatey@v1 + with: + args: upgrade llvm - - uses: GuillaumeFalourd/setup-windows10-sdk-action@v1 + - uses: GuillaumeFalourd/setup-windows10-sdk-action@v2 with: - sdk-version: 19041 + sdk-version: 22621 - name: Checkout by pushing tags if: ${{ github.event_name == 'push' }} @@ -52,10 +56,10 @@ jobs: run: | $vsPath = (vswhere -latest -property installationPath) Import-Module (Join-Path $vsPath "Common7\Tools\Microsoft.VisualStudio.DevShell.dll") - Enter-VsDevShell -VsInstallPath $vsPath -SkipAutomaticLocation -DevCmdArguments "-arch=x64 -host_arch=x64 -winsdk=10.0.19041.0" + Enter-VsDevShell -VsInstallPath $vsPath -SkipAutomaticLocation -DevCmdArguments "-arch=x64 -host_arch=x64 -winsdk=10.0.22621.0" $Env:CC = "clang-cl" $Env:CXX = "clang-cl" - $cmake_sys_ver = "10.0.19041.0" + $cmake_sys_ver = "10.0.22621.0" cmake -Bbuild -GNinja "-DCMAKE_SYSTEM_VERSION=$cmake_sys_ver" -DCMAKE_MSVC_RUNTIME_LIBRARY=${{ matrix.rtlib }} -DCMAKE_BUILD_TYPE=Release -DCPACK_GENERATOR=ZIP "-DCMAKE_INSTALL_PREFIX=$pwd\\prefix" -DLLVM_TARGETS_TO_BUILD="X86" -DLLVM_ENABLE_PROJECTS="lld;clang;clang-tools-extra" -DLLVM_ENABLE_DIA_SDK=OFF llvm-project\\llvm cmake --build build