Skip to content

Commit

Permalink
Update Vulkan installation mechanism for Ubuntu
Browse files Browse the repository at this point in the history
The GitHub runners are failing from the action being used due to some
implicit function call being expected. Ultimately this should be
unnecessary though, since there's no reason to be compiling Vulkan
since we can just download it.

This updates the logic to download it instead.
  • Loading branch information
bitwizeshift committed Sep 27, 2024
1 parent c04c442 commit c66359f
Showing 1 changed file with 22 additions and 10 deletions.
32 changes: 22 additions & 10 deletions .github/actions/prepare-runner/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,27 +71,39 @@ runs:
shell: bash
if: runner.os == 'Linux'
run: |
sudo apt-get update -y
sudo apt-get install -y -qq \
libgtk-3-dev
# Vulkan

- name: Install Vulkan SDK
uses: bitwizeshift/setup-vulkan-sdk@v2
if: runner.os == 'Linux' || runner.os == 'Windows'
with:
vulkan-query-version: 1.3.204.0
vulkan-components: Vulkan-Headers, Vulkan-Loader
vulkan-use-cache: true

- name: Cache vulkan-sdk.dmg
uses: actions/cache@v4
if: runner.os == 'macOS'
id: download-vulkan
with:
path: vulkan-sdk.dmg
key: vulkan-sdk
key: vulkan-sdk-${{ runner.os }}

- name: Create Temp Directory
shell: bash
id: dir
run: |
path="${{ runner.temp }}/vulkan-sdk"
mkdir -p "${path}"
echo path="${path}" >> "${GITHUB_OUTPUT}"
- name: Install Vulkan SDK
if: runner.os == 'Linux'
shell: bash
working-directory: "${{ steps.dir.outputs.path }}"
run: |
wget https://sdk.lunarg.com/sdk/download/latest/linux/vulkan-sdk.tar.xz
tar -xf vulkan-sdk.tar.xz
root=$(dirname "$(find . -type d -name "bin")")
echo VULKAN_SDK="${root}" >> "${GITHUB_ENV}"
echo LD_LIBRARY_PATH="${root}/lib:$LD_LIBRARY_PATH" >> "${GITHUB_ENV}"
echo VK_ADD_LAYER_PATH="${root}/share/vulkan/explicit_layer.d${VK_ADD_LAYER_PATH:+:$VK_ADD_LAYER_PATH}" >> "${GITHUB_ENV}"
echo "${root}/bin" >> "${GITHUB_PATH}"
- name: Download vulkan-sdk.dmg
shell: bash
Expand Down

0 comments on commit c66359f

Please sign in to comment.