Skip to content

Commit b752661

Browse files
committed
Switch Vulkan SDK installation to tarball method on Linux and refine dependency setups across platforms
Replaced package-based Vulkan SDK installation on Linux with tar.gz method for better compatibility and control. Updated environment variable configurations on Windows. Refined macOS process by sourcing `tinyobjloader` from GitHub due to unavailability on brew. Added `libyaml-cpp0.7` to Linux dependencies.
1 parent ea02373 commit b752661

File tree

1 file changed

+27
-10
lines changed

1 file changed

+27
-10
lines changed

.github/workflows/workflow.yml

Lines changed: 27 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,25 @@ jobs:
1515
include:
1616
- os: ubuntu-latest
1717
vulkan-install: |
18-
wget -qO - https://packages.lunarg.com/lunarg-signing-key-pub.asc | sudo apt-key add -
19-
sudo wget -qO /etc/apt/sources.list.d/lunarg-vulkan-jammy.list https://packages.lunarg.com/vulkan/lunarg-vulkan-jammy.list
20-
sudo apt-get update
21-
sudo apt-get install -y vulkan-sdk
18+
# Download and install Vulkan SDK using the tar.gz method
19+
VULKAN_VERSION=$(curl -s https://vulkan.lunarg.com/sdk/latest/linux.txt)
20+
curl -O https://sdk.lunarg.com/sdk/download/$VULKAN_VERSION/linux/vulkansdk-linux-x86_64-$VULKAN_VERSION.tar.gz
21+
tar xf vulkansdk-linux-x86_64-$VULKAN_VERSION.tar.gz
22+
cd $VULKAN_VERSION
23+
./vulkansdk
24+
# Set up environment variables
25+
echo "VULKAN_SDK=$PWD/$VULKAN_VERSION/x86_64" >> $GITHUB_ENV
26+
echo "PATH=$PWD/$VULKAN_VERSION/x86_64/bin:$PATH" >> $GITHUB_ENV
27+
echo "LD_LIBRARY_PATH=$PWD/$VULKAN_VERSION/x86_64/lib:$LD_LIBRARY_PATH" >> $GITHUB_ENV
28+
echo "VK_LAYER_PATH=$PWD/$VULKAN_VERSION/x86_64/etc/vulkan/explicit_layer.d" >> $GITHUB_ENV
2229
deps-install: |
2330
sudo apt-get update
2431
sudo apt-get install -y \
25-
libglfw3-dev \
26-
libglm-dev \
27-
libtinyobjloader-dev \
28-
libstb-dev
32+
libglfw3-dev \
33+
libglm-dev \
34+
libtinyobjloader-dev \
35+
libstb-dev \
36+
libyaml-cpp0.7
2937
test-cmd: |
3038
# Check if some of the expected executables were built
3139
if [ -f "00_base_code/00_base_code" ]; then
@@ -52,7 +60,10 @@ jobs:
5260
vulkan-install: |
5361
Invoke-WebRequest -Uri "https://sdk.lunarg.com/sdk/download/latest/windows/vulkan-sdk.exe" -OutFile "$env:TEMP\vulkan-sdk.exe"
5462
Start-Process -FilePath "$env:TEMP\vulkan-sdk.exe" -ArgumentList "--accept-licenses --default-answer --confirm-command install" -Wait
55-
echo "VULKAN_SDK=$env:VULKAN_SDK" >> $env:GITHUB_ENV
63+
# Add these environment variables
64+
echo "VULKAN_SDK=C:\VulkanSDK\latest" >> $env:GITHUB_ENV
65+
echo "VULKAN_INCLUDE_DIR=C:\VulkanSDK\latest\Include" >> $env:GITHUB_ENV
66+
echo "VULKAN_LIBRARY=C:\VulkanSDK\latest\Lib\vulkan-1.lib" >> $env:GITHUB_ENV
5667
deps-install: |
5768
vcpkg install glfw3:x64-windows glm:x64-windows tinyobjloader:x64-windows stb:x64-windows
5869
echo "CMAKE_TOOLCHAIN_FILE=$env:VCPKG_INSTALLATION_ROOT/scripts/buildsystems/vcpkg.cmake" >> $env:GITHUB_ENV
@@ -86,7 +97,13 @@ jobs:
8697
sudo /Volumes/vulkansdk/InstallVulkan.app/Contents/MacOS/InstallVulkan --accept-licenses --default-answer --confirm-command install
8798
hdiutil detach /Volumes/vulkansdk
8899
deps-install: |
89-
brew install glfw glm tinyobjloader stb
100+
brew install glfw glm stb
101+
# Install tinyobjloader from source since it's not available in brew
102+
git clone https://github.com/tinyobjloader/tinyobjloader.git
103+
cd tinyobjloader
104+
cmake -B build -DCMAKE_BUILD_TYPE=Release
105+
cmake --build build --config Release
106+
sudo cmake --install build
90107
test-cmd: |
91108
# Check if some of the expected executables were built
92109
if [ -f "00_base_code/00_base_code" ]; then

0 commit comments

Comments
 (0)