From 21def0e624fc48a7338fb1460a69fff0e945437c Mon Sep 17 00:00:00 2001 From: Amit Date: Thu, 27 Mar 2025 09:21:00 -0700 Subject: [PATCH 1/4] Add github action to build the package --- .github/workflows/cmake-single-platform.yml | 54 +++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 .github/workflows/cmake-single-platform.yml diff --git a/.github/workflows/cmake-single-platform.yml b/.github/workflows/cmake-single-platform.yml new file mode 100644 index 0000000..10b4e17 --- /dev/null +++ b/.github/workflows/cmake-single-platform.yml @@ -0,0 +1,54 @@ +# This starter workflow is for a CMake project running on a single platform. There is a different starter workflow if you need cross-platform coverage. +# See: https://github.com/actions/starter-workflows/blob/main/ci/cmake-multi-platform.yml +name: CMake on a single platform + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +env: + # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) + BUILD_TYPE: 'Release' + DX12: 'ON' + VULKAN: 'OFF' + + +jobs: + build: + # The CMake configure and build commands are platform agnostic and should work equally well on Windows or Mac. + # You can convert this to a matrix build if you need cross-platform coverage. + # See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix + runs-on: windows-latest + + steps: + - name: Checkout Repository with submodules + uses: actions/checkout@v4 + with: + submodules: 'recursive' + + - name: Set up Visual Studio environment + uses: ilammy/msvc-dev-cmd@v1 + + - name: Configure CMake for x64 + # Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make. + # See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type + run: cmake -B ${{github.workspace}}/build -S ${{github.workspace}} -G "Visual Studio 17 2022" -A x64 -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DDONUT_WITH_DX12=${{env.DX12}} -DDONUT_WITH_VULKAN=${{env.VULKAN}} + + - name: Build + # Build your program with the given configuration + run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --target package + + - name: Upload Package Artifact + uses: actions/upload-artifact@v4 + with: + name: rtxmg-build-artifacts-package + path: ${{github.workspace}}/build/*.zip + + # - name: Test + # working-directory: ${{github.workspace}}/build + # # Execute tests defined by the CMake configuration. + # # See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail + # run: ctest -C ${{env.BUILD_TYPE}} + From cbef387f7786b525c3b5c1fb2302e4ed65933db7 Mon Sep 17 00:00:00 2001 From: manuelkNVDA Date: Tue, 1 Apr 2025 14:16:51 -0700 Subject: [PATCH 2/4] Print OS version --- CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 064abfe..c64c4a8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,6 +3,10 @@ cmake_minimum_required(VERSION 3.10) project(rtxmg LANGUAGES C CXX VERSION 0.9) +if(WIN32) + message(STATUS "Found Windows ${CMAKE_SYSTEM_VERSION} - SDK: ${CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION}") +endif() + set(CMAKE_CONFIGURATION_TYPES "Debug;Release;RelWithDebInfo;ReleaseAsan" CACHE STRING "Configurations" FORCE) set(CMAKE_CXX_STANDARD 20) set(CMAKE_CXX_STANDARD_REQUIRED ON) From d7dac1ea3507ee40c6a5e49847a89c51c8e6b106 Mon Sep 17 00:00:00 2001 From: manuelkNVDA Date: Tue, 1 Apr 2025 15:12:16 -0700 Subject: [PATCH 3/4] Select Win SDK --- .github/workflows/cmake-single-platform.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cmake-single-platform.yml b/.github/workflows/cmake-single-platform.yml index 10b4e17..3caf18a 100644 --- a/.github/workflows/cmake-single-platform.yml +++ b/.github/workflows/cmake-single-platform.yml @@ -14,7 +14,6 @@ env: DX12: 'ON' VULKAN: 'OFF' - jobs: build: # The CMake configure and build commands are platform agnostic and should work equally well on Windows or Mac. @@ -23,6 +22,12 @@ jobs: runs-on: windows-latest steps: + + - name: Setup Windows 10 SDK Action + uses: GuillaumeFalourd/setup-windows10-sdk-action@v2.4 + with: + sdk-version: 26100 + - name: Checkout Repository with submodules uses: actions/checkout@v4 with: @@ -34,7 +39,7 @@ jobs: - name: Configure CMake for x64 # Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make. # See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type - run: cmake -B ${{github.workspace}}/build -S ${{github.workspace}} -G "Visual Studio 17 2022" -A x64 -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DDONUT_WITH_DX12=${{env.DX12}} -DDONUT_WITH_VULKAN=${{env.VULKAN}} + run: cmake -B ${{github.workspace}}/build -S ${{github.workspace}} -G "Visual Studio 17 2022" -A x64 -DCMAKE_SYSTEM_VERSION=10.0.26100.0 -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DDONUT_WITH_DX12=${{env.DX12}} -DDONUT_WITH_VULKAN=${{env.VULKAN}} - name: Build # Build your program with the given configuration From cd56bfc8f30288628a275666a01bcbfb072ef11e Mon Sep 17 00:00:00 2001 From: manuelkNVDA Date: Tue, 1 Apr 2025 15:13:56 -0700 Subject: [PATCH 4/4] Fix yml syntax --- .github/workflows/cmake-single-platform.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cmake-single-platform.yml b/.github/workflows/cmake-single-platform.yml index 3caf18a..0e4344b 100644 --- a/.github/workflows/cmake-single-platform.yml +++ b/.github/workflows/cmake-single-platform.yml @@ -25,8 +25,8 @@ jobs: - name: Setup Windows 10 SDK Action uses: GuillaumeFalourd/setup-windows10-sdk-action@v2.4 - with: - sdk-version: 26100 + with: + sdk-version: 26100 - name: Checkout Repository with submodules uses: actions/checkout@v4