Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use new query code generation CMake for CTS, build CTS in CI #271

Merged
merged 1 commit into from
Jan 8, 2025
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
23 changes: 12 additions & 11 deletions .github/workflows/anari_sdk_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,11 @@ jobs:

- name: Configure CMake
run: >
cmake -LA -B ${{github.workspace}}/build
cmake -LA -B ${{ github.workspace }}/build
-DCMAKE_BUILD_TYPE=${{ matrix.config }}
-DCMAKE_INSTALL_PREFIX=${{github.workspace}}/build/install
-DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/build/install
-DBUILD_SHARED_LIBS=ON
-DBUILD_CTS=ON
-DBUILD_EXAMPLES=ON
-DBUILD_HDANARI=OFF
-DBUILD_HELIDE_DEVICE=ON
Expand All @@ -41,7 +42,7 @@ jobs:
run: cmake --build ${{github.workspace}}/build --config ${{ matrix.config }} --target install

- name: Unit Tests
working-directory: ${{github.workspace}}/build
working-directory: ${{ github.workspace }}/build
run: ctest -R unit_test -C ${{ matrix.config }}

- name: Render Tests
Expand All @@ -51,7 +52,7 @@ jobs:
- name: Tutorial Tests
working-directory: ${{github.workspace}}/build
run: ctest -R anariTutorial -C ${{ matrix.config }}

build-macos:
# iOS is 10x expensive to run on GitHub machines, so only run if we know something else passed as well
needs: build
Expand All @@ -66,28 +67,28 @@ jobs:

- name: Configure CMake
run: >
cmake -LA -B ${{github.workspace}}/build
cmake -LA -B ${{ github.workspace }}/build
-DCMAKE_BUILD_TYPE=${{ matrix.config }}
-DCMAKE_INSTALL_PREFIX=${{github.workspace}}/build/install
-DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/build/install
-DBUILD_SHARED_LIBS=ON
-DBUILD_EXAMPLES=ON
-DBUILD_HDANARI=OFF
-DBUILD_HELIDE_DEVICE=ON
-DBUILD_REMOTE_DEVICE=${{ matrix.os == 'ubuntu-latest' }}
-DBUILD_REMOTE_DEVICE=OFF
-DBUILD_TESTING=ON
-DBUILD_VIEWER=OFF

- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{ matrix.config }} --target install
run: cmake --build ${{ github.workspace }}/build --config ${{ matrix.config }} --target install

- name: Unit Tests
working-directory: ${{github.workspace}}/build
working-directory: ${{ github.workspace }}/build
run: ctest -R unit_test -C ${{ matrix.config }}

- name: Render Tests
working-directory: ${{github.workspace}}/build
working-directory: ${{ github.workspace }}/build
run: ctest -R render_test -C ${{ matrix.config }}

- name: Tutorial Tests
working-directory: ${{github.workspace}}/build
working-directory: ${{ github.workspace }}/build
run: ctest -R anariTutorial -C ${{ matrix.config }}
11 changes: 7 additions & 4 deletions cts/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,19 @@ include(pybind11.cmake)
pybind11_add_module(${PROJECT_NAME}
src/anariInfo.cpp
src/anariWrapper.cpp
src/ctsQueries.cpp
src/main.cpp
src/PrimitiveGenerator.cpp
src/SceneGenerator.cpp
src/ColorPalette.cpp
src/TextureGenerator.cpp
)

anari_generate_queries(
DEVICE_TARGET ${PROJECT_NAME}
CPP_NAMESPACE cts
JSON_DEFINITIONS_FILE ${ANARI_CODE_GEN_ROOT}/devices/experimental_device.json
)

target_include_directories(${PROJECT_NAME}
PUBLIC
${CMAKE_CURRENT_LIST_DIR}/header
Expand All @@ -48,8 +53,6 @@ target_link_libraries(${PROJECT_NAME} PUBLIC helium anari_test_scenes)

file(GLOB python_files ${CMAKE_CURRENT_LIST_DIR}/*.py)

add_subdirectory(src) # query generation target

add_custom_target(generate_cts_baseline
COMMAND ${Python3_EXECUTABLE} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${CMAKE_CFG_INTDIR}/createReferenceData.py
--test_scenes ${CMAKE_CURRENT_LIST_DIR}/test_scenes -l ${REFERENCE_LIB}
Expand All @@ -58,7 +61,7 @@ add_custom_target(generate_cts_baseline
add_dependencies(generate_cts_baseline ${PROJECT_NAME})

add_custom_target(generate_cts)
add_dependencies(generate_cts generate_cts_queries generate_cts_baseline)
add_dependencies(generate_cts generate_cts_baseline)
add_dependencies(generate_all generate_cts)

option(CTS_DEV "Copy compiled python module next to python script to make developing easier" OFF)
Expand Down
9 changes: 0 additions & 9 deletions cts/src/CMakeLists.txt

This file was deleted.

2 changes: 1 addition & 1 deletion cts/src/anariWrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#include <anari/anari_cpp/ext/std.h>
#include <pybind11/pybind11.h>
#include <anari/anari_cpp.hpp>
#include "ctsQueries.h"
#include "anariCTSBackend_queries.h"

typedef union ANARIExtensions_u
{
Expand Down
14,093 changes: 0 additions & 14,093 deletions cts/src/ctsQueries.cpp

This file was deleted.

29 changes: 0 additions & 29 deletions cts/src/ctsQueries.h

This file was deleted.

Loading