|
| 1 | +name: Build Code |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + pull_request: |
| 6 | + types: [opened] |
| 7 | + |
| 8 | +env: |
| 9 | + VMA_VULKAN_VERSION: "1.3.283.0" |
| 10 | + VMA_VULKAN_SDK_PATH: "$GITHUB_WORKSPACE/../vulkan_sdk/" |
| 11 | + |
| 12 | +jobs: |
| 13 | + windows: |
| 14 | + name: ${{ matrix.config.name }} |
| 15 | + runs-on: windows-latest |
| 16 | + strategy: |
| 17 | + fail-fast: false |
| 18 | + matrix: |
| 19 | + config: |
| 20 | + - { |
| 21 | + name: "Windows MSVC (Debug)", |
| 22 | + compiler: "msvc", |
| 23 | + cc: "cl", cxx: "cl", |
| 24 | + cmake_configure_options: '-G "Visual Studio 17 2022" -A x64', |
| 25 | + build_type: "Debug", |
| 26 | + } |
| 27 | + - { |
| 28 | + name: "Windows MSVC (Release)", |
| 29 | + compiler: "msvc", |
| 30 | + cc: "cl", cxx: "cl", |
| 31 | + cmake_configure_options: '-G "Visual Studio 17 2022" -A x64', |
| 32 | + build_type: "Release", |
| 33 | + } |
| 34 | + - { |
| 35 | + name: "Windows Clang (Debug)", |
| 36 | + compiler: "clang", |
| 37 | + cc: "clang-cl", cxx: "clang-cl", |
| 38 | + cmake_configure_options: '-G "Visual Studio 17 2022" -A x64 -T "LLVM_v143" -DCMAKE_CXX_COMPILER="clang-cl.exe" -DCMAKE_C_COMPILER="clang-cl.exe" -DCMAKE_LINKER="lld.exe"', |
| 39 | + build_type: "Debug", |
| 40 | + } |
| 41 | + - { |
| 42 | + name: "Windows Clang (Release)", |
| 43 | + compiler: "clang", |
| 44 | + cc: "clang-cl", cxx: "clang-cl", |
| 45 | + cmake_configure_options: '-G "Visual Studio 17 2022" -A x64 -T "LLVM_v143" -DCMAKE_CXX_COMPILER="clang-cl.exe" -DCMAKE_C_COMPILER="clang-cl.exe" -DCMAKE_LINKER="lld.exe"', |
| 46 | + build_type: "Release", |
| 47 | + } |
| 48 | + |
| 49 | + steps: |
| 50 | + - name: Checkout |
| 51 | + uses: actions/checkout@v4 |
| 52 | + |
| 53 | + - name: Install Vulkan SDK |
| 54 | + shell: pwsh |
| 55 | + run: | |
| 56 | + curl -LS -o vulkansdk.exe https://sdk.lunarg.com/sdk/download/${{ env.VMA_VULKAN_VERSION }}/windows/VulkanSDK-${{ env.VMA_VULKAN_VERSION }}-Installer.exe |
| 57 | + 7z x vulkansdk.exe -o"${{ env.VMA_VULKAN_SDK_PATH }}" |
| 58 | +
|
| 59 | + - name: Configure CMake |
| 60 | + shell: pwsh |
| 61 | + run: | |
| 62 | + $env:CC="${{ matrix.config.cc }}" |
| 63 | + $env:CXX="${{ matrix.config.cxx }}" |
| 64 | + $env:Path += ";${{ env.VMA_VULKAN_SDK_PATH }}\;${{ env.VMA_VULKAN_SDK_PATH }}\Bin\" |
| 65 | + $env:VULKAN_SDK="${{ env.VMA_VULKAN_SDK_PATH }}" |
| 66 | + cmake . ` |
| 67 | + -Bbuild ` |
| 68 | + -DCMAKE_BUILD_TYPE=${{ matrix.config.build_type }} ` |
| 69 | + -DVMA_BUILD_SAMPLES=ON ` |
| 70 | + ${{ matrix.config.cmake_configure_options }} |
| 71 | +
|
| 72 | + - name: Build |
| 73 | + shell: pwsh |
| 74 | + run: | |
| 75 | + cmake --build build --config ${{ matrix.config.build_type }} |
0 commit comments