-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add basic TSD GitHub CI, add options to disable various features
- Loading branch information
1 parent
304ba3a
commit 2d12a9c
Showing
11 changed files
with
240 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
name: TSD CI | ||
|
||
on: | ||
push: | ||
branches: [ next_release ] | ||
pull_request: | ||
branches: [ main, next_release ] | ||
|
||
jobs: | ||
build: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, windows-latest] | ||
config: [Release, Debug] | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Install Packages | ||
if: ${{ matrix.os == 'ubuntu-latest' }} | ||
run: sudo apt install -y libtbb-dev | ||
|
||
- name: Configure ANARI-SDK CMake | ||
run: > | ||
cmake -LA -B ${{github.workspace}}/deps_build | ||
-DCMAKE_INSTALL_PREFIX=${{github.workspace}}/deps | ||
${{github.workspace}}/tsd/cmake/build_deps | ||
- name: Build + install ANARI-SDK | ||
run: cmake --build ${{github.workspace}}/deps_build --config ${{ matrix.config }} | ||
|
||
- name: Configure TSD CMake | ||
run: > | ||
cmake -LA -B ${{github.workspace}}/build | ||
-DBUILD_APPS_INTERACTIVE=OFF | ||
-DCMAKE_PREFIX_PATH=${{github.workspace}}/deps | ||
-DCMAKE_BUILD_TYPE=${{ matrix.config }} | ||
-DTSD_USE_ASSIMP=OFF | ||
-DTSD_USE_CUDA=OFF | ||
-DTSD_USE_HDF5=OFF | ||
-DTSD_USE_OPENGL=OFF | ||
-DTSD_ENABLE_SERIALIZATION=OFF | ||
${{github.workspace}}/tsd | ||
- name: Build | ||
run: cmake --build ${{github.workspace}}/build --config ${{ matrix.config }} | ||
|
||
- name: Unit Tests | ||
working-directory: ${{github.workspace}}/build | ||
run: ctest -C ${{ matrix.config }} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
## Copyright 2024 NVIDIA Corporation | ||
## SPDX-License-Identifier: Apache-2.0 | ||
|
||
add_subdirectory(interactive) | ||
if (BUILD_APPS_INTERACTIVE) | ||
add_subdirectory(interactive) | ||
endif() | ||
add_subdirectory(simple) | ||
add_subdirectory(tools) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
# Copyright (c) 2019-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. | ||
# SPDX-License-Identifier: BSD-3-Clause | ||
# | ||
# Redistribution and use in source and binary forms, with or without | ||
# modification, are permitted provided that the following conditions are met: | ||
# | ||
# 1. Redistributions of source code must retain the above copyright notice, | ||
# this list of conditions and the following disclaimer. | ||
# | ||
# 2. Redistributions in binary form must reproduce the above copyright notice, | ||
# this list of conditions and the following disclaimer in the documentation | ||
# and/or other materials provided with the distribution. | ||
# | ||
# 3. Neither the name of the copyright holder nor the names of its | ||
# contributors may be used to endorse or promote products derived from | ||
# this software without specific prior written permission. | ||
# | ||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE | ||
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | ||
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | ||
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | ||
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | ||
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||
# POSSIBILITY OF SUCH DAMAGE. | ||
|
||
cmake_minimum_required(VERSION 3.12) | ||
|
||
if(NOT CMAKE_INSTALL_PREFIX) | ||
set(CMAKE_INSTALL_PREFIX | ||
"${CMAKE_BINARY_DIR}/install" | ||
CACHE STRING "Final install location." FORCE) | ||
endif() | ||
|
||
project(tsd_dependencies) | ||
|
||
include(superbuild_macros.cmake) | ||
|
||
## Build projects ## | ||
|
||
build_subproject( | ||
NAME anari-sdk | ||
URL "https://github.com/KhronosGroup/ANARI-SDK/archive/refs/heads/next_release.zip" | ||
BUILD_ARGS | ||
-DBUILD_EXAMPLES=OFF | ||
-DBUILD_HDANARI=OFF | ||
-DBUILD_HELIDE_DEVICE=OFF | ||
-DBUILD_REMOTE_DEVICE=OFF | ||
-DBUILD_TESTING=OFF | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,110 @@ | ||
# Copyright (c) 2019-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. | ||
# SPDX-License-Identifier: BSD-3-Clause | ||
# | ||
# Redistribution and use in source and binary forms, with or without | ||
# modification, are permitted provided that the following conditions are met: | ||
# | ||
# 1. Redistributions of source code must retain the above copyright notice, | ||
# this list of conditions and the following disclaimer. | ||
# | ||
# 2. Redistributions in binary form must reproduce the above copyright notice, | ||
# this list of conditions and the following disclaimer in the documentation | ||
# and/or other materials provided with the distribution. | ||
# | ||
# 3. Neither the name of the copyright holder nor the names of its | ||
# contributors may be used to endorse or promote products derived from | ||
# this software without specific prior written permission. | ||
# | ||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE | ||
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | ||
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | ||
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | ||
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | ||
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||
# POSSIBILITY OF SUCH DAMAGE. | ||
|
||
## Included CMake modules ## | ||
|
||
include(ExternalProject) | ||
include(GNUInstallDirs) | ||
include(ProcessorCount) | ||
|
||
## Variables ## | ||
|
||
ProcessorCount(PROCESSOR_COUNT) | ||
set(NUM_BUILD_JOBS ${PROCESSOR_COUNT} CACHE STRING "Number of build jobs '-j <n>'") | ||
set(DEFAULT_BUILD_COMMAND cmake --build . --config release -j ${NUM_BUILD_JOBS}) | ||
get_filename_component(INSTALL_DIR_ABSOLUTE | ||
${CMAKE_INSTALL_PREFIX} ABSOLUTE BASE_DIR ${CMAKE_CURRENT_BINARY_DIR}) | ||
|
||
## Functions/macros ## | ||
|
||
function(print) | ||
foreach(arg ${ARGN}) | ||
message("${arg} = ${${arg}}") | ||
endforeach() | ||
endfunction() | ||
|
||
macro(append_cmake_prefix_path) | ||
list(APPEND CMAKE_PREFIX_PATH ${ARGN}) | ||
string(REPLACE ";" "|" CMAKE_PREFIX_PATH "${CMAKE_PREFIX_PATH}") | ||
endmacro() | ||
|
||
macro(setup_subproject_path_vars _NAME) | ||
set(SUBPROJECT_NAME ${_NAME}) | ||
|
||
set(SUBPROJECT_INSTALL_PATH ${INSTALL_DIR_ABSOLUTE}) | ||
|
||
set(SUBPROJECT_SOURCE_PATH ${SUBPROJECT_NAME}/source) | ||
set(SUBPROJECT_STAMP_PATH ${SUBPROJECT_NAME}/stamp) | ||
set(SUBPROJECT_BUILD_PATH ${SUBPROJECT_NAME}/build) | ||
endmacro() | ||
|
||
macro(build_subproject) | ||
# See cmake_parse_arguments docs to see how args get parsed here: | ||
# https://cmake.org/cmake/help/latest/command/cmake_parse_arguments.html | ||
set(oneValueArgs NAME URL) | ||
set(multiValueArgs BUILD_ARGS DEPENDS_ON) | ||
cmake_parse_arguments(BUILD_SUBPROJECT "" "${oneValueArgs}" | ||
"${multiValueArgs}" ${ARGN}) | ||
|
||
# Setup SUBPROJECT_* variables (containing paths) for this function | ||
setup_subproject_path_vars(${BUILD_SUBPROJECT_NAME}) | ||
|
||
# Build the actual subproject | ||
ExternalProject_Add(${SUBPROJECT_NAME} | ||
PREFIX ${SUBPROJECT_NAME} | ||
DOWNLOAD_DIR ${SUBPROJECT_NAME} | ||
STAMP_DIR ${SUBPROJECT_STAMP_PATH} | ||
SOURCE_DIR ${SUBPROJECT_SOURCE_PATH} | ||
BINARY_DIR ${SUBPROJECT_BUILD_PATH} | ||
URL ${BUILD_SUBPROJECT_URL} | ||
LIST_SEPARATOR | # Use the alternate list separator | ||
CMAKE_ARGS | ||
-DCMAKE_BUILD_TYPE=Release | ||
-DCMAKE_C_COMPILER=${CMAKE_C_COMPILER} | ||
-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} | ||
-DCMAKE_INSTALL_PREFIX:PATH=${SUBPROJECT_INSTALL_PATH} | ||
-DCMAKE_INSTALL_INCLUDEDIR=${CMAKE_INSTALL_INCLUDEDIR} | ||
-DCMAKE_INSTALL_LIBDIR=${CMAKE_INSTALL_LIBDIR} | ||
-DCMAKE_INSTALL_DOCDIR=${CMAKE_INSTALL_DOCDIR} | ||
-DCMAKE_INSTALL_BINDIR=${CMAKE_INSTALL_BINDIR} | ||
-DCMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH} | ||
${BUILD_SUBPROJECT_BUILD_ARGS} | ||
BUILD_COMMAND ${DEFAULT_BUILD_COMMAND} | ||
BUILD_ALWAYS OFF | ||
) | ||
|
||
if(BUILD_SUBPROJECT_DEPENDS_ON) | ||
ExternalProject_Add_StepDependencies(${SUBPROJECT_NAME} | ||
configure ${BUILD_SUBPROJECT_DEPENDS_ON} | ||
) | ||
endif() | ||
|
||
# Place installed component on CMAKE_PREFIX_PATH for downstream consumption | ||
append_cmake_prefix_path(${SUBPROJECT_INSTALL_PATH}) | ||
endmacro() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters