Develop #410
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
name: Windows build | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
env: | |
ACTIONS_STEP_DEBUG: true | |
ACTIONS_RUNNER_DEBUG: true | |
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) | |
BUILD_TYPE: Debug | |
BUILD_DIR: build | |
VK_SDK_PATH: C:\VulkanSDK | |
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-2022 | |
env: | |
VULKAN_SDK: C:\VulkanSDK\ | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Set up PATH | |
run: | | |
echo "C:\VulkanSDK\Bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append | |
echo "C:\VulkanSDK\Lib" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append | |
echo "C:\VulkanSDK\Include" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append | |
- name: Setup Vulkan | |
run: | | |
$ver = (Invoke-WebRequest -Uri "https://vulkan.lunarg.com/sdk/latest.json" | ConvertFrom-Json).windows | |
echo Version $ver | |
$ProgressPreference = 'SilentlyContinue' | |
Invoke-WebRequest -Uri "https://sdk.lunarg.com/sdk/download/$ver/windows/VulkanSDK-$ver-Installer.exe" -OutFile VulkanSDK.exe | |
echo Downloaded | |
.\VulkanSDK.exe --root C:\VulkanSDK --accept-licenses --default-answer --confirm-command install | |
- name: Cmake Build | |
run: | | |
mkdir build | |
cd build | |
cmake --preset x64-Clang-Windows-CI ../ | |
cmake --build . --target ALL_BUILD --verbose | |
ctest | |
# - name: Configure CMake | |
# # 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" -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} | |
# - name: Build | |
# # Build your program with the given configuration | |
# run: cmake --build "${{github.workspace}}\build" --config ${{env.BUILD_TYPE}} # --target ${{env.MAIN_TARGET}} |