This action automatically downloads and installs the Vulkan SDK development environment.
- name: Install Vulkan SDK
uses: technoir-lab/install-vulkan-sdk@v1.4.1
with:
version: 1.4.363.0
components: com.lunarg.vulkan.volk # Defaults to com.lunarg.vulkan.core
cache: trueParameters:
- version (optional; default=latest):
N.N.N.Nstyle Vulkan SDK release number (orlatestto use most recent official release). - components (optional; default=
com.lunarg.vulkan.core): space-separated list of component ids to install, e.g.com.lunarg.vulkan.core com.lunarg.vulkan.vma;com.lunarg.vulkan.coreis always installed. On macOS and Windows only the listed components are installed (by default: core only). Component ids that are not available on the runner's OS are skipped. The Linux SDK is a single archive, so it always installs the full SDK. - cache (optional; default=false): boolean indicating whether to cache the downloaded installer file between builds. The cache key includes the resolved component list, so different component sets use separate cache entries.
- quiet (optional; default=false): when using
latestan Annotation is added to builds with actual SDK number; setquiet: trueto silence.
Know working SDK version for windows/mac/linux:
- 1.4.363.0
| ID | OS | Description |
|---|---|---|
| com.lunarg.vulkan.core | All | The Vulkan SDK core (always installed): Vulkan Loader, layers, VkConfig, and essential shader development tools. |
| com.lunarg.vulkan.ios | macOS | Development libraries for iOS. |
| com.lunarg.vulkan.kosmic | macOS | KosmicKrisp (Vulkan on Metal) technical preview. |
| com.lunarg.vulkan.usr | macOS | System-wide installation of ICDs, layers, and SDK tools to /usr/local. |
| com.lunarg.vulkan.vma | macOS/Windows | Vulkan Memory Allocator header. |
| com.lunarg.vulkan.volk | macOS/Windows | Volk header, source, and library. |
| com.lunarg.vulkan.glm | macOS/Windows | GLM headers. |
| com.lunarg.vulkan.sdl2 | macOS/Windows | SDL2 and SDL3 libraries and headers. |
| com.lunarg.vulkan.x64 | Windows | X64 binaries for cross compiling. |
| com.lunarg.vulkan.arm64 | Windows | ARM64 binaries for cross compiling. |
| com.lunarg.vulkan.debug | Windows | Shader toolchain debug symbols (64-bit). |
On macOS the action runs the SDK installer as the current user. com.lunarg.vulkan.usr is the exception: it installs files outside the SDK
directory, so the action runs the installer with sudo and then hands the installed SDK over to the current user.
The action sources the SDK's own environment setup script on macOS and Linux, then exports the resulting variables for every later job step:
- macOS:
<VULKAN_SDK_DIR>/setup-env.sh - Linux:
<VULKAN_SDK_DIR>/<version>/setup-env.sh - Windows: the SDK provides no
setup-env.sh(the installer sets environment variables itself), so the action sets the equivalent variables directly.
Exported variables:
VULKAN_SDK(standard variable used by cmake and other build tools; on macOS this points at the installedmacOSsubdirectory, and on Linux at the installed<version>/x86_64subdirectory)VULKAN_SDK_VERSIONVULKAN_SDK_PLATFORMPATHis extended to includeVULKAN_SDK/bin(so SDK tools likeglslangValidatorcan be used directly)C_INCLUDE_PATH(set to$VULKAN_SDK/include, or$VULKAN_SDK/Includeon Windows) so C/C++ compilers find the SDK headers without extra-IflagsLIBRARY_PATH(set to$VULKAN_SDK/lib, or$VULKAN_SDK/Libon Windows) so linkers find the SDK libraries without extra-LflagsLD_LIBRARY_PATH(Linux; fromsetup-env.sh, set to$VULKAN_SDK/lib/VulkanLoader/libby default) so dynamically linked SDK libraries (e.g. the Vulkan loader) are found at run time without extra rpath flagsDYLD_LIBRARY_PATH(macOS; fromsetup-env.sh, set to$VULKAN_SDK/lib) so dynamically linked SDK libraries (e.g. the Vulkan loader) are found at run time without extra rpath flagsVK_ADD_LAYER_PATH(macOS/Linux; fromsetup-env.sh) so SDK layers are foundVK_ICD_FILENAMES(macOS; fromsetup-env.sh) so MoltenVK is foundVK_DRIVER_FILES(macOS; fromsetup-env.sh) so MoltenVK is foundPKG_CONFIG_PATH(macOS/Linux; fromsetup-env.sh) so SDK.pcfiles are foundCMAKE_PREFIX_PATH(Linux; fromsetup-env.sh) so CMake configs are found
Any pre-existing C_INCLUDE_PATH/LIBRARY_PATH/LD_LIBRARY_PATH/DYLD_LIBRARY_PATH
values are preserved. On macOS/Linux setup-env.sh also preserves pre-existing
PATH/PKG_CONFIG_PATH/VK_ADD_LAYER_PATH values; the SDK directories are
prepended (or appended for PATH on macOS).
Please be aware that Vulkan SDKs can use a lot of disk space; up to 2.4GB depending on the OS and components installed.