Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions .github/workflows/unittests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Rendering tests

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]

jobs:
build-and-test:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Install dependencies
run: |
sudo apt-get update
# Installs user-requested libs + software rasterizer (mesa-vulkan-drivers) for headless CI
sudo apt-get install -y g++ make cmake git wayland-protocols libwayland-dev libxkbcommon-dev libx11-dev libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev libvulkan-dev vulkan-utility-libraries-dev mesa-vulkan-drivers

- name: Configure CMake
# -B build creates the build folder
# -DBUILD_TESTING=ON enables your CMake if-block
run: cmake -B build -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=ON

- name: Build
run: cmake --build build

- name: Run Tests
working-directory: build/
# --output-on-failure prints the error log if a test fails
run: ctest --output-on-failure
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,3 @@ debug/
printsource.py
gccbuild/
android/
*.png
6 changes: 6 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,7 @@ endif()

if(SUPPORT_VULKAN_BACKEND)
set(WGVK_BUILD_WGSL_SUPPORT ${SUPPORT_WGSL_PARSER})
set(WGVK_BUILD_GLSL_SUPPORT ${SUPPORT_GLSL_PARSER})

if(NOT EXISTS "${CMAKE_CURRENT_LIST_DIR}/../WGVK")
FetchContent_Declare(
Expand Down Expand Up @@ -389,6 +390,7 @@ if(SUPPORT_RGFW)
endif()
if(SUPPORT_GLSL_PARSER)
target_compile_definitions(${raygpu_core_library_name} PUBLIC SUPPORT_GLSL_PARSER=1)
set(WGVK_BUILD_GLSL_SUPPORT ON CACHE BOOL "" FORCE)
endif()
if(SUPPORT_WGSL_PARSER)
if(EMSCRIPTEN)
Expand Down Expand Up @@ -622,6 +624,10 @@ endif()


add_subdirectory("examples")
if(BUILD_TESTING)
enable_testing()
add_subdirectory(tests)
endif()
if(RAYGPU_GENERATE_PYTHON_BINDINGS)
set(PYBIND11_FINDPYTHON ON)
find_package(pybind11 CONFIG QUIET)
Expand Down
Loading