mirror of
https://github.com/KhronosGroup/Vulkan-Hpp.git
synced 2025-09-08 03:16:41 -04:00
CI: Reduce build times by reusing generated headers (#2254)
* reuse generated headers inbetween runs * properly access env var * fix windows compiler arg * reintroduce ubuntu24 ci compilers * fixed CXX_MODULES flag logic * echoing build parameters, removing use of Ninja from windows CI * fixed echo and temporarily disabled all but windows CI * reenabled all ci * compile glm, glfw and glslang once, fixed SPIRV include path * remove usage of Ninja from windows ci (again) * fixed glfw name to glfw3 * removed.. debug things * remove dep install step from windows, enforce correct linking in utils * compiling generators in debug mode without running them
This commit is contained in:
parent
c97b7ff82d
commit
aaf0cb61c4
104
.github/workflows/ci-macos.yml
vendored
104
.github/workflows/ci-macos.yml
vendored
@ -13,8 +13,6 @@ jobs:
|
||||
matrix:
|
||||
os: [macos-14, macos-15]
|
||||
compiler: [clang++]
|
||||
cpp_standard: [11, 14, 17, 20, 23]
|
||||
build_type: [Debug, Release]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
@ -29,16 +27,94 @@ jobs:
|
||||
uses: ashutoshvarma/setup-ninja@master
|
||||
with:
|
||||
version: 1.11.0
|
||||
|
||||
- name: Build
|
||||
|
||||
- name: Install glm, glfw and glslang
|
||||
run: |
|
||||
cmake -B build/${{matrix.cpp_standard}}/${{matrix.build_type}} -GNinja \
|
||||
-DVULKAN_HPP_SAMPLES_BUILD=ON \
|
||||
-DVULKAN_HPP_TESTS_BUILD=ON \
|
||||
-DVULKAN_HPP_BUILD_WITH_LOCAL_VULKAN_HPP=ON \
|
||||
-DVULKAN_HPP_PRECOMPILE=OFF \
|
||||
-DVULKAN_HPP_RUN_GENERATOR=ON \
|
||||
-DCMAKE_CXX_COMPILER=${{matrix.compiler}} \
|
||||
-DCMAKE_CXX_STANDARD=${{matrix.cpp_standard}} \
|
||||
-DCMAKE_BUILD_TYPE=${{matrix.build_type}}
|
||||
cmake --build build/${{matrix.cpp_standard}}/${{matrix.build_type}} --parallel
|
||||
cd glm
|
||||
cmake -B build -G Ninja \
|
||||
-D CMAKE_CXX_COMPILER=${{matrix.compiler}} \
|
||||
-D CMAKE_CXX_STANDARD=11 \
|
||||
-D CMAKE_BUILD_TYPE=Release \
|
||||
-D GLM_BUILD_LIBRARY=ON \
|
||||
-D GLM_BUILD_INSTALL=ON \
|
||||
-D GLM_BUILD_TESTS=OFF
|
||||
cmake --build build --parallel
|
||||
sudo cmake --install build
|
||||
|
||||
cd ../glfw
|
||||
cmake -B build -G Ninja \
|
||||
-D CMAKE_CXX_COMPILER=${{matrix.compiler}} \
|
||||
-D CMAKE_CXX_STANDARD=11 \
|
||||
-D CMAKE_BUILD_TYPE=Release \
|
||||
-D GLFW_BUILD_EXAMPLES=OFF \
|
||||
-D GLFW_BUILD_TESTS=OFF \
|
||||
-D GLFW_BUILD_DOCS=OFF \
|
||||
-D GLFW_INSTALL=ON
|
||||
cmake --build build --parallel
|
||||
sudo cmake --install build
|
||||
|
||||
cd ../glslang
|
||||
cmake -B build -G Ninja \
|
||||
-D CMAKE_CXX_COMPILER=${{matrix.compiler}} \
|
||||
-D CMAKE_CXX_STANDARD=11 \
|
||||
-D CMAKE_BUILD_TYPE=Release \
|
||||
-D ENABLE_OPT=OFF \
|
||||
-D GLSLANG_TESTS_DEFAULT=OFF \
|
||||
-D GLSLANG_ENABLE_INSTALL_DEFAULT=ON
|
||||
cmake --build build --parallel
|
||||
sudo cmake --install build
|
||||
cd ..
|
||||
|
||||
- name: Generate headers
|
||||
run: |
|
||||
cmake -B build -G Ninja \
|
||||
-D VULKAN_HPP_GENERATOR_BUILD=ON \
|
||||
-D VULKAN_HPP_RUN_GENERATOR=OFF \
|
||||
-D VULKAN_HPP_SAMPLES_BUILD=OFF \
|
||||
-D VULKAN_HPP_TESTS_BUILD=OFF \
|
||||
-D VULKAN_HPP_ENABLE_CPP20_MODULES=OFF \
|
||||
-D VULKAN_HPP_DISPATCH_LOADER_DYNAMIC=ON \
|
||||
-D VULKAN_HPP_BUILD_WITH_LOCAL_VULKAN_HPP=ON \
|
||||
-D VULKAN_HPP_PRECOMPILE=OFF \
|
||||
-D CMAKE_CXX_COMPILER=${{matrix.compiler}} \
|
||||
-D CMAKE_CXX_STANDARD=20 \
|
||||
-D CMAKE_BUILD_TYPE=Debug
|
||||
cmake --build build --parallel
|
||||
|
||||
cmake -B build -G Ninja --fresh \
|
||||
-D VULKAN_HPP_GENERATOR_BUILD=ON \
|
||||
-D VULKAN_HPP_RUN_GENERATOR=ON \
|
||||
-D VULKAN_HPP_SAMPLES_BUILD=OFF \
|
||||
-D VULKAN_HPP_TESTS_BUILD=OFF \
|
||||
-D VULKAN_HPP_ENABLE_CPP20_MODULES=OFF \
|
||||
-D VULKAN_HPP_DISPATCH_LOADER_DYNAMIC=ON \
|
||||
-D VULKAN_HPP_BUILD_WITH_LOCAL_VULKAN_HPP=ON \
|
||||
-D VULKAN_HPP_PRECOMPILE=OFF \
|
||||
-D CMAKE_CXX_COMPILER=${{matrix.compiler}} \
|
||||
-D CMAKE_CXX_STANDARD=20 \
|
||||
-D CMAKE_BUILD_TYPE=Release
|
||||
cmake --build build --parallel --clean-first
|
||||
|
||||
- name: Build samples and tests
|
||||
run: |
|
||||
for CXX_STANDARD in 11 14 17 20 23; do
|
||||
for BUILD_TYPE in Debug Release; do
|
||||
echo "================================================================================="
|
||||
echo "Building C++$CXX_STANDARD in $BUILD_TYPE"
|
||||
echo "================================================================================="
|
||||
|
||||
cmake -B build -G Ninja --fresh \
|
||||
-D VULKAN_HPP_GENERATOR_BUILD=OFF \
|
||||
-D VULKAN_HPP_RUN_GENERATOR=OFF \
|
||||
-D VULKAN_HPP_SAMPLES_BUILD=ON \
|
||||
-D VULKAN_HPP_TESTS_BUILD=ON \
|
||||
-D VULKAN_HPP_ENABLE_CPP20_MODULES=OFF \
|
||||
-D VULKAN_HPP_DISPATCH_LOADER_DYNAMIC=ON \
|
||||
-D VULKAN_HPP_BUILD_WITH_LOCAL_VULKAN_HPP=ON \
|
||||
-D VULKAN_HPP_PRECOMPILE=OFF \
|
||||
-D CMAKE_CXX_COMPILER=${{matrix.compiler}} \
|
||||
-D CMAKE_CXX_STANDARD=$CXX_STANDARD \
|
||||
-D CMAKE_BUILD_TYPE=$BUILD_TYPE
|
||||
cmake --build build --parallel --clean-first
|
||||
done
|
||||
done
|
||||
|
109
.github/workflows/ci-ubuntu-22.yml
vendored
109
.github/workflows/ci-ubuntu-22.yml
vendored
@ -16,11 +16,6 @@ jobs:
|
||||
strategy:
|
||||
matrix:
|
||||
compiler: [clang++-13, clang++-14, clang++-15, g++-10, g++-11, g++-12]
|
||||
cpp_standard: [11, 14, 17, 20, 23]
|
||||
build_type: [Debug, Release]
|
||||
exclude:
|
||||
- cpp_standard: 23
|
||||
compiler: g++-10
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
@ -35,15 +30,97 @@ jobs:
|
||||
with:
|
||||
version: 1.11.0
|
||||
|
||||
- name: Build
|
||||
- name: Install glm, glfw and glslang
|
||||
run: |
|
||||
cmake -B build/${{matrix.cpp_standard}}/${{matrix.build_type}} -GNinja \
|
||||
-DVULKAN_HPP_SAMPLES_BUILD=ON \
|
||||
-DVULKAN_HPP_TESTS_BUILD=ON \
|
||||
-DVULKAN_HPP_BUILD_WITH_LOCAL_VULKAN_HPP=ON \
|
||||
-DVULKAN_HPP_PRECOMPILE=OFF \
|
||||
-DVULKAN_HPP_RUN_GENERATOR=ON \
|
||||
-DCMAKE_CXX_COMPILER=${{matrix.compiler}} \
|
||||
-DCMAKE_CXX_STANDARD=${{matrix.cpp_standard}} \
|
||||
-DCMAKE_BUILD_TYPE=${{matrix.build_type}}
|
||||
cmake --build build/${{matrix.cpp_standard}}/${{matrix.build_type}} --parallel
|
||||
cd glm
|
||||
cmake -B build -G Ninja \
|
||||
-D CMAKE_CXX_COMPILER=${{matrix.compiler}} \
|
||||
-D CMAKE_CXX_STANDARD=11 \
|
||||
-D CMAKE_BUILD_TYPE=Release \
|
||||
-D GLM_BUILD_LIBRARY=ON \
|
||||
-D GLM_BUILD_INSTALL=ON \
|
||||
-D GLM_BUILD_TESTS=OFF
|
||||
cmake --build build --parallel
|
||||
sudo cmake --install build
|
||||
|
||||
cd ../glfw
|
||||
cmake -B build -G Ninja \
|
||||
-D CMAKE_CXX_COMPILER=${{matrix.compiler}} \
|
||||
-D CMAKE_CXX_STANDARD=11 \
|
||||
-D CMAKE_BUILD_TYPE=Release \
|
||||
-D GLFW_BUILD_EXAMPLES=OFF \
|
||||
-D GLFW_BUILD_TESTS=OFF \
|
||||
-D GLFW_BUILD_DOCS=OFF \
|
||||
-D GLFW_INSTALL=ON
|
||||
cmake --build build --parallel
|
||||
sudo cmake --install build
|
||||
|
||||
cd ../glslang
|
||||
cmake -B build -G Ninja \
|
||||
-D CMAKE_CXX_COMPILER=${{matrix.compiler}} \
|
||||
-D CMAKE_CXX_STANDARD=11 \
|
||||
-D CMAKE_BUILD_TYPE=Release \
|
||||
-D ENABLE_OPT=OFF \
|
||||
-D GLSLANG_TESTS_DEFAULT=OFF \
|
||||
-D GLSLANG_ENABLE_INSTALL_DEFAULT=ON
|
||||
cmake --build build --parallel
|
||||
sudo cmake --install build
|
||||
cd ..
|
||||
|
||||
- name: Generate headers
|
||||
run: |
|
||||
cmake -B build -G Ninja \
|
||||
-D VULKAN_HPP_GENERATOR_BUILD=ON \
|
||||
-D VULKAN_HPP_RUN_GENERATOR=OFF \
|
||||
-D VULKAN_HPP_SAMPLES_BUILD=OFF \
|
||||
-D VULKAN_HPP_TESTS_BUILD=OFF \
|
||||
-D VULKAN_HPP_ENABLE_CPP20_MODULES=OFF \
|
||||
-D VULKAN_HPP_DISPATCH_LOADER_DYNAMIC=ON \
|
||||
-D VULKAN_HPP_BUILD_WITH_LOCAL_VULKAN_HPP=ON \
|
||||
-D VULKAN_HPP_PRECOMPILE=OFF \
|
||||
-D CMAKE_CXX_COMPILER=${{matrix.compiler}} \
|
||||
-D CMAKE_CXX_STANDARD=20 \
|
||||
-D CMAKE_BUILD_TYPE=Debug
|
||||
cmake --build build --parallel
|
||||
|
||||
cmake -B build -G Ninja --fresh \
|
||||
-D VULKAN_HPP_GENERATOR_BUILD=ON \
|
||||
-D VULKAN_HPP_RUN_GENERATOR=ON \
|
||||
-D VULKAN_HPP_SAMPLES_BUILD=OFF \
|
||||
-D VULKAN_HPP_TESTS_BUILD=OFF \
|
||||
-D VULKAN_HPP_ENABLE_CPP20_MODULES=OFF \
|
||||
-D VULKAN_HPP_DISPATCH_LOADER_DYNAMIC=ON \
|
||||
-D VULKAN_HPP_BUILD_WITH_LOCAL_VULKAN_HPP=ON \
|
||||
-D VULKAN_HPP_PRECOMPILE=OFF \
|
||||
-D CMAKE_CXX_COMPILER=${{matrix.compiler}} \
|
||||
-D CMAKE_CXX_STANDARD=20 \
|
||||
-D CMAKE_BUILD_TYPE=Release
|
||||
cmake --build build --parallel --clean-first
|
||||
|
||||
- name: Build samples and tests
|
||||
run: |
|
||||
for CXX_STANDARD in 11 14 17 20 23; do
|
||||
for BUILD_TYPE in Debug Release; do
|
||||
if [ ${{matrix.compiler}} == g++-10 ] && [ $CXX_STANDARD == 23 ]; then
|
||||
continue
|
||||
fi
|
||||
|
||||
echo "================================================================================="
|
||||
echo "Building C++$CXX_STANDARD in $BUILD_TYPE"
|
||||
echo "================================================================================="
|
||||
|
||||
cmake -B build -G Ninja --fresh \
|
||||
-D VULKAN_HPP_GENERATOR_BUILD=OFF \
|
||||
-D VULKAN_HPP_RUN_GENERATOR=OFF \
|
||||
-D VULKAN_HPP_SAMPLES_BUILD=ON \
|
||||
-D VULKAN_HPP_TESTS_BUILD=ON \
|
||||
-D VULKAN_HPP_ENABLE_CPP20_MODULES=OFF \
|
||||
-D VULKAN_HPP_DISPATCH_LOADER_DYNAMIC=ON \
|
||||
-D VULKAN_HPP_BUILD_WITH_LOCAL_VULKAN_HPP=ON \
|
||||
-D VULKAN_HPP_PRECOMPILE=OFF \
|
||||
-D CMAKE_CXX_COMPILER=${{matrix.compiler}} \
|
||||
-D CMAKE_CXX_STANDARD=$CXX_STANDARD \
|
||||
-D CMAKE_BUILD_TYPE=$BUILD_TYPE
|
||||
cmake --build build --parallel --clean-first
|
||||
done
|
||||
done
|
||||
|
119
.github/workflows/ci-ubuntu-24.yml
vendored
119
.github/workflows/ci-ubuntu-24.yml
vendored
@ -16,11 +16,6 @@ jobs:
|
||||
strategy:
|
||||
matrix:
|
||||
compiler: [clang++-16, clang++-17, clang++-18, g++-12, g++-13, g++-14]
|
||||
cpp_standard: [11, 14, 17, 20, 23]
|
||||
build_type: [Debug, Release]
|
||||
exclude:
|
||||
- cpp_standard: 23
|
||||
compiler: clang++-17 # clang++-17 gives some strange errors in std::tuple !
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
@ -35,18 +30,104 @@ jobs:
|
||||
with:
|
||||
version: 1.11.0
|
||||
|
||||
- name: Build
|
||||
- name: Install glm, glfw and glslang
|
||||
run: |
|
||||
modules_flag=${{(contains(fromJSON('["clang++-16", "g++-12", "g++-13", "g++-14"]'), matrix.compiler) || matrix.cpp_standard < 20) && 'OFF' || 'ON'}}
|
||||
cmake -B build/${{matrix.cpp_standard}}/${{matrix.build_type}} -GNinja \
|
||||
-DVULKAN_HPP_SAMPLES_BUILD=ON \
|
||||
-DVULKAN_HPP_TESTS_BUILD=ON \
|
||||
-DVULKAN_HPP_ENABLE_CPP20_MODULES=$modules_flag \
|
||||
-DVULKAN_HPP_DISPATCH_LOADER_DYNAMIC=ON \
|
||||
-DVULKAN_HPP_BUILD_WITH_LOCAL_VULKAN_HPP=ON \
|
||||
-DVULKAN_HPP_PRECOMPILE=OFF \
|
||||
-DVULKAN_HPP_RUN_GENERATOR=ON \
|
||||
-DCMAKE_CXX_COMPILER=${{matrix.compiler}} \
|
||||
-DCMAKE_CXX_STANDARD=${{matrix.cpp_standard}} \
|
||||
-DCMAKE_BUILD_TYPE=${{matrix.build_type}}
|
||||
cmake --build build/${{matrix.cpp_standard}}/${{matrix.build_type}} --parallel
|
||||
cd glm
|
||||
cmake -B build -G Ninja \
|
||||
-D CMAKE_CXX_COMPILER=${{matrix.compiler}} \
|
||||
-D CMAKE_CXX_STANDARD=11 \
|
||||
-D CMAKE_BUILD_TYPE=Release \
|
||||
-D GLM_BUILD_LIBRARY=ON \
|
||||
-D GLM_BUILD_INSTALL=ON \
|
||||
-D GLM_BUILD_TESTS=OFF
|
||||
cmake --build build --parallel
|
||||
sudo cmake --install build
|
||||
|
||||
cd ../glfw
|
||||
cmake -B build -G Ninja \
|
||||
-D CMAKE_CXX_COMPILER=${{matrix.compiler}} \
|
||||
-D CMAKE_CXX_STANDARD=11 \
|
||||
-D CMAKE_BUILD_TYPE=Release \
|
||||
-D GLFW_BUILD_EXAMPLES=OFF \
|
||||
-D GLFW_BUILD_TESTS=OFF \
|
||||
-D GLFW_BUILD_DOCS=OFF \
|
||||
-D GLFW_INSTALL=ON
|
||||
cmake --build build --parallel
|
||||
sudo cmake --install build
|
||||
|
||||
cd ../glslang
|
||||
cmake -B build -G Ninja \
|
||||
-D CMAKE_CXX_COMPILER=${{matrix.compiler}} \
|
||||
-D CMAKE_CXX_STANDARD=11 \
|
||||
-D CMAKE_BUILD_TYPE=Release \
|
||||
-D ENABLE_OPT=OFF \
|
||||
-D GLSLANG_TESTS_DEFAULT=OFF \
|
||||
-D GLSLANG_ENABLE_INSTALL_DEFAULT=ON
|
||||
cmake --build build --parallel
|
||||
sudo cmake --install build
|
||||
cd ..
|
||||
|
||||
- name: Generate headers
|
||||
run: |
|
||||
cmake -B build -G Ninja \
|
||||
-D VULKAN_HPP_GENERATOR_BUILD=ON \
|
||||
-D VULKAN_HPP_RUN_GENERATOR=OFF \
|
||||
-D VULKAN_HPP_SAMPLES_BUILD=OFF \
|
||||
-D VULKAN_HPP_TESTS_BUILD=OFF \
|
||||
-D VULKAN_HPP_ENABLE_CPP20_MODULES=OFF \
|
||||
-D VULKAN_HPP_DISPATCH_LOADER_DYNAMIC=ON \
|
||||
-D VULKAN_HPP_BUILD_WITH_LOCAL_VULKAN_HPP=ON \
|
||||
-D VULKAN_HPP_PRECOMPILE=OFF \
|
||||
-D CMAKE_CXX_COMPILER=${{matrix.compiler}} \
|
||||
-D CMAKE_CXX_STANDARD=20 \
|
||||
-D CMAKE_BUILD_TYPE=Debug
|
||||
cmake --build build --parallel
|
||||
|
||||
cmake -B build -G Ninja --fresh \
|
||||
-D VULKAN_HPP_GENERATOR_BUILD=ON \
|
||||
-D VULKAN_HPP_RUN_GENERATOR=ON \
|
||||
-D VULKAN_HPP_SAMPLES_BUILD=OFF \
|
||||
-D VULKAN_HPP_TESTS_BUILD=OFF \
|
||||
-D VULKAN_HPP_ENABLE_CPP20_MODULES=OFF \
|
||||
-D VULKAN_HPP_DISPATCH_LOADER_DYNAMIC=ON \
|
||||
-D VULKAN_HPP_BUILD_WITH_LOCAL_VULKAN_HPP=ON \
|
||||
-D VULKAN_HPP_PRECOMPILE=OFF \
|
||||
-D CMAKE_CXX_COMPILER=${{matrix.compiler}} \
|
||||
-D CMAKE_CXX_STANDARD=20 \
|
||||
-D CMAKE_BUILD_TYPE=Release
|
||||
cmake --build build --parallel --clean-first
|
||||
|
||||
- name: Build samples and tests
|
||||
run: |
|
||||
for CXX_STANDARD in 11 14 17 20 23; do
|
||||
for BUILD_TYPE in Debug Release; do
|
||||
if [ ${{matrix.compiler}} == clang++-17 ] && [ $CXX_STANDARD == 23 ]; then
|
||||
continue
|
||||
fi
|
||||
|
||||
CXX_MODULES=ON
|
||||
for compiler in "clang++-16" "g++-12" "g++-13" "g++-14"; do
|
||||
if [ ${{matrix.compiler}} == $compiler ] || [ $CXX_STANDARD -lt 20 ]; then
|
||||
CXX_MODULES=OFF
|
||||
fi
|
||||
done
|
||||
|
||||
echo "================================================================================="
|
||||
echo "Building C++$CXX_STANDARD in $BUILD_TYPE"
|
||||
echo "================================================================================="
|
||||
|
||||
cmake -B build -G Ninja --fresh \
|
||||
-D VULKAN_HPP_GENERATOR_BUILD=OFF \
|
||||
-D VULKAN_HPP_RUN_GENERATOR=OFF \
|
||||
-D VULKAN_HPP_SAMPLES_BUILD=ON \
|
||||
-D VULKAN_HPP_TESTS_BUILD=ON \
|
||||
-D VULKAN_HPP_ENABLE_CPP20_MODULES=$CXX_MODULES \
|
||||
-D VULKAN_HPP_DISPATCH_LOADER_DYNAMIC=ON \
|
||||
-D VULKAN_HPP_BUILD_WITH_LOCAL_VULKAN_HPP=ON \
|
||||
-D VULKAN_HPP_PRECOMPILE=OFF \
|
||||
-D CMAKE_CXX_COMPILER=${{matrix.compiler}} \
|
||||
-D CMAKE_CXX_STANDARD=$CXX_STANDARD \
|
||||
-D CMAKE_BUILD_TYPE=$BUILD_TYPE
|
||||
cmake --build build --parallel --clean-first
|
||||
done
|
||||
done
|
||||
|
103
.github/workflows/ci-windows.yml
vendored
103
.github/workflows/ci-windows.yml
vendored
@ -17,8 +17,6 @@ jobs:
|
||||
matrix:
|
||||
os: [windows-2022, windows-2025]
|
||||
architecture: [x86, x64]
|
||||
cpp_standard: [11, 14, 17, 20, 23]
|
||||
build_type: [Debug, Release]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
@ -30,17 +28,92 @@ jobs:
|
||||
with:
|
||||
arch: ${{matrix.architecture}}
|
||||
|
||||
- name: Build
|
||||
# - name: Install glm, glfw and glslang
|
||||
# run: |
|
||||
# cd glm
|
||||
# cmake -B build \
|
||||
# -D CMAKE_CXX_STANDARD=11 \
|
||||
# -D CMAKE_BUILD_TYPE=Release \
|
||||
# -D GLM_BUILD_LIBRARY=ON \
|
||||
# -D GLM_BUILD_INSTALL=ON \
|
||||
# -D GLM_BUILD_TESTS=OFF
|
||||
# cmake --build build --parallel
|
||||
# cmake --install build
|
||||
|
||||
# cd ../glfw
|
||||
# cmake -B build \
|
||||
# -D CMAKE_CXX_STANDARD=11 \
|
||||
# -D CMAKE_BUILD_TYPE=Release \
|
||||
# -D GLFW_BUILD_EXAMPLES=OFF \
|
||||
# -D GLFW_BUILD_TESTS=OFF \
|
||||
# -D GLFW_BUILD_DOCS=OFF \
|
||||
# -D GLFW_INSTALL=ON
|
||||
# cmake --build build --parallel
|
||||
# cmake --install build
|
||||
|
||||
# cd ../glslang
|
||||
# cmake -B build \
|
||||
# -D CMAKE_CXX_STANDARD=11 \
|
||||
# -D CMAKE_BUILD_TYPE=Release \
|
||||
# -D ENABLE_OPT=OFF \
|
||||
# -D GLSLANG_TESTS_DEFAULT=OFF \
|
||||
# -D GLSLANG_ENABLE_INSTALL_DEFAULT=ON
|
||||
# cmake --build build --parallel
|
||||
# cmake --install build
|
||||
# cd ..
|
||||
|
||||
- name: Generate headers
|
||||
run: |
|
||||
modules_flag=${{(contains(fromJSON('["windows-2019"]'), matrix.os) || matrix.cpp_standard < 20) && 'OFF' || 'ON'}}
|
||||
cmake -B build/${{matrix.cpp_standard}}/${{matrix.build_type}} \
|
||||
-DVULKAN_HPP_SAMPLES_BUILD=ON \
|
||||
-DVULKAN_HPP_TESTS_BUILD=ON \
|
||||
-DVULKAN_HPP_ENABLE_CPP20_MODULES=$modules_flag \
|
||||
-DVULKAN_HPP_DISPATCH_LOADER_DYNAMIC=ON \
|
||||
-DVULKAN_HPP_BUILD_WITH_LOCAL_VULKAN_HPP=ON \
|
||||
-DVULKAN_HPP_PRECOMPILE=OFF \
|
||||
-DVULKAN_HPP_RUN_GENERATOR=ON \
|
||||
-DCMAKE_CXX_STANDARD=${{matrix.cpp_standard}} \
|
||||
-DCMAKE_BUILD_TYPE=${{matrix.build_type}}
|
||||
cmake --build build/${{matrix.cpp_standard}}/${{matrix.build_type}} --parallel
|
||||
cmake -B build \
|
||||
-D VULKAN_HPP_GENERATOR_BUILD=ON \
|
||||
-D VULKAN_HPP_RUN_GENERATOR=OFF \
|
||||
-D VULKAN_HPP_SAMPLES_BUILD=OFF \
|
||||
-D VULKAN_HPP_TESTS_BUILD=OFF \
|
||||
-D VULKAN_HPP_ENABLE_CPP20_MODULES=OFF \
|
||||
-D VULKAN_HPP_DISPATCH_LOADER_DYNAMIC=ON \
|
||||
-D VULKAN_HPP_BUILD_WITH_LOCAL_VULKAN_HPP=ON \
|
||||
-D VULKAN_HPP_PRECOMPILE=OFF \
|
||||
-D CMAKE_CXX_STANDARD=20 \
|
||||
-D CMAKE_BUILD_TYPE=Debug
|
||||
cmake --build build --parallel
|
||||
|
||||
cmake -B build --fresh \
|
||||
-D VULKAN_HPP_GENERATOR_BUILD=ON \
|
||||
-D VULKAN_HPP_RUN_GENERATOR=ON \
|
||||
-D VULKAN_HPP_SAMPLES_BUILD=OFF \
|
||||
-D VULKAN_HPP_TESTS_BUILD=OFF \
|
||||
-D VULKAN_HPP_ENABLE_CPP20_MODULES=OFF \
|
||||
-D VULKAN_HPP_DISPATCH_LOADER_DYNAMIC=ON \
|
||||
-D VULKAN_HPP_BUILD_WITH_LOCAL_VULKAN_HPP=ON \
|
||||
-D VULKAN_HPP_PRECOMPILE=OFF \
|
||||
-D CMAKE_CXX_STANDARD=20 \
|
||||
-D CMAKE_BUILD_TYPE=Release
|
||||
cmake --build build --parallel --clean-first
|
||||
|
||||
- name: Build samples and tests
|
||||
run: |
|
||||
for CXX_STANDARD in 11 14 17 20 23; do
|
||||
for BUILD_TYPE in Debug Release; do
|
||||
CXX_MODULES=ON
|
||||
if [ ${{matrix.compiler}} == "windows-2019" ] || [ $CXX_STANDARD -lt 20 ]; then
|
||||
CXX_MODULES=OFF
|
||||
fi
|
||||
|
||||
echo "================================================================================="
|
||||
echo "Building C++$CXX_STANDARD in $BUILD_TYPE with architecture ${{matrix.architecture}}"
|
||||
echo "================================================================================="
|
||||
|
||||
cmake -B build --fresh \
|
||||
-D VULKAN_HPP_GENERATOR_BUILD=OFF \
|
||||
-D VULKAN_HPP_RUN_GENERATOR=OFF \
|
||||
-D VULKAN_HPP_SAMPLES_BUILD=ON \
|
||||
-D VULKAN_HPP_TESTS_BUILD=ON \
|
||||
-D VULKAN_HPP_ENABLE_CPP20_MODULES=$CXX_MODULES \
|
||||
-D VULKAN_HPP_DISPATCH_LOADER_DYNAMIC=ON \
|
||||
-D VULKAN_HPP_BUILD_WITH_LOCAL_VULKAN_HPP=ON \
|
||||
-D VULKAN_HPP_PRECOMPILE=OFF \
|
||||
-D CMAKE_CXX_STANDARD=$CXX_STANDARD \
|
||||
-D CMAKE_BUILD_TYPE=$BUILD_TYPE
|
||||
cmake --build build --parallel --clean-first
|
||||
done
|
||||
done
|
||||
|
@ -556,12 +556,23 @@ endfunction()
|
||||
|
||||
if( VULKAN_HPP_SAMPLES_BUILD OR VULKAN_HPP_TESTS_BUILD )
|
||||
# external libraries
|
||||
add_subdirectory( glm )
|
||||
set( GLFW_BUILD_EXAMPLES OFF )
|
||||
set( GLFW_BUILD_TESTS OFF )
|
||||
add_subdirectory( glfw )
|
||||
set( ENABLE_OPT OFF ) # could use ALLOW_EXTERNAL_SPIRV_TOOLS=ON instead
|
||||
add_subdirectory( glslang )
|
||||
find_package( glm QUIET )
|
||||
if( NOT glm_FOUND )
|
||||
add_subdirectory( glm )
|
||||
endif()
|
||||
|
||||
find_package( glfw3 QUIET )
|
||||
if( NOT glfw3_FOUND )
|
||||
set( GLFW_BUILD_EXAMPLES OFF )
|
||||
set( GLFW_BUILD_TESTS OFF )
|
||||
add_subdirectory( glfw )
|
||||
endif()
|
||||
|
||||
find_package( glslang QUIET )
|
||||
if( NOT glslang_FOUND )
|
||||
set( ENABLE_OPT OFF ) # could use ALLOW_EXTERNAL_SPIRV_TOOLS=ON instead
|
||||
add_subdirectory( glslang )
|
||||
endif()
|
||||
|
||||
add_subdirectory( samples/utils )
|
||||
add_subdirectory( RAII_Samples/utils )
|
||||
|
@ -17,7 +17,6 @@
|
||||
|
||||
#include "../utils/shaders.hpp"
|
||||
#include "../utils/utils.hpp"
|
||||
#include "SPIRV/GlslangToSpv.h"
|
||||
#include "glslang/Public/ShaderLang.h"
|
||||
|
||||
#include <iostream>
|
||||
|
@ -29,7 +29,6 @@
|
||||
#include "../../samples/utils/math.hpp"
|
||||
#include "../utils/shaders.hpp"
|
||||
#include "../utils/utils.hpp"
|
||||
#include "SPIRV/GlslangToSpv.h"
|
||||
#include "glslang/Public/ShaderLang.h"
|
||||
|
||||
#include <iostream>
|
||||
|
@ -29,7 +29,6 @@
|
||||
#include "../../samples/utils/math.hpp"
|
||||
#include "../utils/shaders.hpp"
|
||||
#include "../utils/utils.hpp"
|
||||
#include "SPIRV/GlslangToSpv.h"
|
||||
#include "glslang/Public/ShaderLang.h"
|
||||
|
||||
#include <iostream>
|
||||
|
@ -19,7 +19,6 @@
|
||||
#include "../../samples/utils/math.hpp"
|
||||
#include "../utils/shaders.hpp"
|
||||
#include "../utils/utils.hpp"
|
||||
#include "SPIRV/GlslangToSpv.h"
|
||||
#include "glslang/Public/ShaderLang.h"
|
||||
|
||||
#include <iostream>
|
||||
|
@ -23,7 +23,6 @@
|
||||
#include "../../samples/utils/math.hpp"
|
||||
#include "../utils/shaders.hpp"
|
||||
#include "../utils/utils.hpp"
|
||||
#include "SPIRV/GlslangToSpv.h"
|
||||
#include "glslang/Public/ShaderLang.h"
|
||||
|
||||
#include <iostream>
|
||||
|
@ -31,7 +31,6 @@
|
||||
#include "../../samples/utils/math.hpp"
|
||||
#include "../utils/shaders.hpp"
|
||||
#include "../utils/utils.hpp"
|
||||
#include "SPIRV/GlslangToSpv.h"
|
||||
#include "glslang/Public/ShaderLang.h"
|
||||
|
||||
#include <iostream>
|
||||
|
@ -25,11 +25,10 @@
|
||||
// unknow compiler... just ignore the warnings for yourselves ;)
|
||||
#endif
|
||||
|
||||
#include "../samples/utils/geometries.hpp"
|
||||
#include "../samples/utils/math.hpp"
|
||||
#include "../../samples/utils/geometries.hpp"
|
||||
#include "../../samples/utils/math.hpp"
|
||||
#include "../utils/shaders.hpp"
|
||||
#include "../utils/utils.hpp"
|
||||
#include "SPIRV/GlslangToSpv.h"
|
||||
#include "glslang/Public/ShaderLang.h"
|
||||
|
||||
#include <iostream>
|
||||
|
@ -29,7 +29,6 @@
|
||||
#include "../../samples/utils/math.hpp"
|
||||
#include "../utils/shaders.hpp"
|
||||
#include "../utils/utils.hpp"
|
||||
#include "SPIRV/GlslangToSpv.h"
|
||||
#include "glslang/Public/ShaderLang.h"
|
||||
|
||||
#include <iostream>
|
||||
|
@ -31,7 +31,6 @@
|
||||
#include "../../samples/utils/math.hpp"
|
||||
#include "../utils/shaders.hpp"
|
||||
#include "../utils/utils.hpp"
|
||||
#include "SPIRV/GlslangToSpv.h"
|
||||
#include "glslang/Public/ShaderLang.h"
|
||||
|
||||
#include <iostream>
|
||||
|
@ -19,7 +19,6 @@
|
||||
#include "../../samples/utils/math.hpp"
|
||||
#include "../utils/shaders.hpp"
|
||||
#include "../utils/utils.hpp"
|
||||
#include "SPIRV/GlslangToSpv.h"
|
||||
#include "glslang/Public/ShaderLang.h"
|
||||
|
||||
#include <iostream>
|
||||
|
@ -28,7 +28,6 @@
|
||||
#include "../../samples/utils/math.hpp"
|
||||
#include "../utils/shaders.hpp"
|
||||
#include "../utils/utils.hpp"
|
||||
#include "SPIRV/GlslangToSpv.h"
|
||||
#include "glslang/Public/ShaderLang.h"
|
||||
|
||||
#include <fstream>
|
||||
|
@ -28,7 +28,6 @@
|
||||
#include "../../samples/utils/math.hpp"
|
||||
#include "../utils/shaders.hpp"
|
||||
#include "../utils/utils.hpp"
|
||||
#include "SPIRV/GlslangToSpv.h"
|
||||
#include "glslang/Public/ShaderLang.h"
|
||||
|
||||
#include <thread>
|
||||
|
@ -28,7 +28,6 @@
|
||||
#include "../../samples/utils/math.hpp"
|
||||
#include "../utils/shaders.hpp"
|
||||
#include "../utils/utils.hpp"
|
||||
#include "SPIRV/GlslangToSpv.h"
|
||||
#include "glslang/Public/ShaderLang.h"
|
||||
|
||||
#include <iostream>
|
||||
|
@ -20,7 +20,6 @@
|
||||
#include "../../samples/utils/math.hpp"
|
||||
#include "../utils/shaders.hpp"
|
||||
#include "../utils/utils.hpp"
|
||||
#include "SPIRV/GlslangToSpv.h"
|
||||
#include "glslang/Public/ShaderLang.h"
|
||||
|
||||
#include <iostream>
|
||||
|
@ -28,6 +28,7 @@
|
||||
|
||||
#include "CameraManipulator.hpp"
|
||||
|
||||
#define GLM_ENABLE_EXPERIMENTAL
|
||||
#include <glm/glm.hpp>
|
||||
#include <glm/gtx/rotate_vector.hpp>
|
||||
|
||||
|
@ -44,7 +44,6 @@
|
||||
#include "../utils/shaders.hpp"
|
||||
#include "../utils/utils.hpp"
|
||||
#include "CameraManipulator.hpp"
|
||||
#include "SPIRV/GlslangToSpv.h"
|
||||
#include "glslang/Public/ShaderLang.h"
|
||||
|
||||
#include <glm/glm.hpp>
|
||||
|
@ -29,7 +29,6 @@
|
||||
#include "../../samples/utils/math.hpp"
|
||||
#include "../utils/shaders.hpp"
|
||||
#include "../utils/utils.hpp"
|
||||
#include "SPIRV/GlslangToSpv.h"
|
||||
#include "glslang/Public/ShaderLang.h"
|
||||
|
||||
#include <iostream>
|
||||
|
@ -28,7 +28,6 @@
|
||||
#include "../../samples/utils/math.hpp"
|
||||
#include "../utils/shaders.hpp"
|
||||
#include "../utils/utils.hpp"
|
||||
#include "SPIRV/GlslangToSpv.h"
|
||||
#include "glslang/Public/ShaderLang.h"
|
||||
|
||||
#include <iostream>
|
||||
|
@ -19,7 +19,6 @@
|
||||
#include "../../samples/utils/math.hpp"
|
||||
#include "../utils/shaders.hpp"
|
||||
#include "../utils/utils.hpp"
|
||||
#include "SPIRV/GlslangToSpv.h"
|
||||
#include "glslang/Public/ShaderLang.h"
|
||||
|
||||
#include <iostream>
|
||||
|
@ -19,7 +19,6 @@
|
||||
#include "../../samples/utils/math.hpp"
|
||||
#include "../utils/shaders.hpp"
|
||||
#include "../utils/utils.hpp"
|
||||
#include "SPIRV/GlslangToSpv.h"
|
||||
#include "glslang/Public/ShaderLang.h"
|
||||
|
||||
#include <iostream>
|
||||
|
@ -17,7 +17,6 @@
|
||||
|
||||
#include "../utils/shaders.hpp"
|
||||
#include "../utils/utils.hpp"
|
||||
#include "SPIRV/GlslangToSpv.h"
|
||||
#include "glslang/Public/ShaderLang.h"
|
||||
|
||||
#include <iostream>
|
||||
|
@ -29,7 +29,6 @@
|
||||
#include "../utils/math.hpp"
|
||||
#include "../utils/shaders.hpp"
|
||||
#include "../utils/utils.hpp"
|
||||
#include "SPIRV/GlslangToSpv.h"
|
||||
#include "glslang/Public/ShaderLang.h"
|
||||
|
||||
#include <iostream>
|
||||
|
@ -19,7 +19,6 @@
|
||||
#include "../utils/math.hpp"
|
||||
#include "../utils/shaders.hpp"
|
||||
#include "../utils/utils.hpp"
|
||||
#include "SPIRV/GlslangToSpv.h"
|
||||
#include "glslang/Public/ShaderLang.h"
|
||||
|
||||
#include <iostream>
|
||||
|
@ -19,7 +19,6 @@
|
||||
#include "../utils/math.hpp"
|
||||
#include "../utils/shaders.hpp"
|
||||
#include "../utils/utils.hpp"
|
||||
#include "SPIRV/GlslangToSpv.h"
|
||||
#include "glslang/Public/ShaderLang.h"
|
||||
|
||||
#include <iostream>
|
||||
|
@ -25,7 +25,6 @@
|
||||
# pragma warning( disable : 4100 ) // unreferenced formal parameter (glslang)
|
||||
#endif // endif (_MSC_VER )
|
||||
|
||||
#include "SPIRV/GlslangToSpv.h"
|
||||
#include "glslang/Public/ShaderLang.h"
|
||||
|
||||
#if defined( _MSC_VER )
|
||||
|
@ -28,7 +28,6 @@
|
||||
#include "../utils/math.hpp"
|
||||
#include "../utils/shaders.hpp"
|
||||
#include "../utils/utils.hpp"
|
||||
#include "SPIRV/GlslangToSpv.h"
|
||||
#include "glslang/Public/ShaderLang.h"
|
||||
|
||||
#include <iostream>
|
||||
|
@ -29,7 +29,6 @@
|
||||
#include "../utils/math.hpp"
|
||||
#include "../utils/shaders.hpp"
|
||||
#include "../utils/utils.hpp"
|
||||
#include "SPIRV/GlslangToSpv.h"
|
||||
#include "glslang/Public/ShaderLang.h"
|
||||
|
||||
#include <iostream>
|
||||
|
@ -29,7 +29,6 @@
|
||||
#include "../utils/math.hpp"
|
||||
#include "../utils/shaders.hpp"
|
||||
#include "../utils/utils.hpp"
|
||||
#include "SPIRV/GlslangToSpv.h"
|
||||
#include "glslang/Public/ShaderLang.h"
|
||||
|
||||
#include <iostream>
|
||||
|
@ -28,7 +28,6 @@
|
||||
#include "../utils/math.hpp"
|
||||
#include "../utils/shaders.hpp"
|
||||
#include "../utils/utils.hpp"
|
||||
#include "SPIRV/GlslangToSpv.h"
|
||||
#include "glslang/Public/ShaderLang.h"
|
||||
|
||||
#include <iostream>
|
||||
|
@ -19,7 +19,6 @@
|
||||
#include "../utils/math.hpp"
|
||||
#include "../utils/shaders.hpp"
|
||||
#include "../utils/utils.hpp"
|
||||
#include "SPIRV/GlslangToSpv.h"
|
||||
#include "glslang/Public/ShaderLang.h"
|
||||
|
||||
#include <iostream>
|
||||
|
@ -28,7 +28,6 @@
|
||||
#include "../utils/math.hpp"
|
||||
#include "../utils/shaders.hpp"
|
||||
#include "../utils/utils.hpp"
|
||||
#include "SPIRV/GlslangToSpv.h"
|
||||
#include "glslang/Public/ShaderLang.h"
|
||||
|
||||
#include <fstream>
|
||||
|
@ -28,7 +28,6 @@
|
||||
#include "../utils/math.hpp"
|
||||
#include "../utils/shaders.hpp"
|
||||
#include "../utils/utils.hpp"
|
||||
#include "SPIRV/GlslangToSpv.h"
|
||||
#include "glslang/Public/ShaderLang.h"
|
||||
|
||||
#include <thread>
|
||||
|
@ -28,7 +28,6 @@
|
||||
#include "../utils/math.hpp"
|
||||
#include "../utils/shaders.hpp"
|
||||
#include "../utils/utils.hpp"
|
||||
#include "SPIRV/GlslangToSpv.h"
|
||||
#include "glslang/Public/ShaderLang.h"
|
||||
|
||||
#include <iostream>
|
||||
|
@ -19,7 +19,6 @@
|
||||
#include "../utils/math.hpp"
|
||||
#include "../utils/shaders.hpp"
|
||||
#include "../utils/utils.hpp"
|
||||
#include "SPIRV/GlslangToSpv.h"
|
||||
#include "glslang/Public/ShaderLang.h"
|
||||
|
||||
#include <iostream>
|
||||
|
@ -28,6 +28,7 @@
|
||||
|
||||
#include "CameraManipulator.hpp"
|
||||
|
||||
#define GLM_ENABLE_EXPERIMENTAL
|
||||
#include <glm/glm.hpp>
|
||||
#include <glm/gtx/rotate_vector.hpp>
|
||||
|
||||
|
@ -44,7 +44,6 @@
|
||||
#include "../utils/shaders.hpp"
|
||||
#include "../utils/utils.hpp"
|
||||
#include "CameraManipulator.hpp"
|
||||
#include "SPIRV/GlslangToSpv.h"
|
||||
#include "glslang/Public/ShaderLang.h"
|
||||
|
||||
#include <glm/glm.hpp>
|
||||
|
@ -29,7 +29,6 @@
|
||||
#include "../utils/math.hpp"
|
||||
#include "../utils/shaders.hpp"
|
||||
#include "../utils/utils.hpp"
|
||||
#include "SPIRV/GlslangToSpv.h"
|
||||
#include "glslang/Public/ShaderLang.h"
|
||||
|
||||
#include <iostream>
|
||||
|
@ -28,7 +28,6 @@
|
||||
#include "../utils/math.hpp"
|
||||
#include "../utils/shaders.hpp"
|
||||
#include "../utils/utils.hpp"
|
||||
#include "SPIRV/GlslangToSpv.h"
|
||||
#include "glslang/Public/ShaderLang.h"
|
||||
|
||||
#include <iostream>
|
||||
|
@ -21,7 +21,6 @@
|
||||
#include "../utils/math.hpp"
|
||||
#include "../utils/shaders.hpp"
|
||||
#include "../utils/utils.hpp"
|
||||
#include "SPIRV/GlslangToSpv.h"
|
||||
#include "glslang/Public/ShaderLang.h"
|
||||
|
||||
#include <iostream>
|
||||
|
@ -19,7 +19,6 @@
|
||||
#include "../utils/math.hpp"
|
||||
#include "../utils/shaders.hpp"
|
||||
#include "../utils/utils.hpp"
|
||||
#include "SPIRV/GlslangToSpv.h"
|
||||
#include "glslang/Public/ShaderLang.h"
|
||||
|
||||
#include <iostream>
|
||||
|
@ -19,7 +19,6 @@
|
||||
#include "../utils/math.hpp"
|
||||
#include "../utils/shaders.hpp"
|
||||
#include "../utils/utils.hpp"
|
||||
#include "SPIRV/GlslangToSpv.h"
|
||||
#include "glslang/Public/ShaderLang.h"
|
||||
|
||||
#include <iostream>
|
||||
|
@ -22,11 +22,11 @@ if( VULKAN_HPP_RUN_GENERATOR )
|
||||
add_dependencies( utils build_vulkan_hpp )
|
||||
endif()
|
||||
|
||||
target_link_libraries( utils PUBLIC glm )
|
||||
target_link_libraries( utils PUBLIC glm::glm )
|
||||
target_link_libraries( utils PUBLIC glfw )
|
||||
target_link_libraries( utils PUBLIC glslang )
|
||||
target_link_libraries( utils PUBLIC glslang-default-resource-limits )
|
||||
target_link_libraries( utils PUBLIC SPIRV )
|
||||
target_link_libraries( utils PUBLIC glslang::glslang )
|
||||
target_link_libraries( utils PUBLIC glslang::glslang-default-resource-limits )
|
||||
target_link_libraries( utils PUBLIC glslang::SPIRV )
|
||||
target_compile_definitions( utils PUBLIC VULKAN_HPP_DISPATCH_LOADER_DYNAMIC=1 )
|
||||
|
||||
target_precompile_headers( utils PRIVATE <vulkan/vulkan.hpp> )
|
||||
|
@ -15,7 +15,7 @@
|
||||
|
||||
#include "shaders.hpp"
|
||||
|
||||
#include "SPIRV/GlslangToSpv.h"
|
||||
#include "glslang/SPIRV/GlslangToSpv.h"
|
||||
#include "glslang/Public/ResourceLimits.h"
|
||||
#include "glslang/Public/ShaderLang.h"
|
||||
|
||||
|
@ -19,7 +19,7 @@
|
||||
#include "../../samples/utils/geometries.hpp"
|
||||
#include "../../samples/utils/shaders.hpp"
|
||||
#include "../../samples/utils/utils.hpp"
|
||||
#include "SPIRV/GlslangToSpv.h"
|
||||
#include "glslang/SPIRV/GlslangToSpv.h"
|
||||
#include "glslang/Public/ShaderLang.h"
|
||||
|
||||
#include <iostream>
|
||||
|
Loading…
x
Reference in New Issue
Block a user