cmake: fallback CMAKE_WINDOWS_KITS_10_DIR #6
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This starter workflow is for a CMake project running on multiple platforms. There is a different starter workflow if you just want a single platform. | |
# See: https://github.com/actions/starter-workflows/blob/main/ci/cmake-single-platform.yml | |
name: CMake (Visual Studio) | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
build: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: GuillaumeFalourd/setup-windows10-sdk-action@v2 | |
with: | |
sdk-version: 22621 | |
- name: Update submodules | |
run: | | |
git submodule update --init --recursive | |
- name: Configure CMake (x64) | |
run: > | |
cmake | |
-DCMAKE_SYSTEM_VERSION=10.0.22621.0 | |
-B build | |
-S . | |
-G "Visual Studio 17 2022" -T host=x86 -A x64 | |
- name: Build (x64) | |
run: > | |
cmake | |
--build build | |
--config Release | |
--verbose | |
- name: Configure CMake (x32) | |
run: > | |
cmake | |
-DCMAKE_SYSTEM_VERSION=10.0.22621.0 | |
-B build32 | |
-S . | |
-G "Visual Studio 17 2022" -T host=x86 -A Win32 | |
- name: Build (x32) | |
run: > | |
cmake | |
--build build32 | |
--config Release | |
--verbose | |
- name: Prepare Web Listing | |
run: md www | |
- name: Copy Binaries (x64) | |
run: copy build\Release\*.addon64 www\ | |
- name: Copy Binaries (x32) | |
run: copy build32\Release\*.addon32 www\ | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@v1 | |
with: | |
path: 'www' | |
deploy: | |
if: github.ref == 'refs/heads/main' | |
needs: build | |
permissions: | |
pages: write # to deploy to Pages | |
id-token: write # to verify the deployment originates from an appropriate source | |
# Deploy to the github-pages environment | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
# Specify runner + deployment step | |
runs-on: windows-latest | |
steps: | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v1 | |