Skip to content

Commit d446322

Browse files
committed
Streamline dependency installation
- Replace redundant dependency installation commands in GitHub workflows with cross-platform scripts for Linux and Windows. - Suppress error messages in `FindKTX.cmake` and `FindTinyGLTF.cmake` to allow fallbacks, improving build resilience.
1 parent 705cda6 commit d446322

File tree

3 files changed

+7
-8
lines changed

3 files changed

+7
-8
lines changed

.github/workflows/workflow.yml

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,9 @@ jobs:
3838
# Return to the original directory
3939
cd ..
4040
deps-install: |
41-
# GitHub runners already have cmake, ninja-build, and clang installed
42-
sudo apt-get update
43-
sudo apt-get install -y \
44-
libglfw3-dev \
45-
libglm-dev \
46-
libtinyobjloader-dev \
47-
libstb-dev
41+
# Use our existing dependency installation script
42+
chmod +x scripts/install_dependencies_linux.sh
43+
./scripts/install_dependencies_linux.sh
4844
test-cmd: |
4945
# Check if some of the expected executables were built
5046
if [ -f "00_base_code/00_base_code" ]; then
@@ -102,7 +98,8 @@ jobs:
10298
Write-Host "Include directory does not exist"
10399
}
104100
deps-install: |
105-
vcpkg install glfw3:x64-windows glm:x64-windows tinyobjloader:x64-windows stb:x64-windows
101+
# Use our existing dependency installation script
102+
.\scripts\install_dependencies_windows.bat
106103
echo "CMAKE_TOOLCHAIN_FILE=$env:VCPKG_INSTALLATION_ROOT/scripts/buildsystems/vcpkg.cmake" >> $env:GITHUB_ENV
107104
test-cmd: |
108105
# Check if some of the expected executables were built

attachments/CMake/FindKTX.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ else()
5454
include(FindPackageHandleStandardArgs)
5555
find_package_handle_standard_args(KTX
5656
REQUIRED_VARS KTX_INCLUDE_DIR KTX_LIBRARY
57+
FAIL_MESSAGE "" # Suppress the error message to allow our fallback
5758
)
5859

5960
# Debug output if KTX is not found (only on non-Linux platforms)

attachments/CMake/FindTinyGLTF.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ find_path(TinyGLTF_INCLUDE_DIR
3434
include(FindPackageHandleStandardArgs)
3535
find_package_handle_standard_args(TinyGLTF
3636
REQUIRED_VARS TinyGLTF_INCLUDE_DIR
37+
FAIL_MESSAGE "" # Suppress the error message to allow our fallback
3738
)
3839

3940
if(TinyGLTF_FOUND)

0 commit comments

Comments
 (0)