|
60 | 60 | sudo apt-get install -y \ |
61 | 61 | build-essential \ |
62 | 62 | cmake \ |
| 63 | + ninja-build \ |
| 64 | + clang \ |
63 | 65 | libglfw3-dev \ |
64 | 66 | libglm-dev \ |
65 | 67 | libxrandr-dev \ |
@@ -98,14 +100,39 @@ jobs: |
98 | 100 | run: | |
99 | 101 | if exist install_dependencies_windows.bat call install_dependencies_windows.bat || exit /b 0 |
100 | 102 |
|
| 103 | + # Install LunarG Vulkan SDK on Windows and export environment variables for our FindVulkan.cmake |
| 104 | + - name: Install Vulkan SDK (Windows) |
| 105 | + if: matrix.os == 'windows-latest' |
| 106 | + shell: pwsh |
| 107 | + run: | |
| 108 | + choco install vulkan-sdk -y --no-progress |
| 109 | + $sdkDir = Get-ChildItem -Path 'C:\VulkanSDK' -ErrorAction SilentlyContinue | Sort-Object Name -Descending | Select-Object -First 1 |
| 110 | + if (-not $sdkDir) { throw "Vulkan SDK was not installed to C:\VulkanSDK" } |
| 111 | + echo "Using Vulkan SDK: $($sdkDir.FullName)" |
| 112 | + echo "VULKAN_SDK=$($sdkDir.FullName)" >> $env:GITHUB_ENV |
| 113 | + echo "PATH=$($sdkDir.FullName)\Bin;$env:PATH" >> $env:GITHUB_ENV |
| 114 | +
|
101 | 115 | # ----------------------- |
102 | 116 | # Configure & Build |
103 | 117 | # ----------------------- |
104 | | - - name: Configure (Unix) |
105 | | - if: matrix.os == 'ubuntu-latest' |
| 118 | + # Configure on Ubuntu without modules: GCC + Unix Makefiles |
| 119 | + - name: "Configure (Ubuntu • non-module: GCC + Makefiles)" |
| 120 | + if: matrix.os == 'ubuntu-latest' && matrix.enable_module == 'OFF' |
| 121 | + run: | |
| 122 | + cmake -S attachments/simple_engine \ |
| 123 | + -B build-simple_engine-${{ matrix.os }}-${{ matrix.build_type }}-m${{ matrix.enable_module }} \ |
| 124 | + -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \ |
| 125 | + -DENABLE_CPP20_MODULE=${{ matrix.enable_module }} |
| 126 | +
|
| 127 | + # Configure on Ubuntu with modules enabled: use Clang + Ninja (required for C++ modules) |
| 128 | + - name: "Configure (Ubuntu • module: Clang + Ninja)" |
| 129 | + if: matrix.os == 'ubuntu-latest' && matrix.enable_module == 'ON' |
106 | 130 | run: | |
107 | 131 | cmake -S attachments/simple_engine \ |
108 | 132 | -B build-simple_engine-${{ matrix.os }}-${{ matrix.build_type }}-m${{ matrix.enable_module }} \ |
| 133 | + -G Ninja \ |
| 134 | + -DCMAKE_C_COMPILER=clang \ |
| 135 | + -DCMAKE_CXX_COMPILER=clang++ \ |
109 | 136 | -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \ |
110 | 137 | -DENABLE_CPP20_MODULE=${{ matrix.enable_module }} |
111 | 138 |
|
|
0 commit comments