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

upload CI builds of releases #275

Merged
merged 5 commits into from
Jan 13, 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
15 changes: 8 additions & 7 deletions .github/actions/configure_and_build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ inputs:
description: "Operating system"
required: true
shell:
description: "Operating system"
description: "Native shell to use for job steps"
required: true
runs:
using: "composite"
Expand All @@ -23,16 +23,17 @@ runs:
shell: ${{ inputs.shell }}
run: >
cmake -LA -B ${{ inputs.workspace }}/build
-DCMAKE_BUILD_TYPE=${{ inputs.config }}
-DCMAKE_INSTALL_PREFIX=${{ inputs.workspace }}/build/install
-DBUILD_SHARED_LIBS=ON
-DBUILD_CTS=${{ inputs.os != 'ubuntu-20.04' }}
-DBUILD_EXAMPLES=ON
-DBUILD_HDANARI=OFF
-DBUILD_HELIDE_DEVICE=ON
-DBUILD_REMOTE_DEVICE=${{ inputs.os == 'ubuntu-latest' }}
-DBUILD_REMOTE_DEVICE=${{ inputs.os == 'ubuntu-20.04' }}
-DBUILD_TESTING=ON
-DBUILD_VIEWER=OFF
-DCMAKE_BUILD_TYPE=${{ inputs.config }}
-DCMAKE_INSTALL_PREFIX=${{ inputs.workspace }}/build/install
-DCTS_ENABLE_GLTF=OFF
-DINSTALL_CTS=ON

- name: Build
shell: ${{ inputs.shell }}
Expand All @@ -45,10 +46,10 @@ runs:

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

- name: Tutorial Tests
shell: ${{ inputs.shell }}
working-directory: ${{inputs.workspace}}/build
working-directory: ${{ inputs.workspace }}/build
run: ctest -R anariTutorial -C ${{ inputs.config }}
19 changes: 19 additions & 0 deletions .github/workflows/anari_sdk_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ jobs:
config: Debug
steps:
- name: Install Packages
if: ${{ matrix.os == 'ubuntu-20.04' }}
run: sudo apt install -y libboost-system-dev libpython3-dev
- name: Check out code
uses: actions/checkout@v4
Expand All @@ -34,6 +35,12 @@ jobs:
config: ${{ matrix.config }}
os: ${{ matrix.os }}
shell: bash
- name: Upload install
if: ${{ matrix.config == 'Release' && matrix.os == 'ubuntu-20.04' }}
uses: actions/upload-artifact@v4
with:
name: ANARI-SDK_ubuntu-20.04
path: ${{ github.workspace }}/build/install

build-windows:
runs-on: ${{ matrix.os }}
Expand All @@ -51,6 +58,12 @@ jobs:
config: ${{ matrix.config }}
os: ${{ matrix.os }}
shell: pwsh
- name: Upload install
if: ${{ matrix.config == 'Release' }}
uses: actions/upload-artifact@v4
with:
name: ANARI-SDK_windows
path: ${{ github.workspace }}/build/install

build-macos:
# iOS is 10x expensive to run on GitHub machines, so only run if we know something else passed as well
Expand All @@ -70,3 +83,9 @@ jobs:
config: ${{ matrix.config }}
os: ${{ matrix.os }}
shell: bash
- name: Upload install
if: ${{ matrix.config == 'Release' }}
uses: actions/upload-artifact@v4
with:
name: ANARI-SDK_macos
path: ${{ github.workspace }}/build/install
24 changes: 7 additions & 17 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -54,31 +54,26 @@ elseif(UNIX)
list(APPEND CMAKE_INSTALL_RPATH "$ORIGIN/../${CMAKE_INSTALL_LIBDIR}")
endif()

# Built-in CMake options
option(BUILD_SHARED_LIBS "Build shared libraries instead of static" ON)
## Built-in CMake options ##

option(BUILD_TESTING "Build tests for CTest" ON)
# ANARI specific options
option(BUILD_SHARED_LIBS "Build shared libraries instead of static" ON)

## ANARI specific options ##

option(BUILD_CTS "Build cts toolkit" OFF)
cmake_dependent_option(CTS_ENABLE_GLTF "Enable glTF support for cts" ON "BUILD_CTS" OFF)
option(USE_DRACO "Use draco when loading glTF files" OFF)
option(USE_WEBP "Use webp when loading glTF files" OFF)
option(USE_KTX "Use ktx when loading glTF files" OFF)

if (CTS_ENABLE_GLTF)
# To enforce WEBP, KTX and DRACO support (CI does not have these dependecies)
# set(USE_KTX ON)
# set(USE_WEBP ON)
# set(USE_DRACO ON)
endif()

option(BUILD_EXAMPLES "Build example applications and example device" ON)
cmake_dependent_option(BUILD_VIEWER
"Build interactive viewer app (requires GLFW)"
OFF
"BUILD_EXAMPLES"
OFF
)
option(INSTALL_CTS "Install CTS scripts and data" OFF)
option(INSTALL_VIEWER_LIBRARY "Install anari::anari_viewer library target" ON)
option(INSTALL_VIEWER "Install anariViewer app" OFF)
mark_as_advanced(INSTALL_VIEWER)
Expand All @@ -88,19 +83,14 @@ cmake_dependent_option(VIEWER_ENABLE_GLTF
"BUILD_VIEWER"
OFF
)
if (VIEWER_ENABLE_GLTF)
# To enforce WEBP and DRACO support (CI does not have these dependecies)
# set(USE_WEBP ON)
# set(USE_DRACO ON)
endif()
cmake_dependent_option(VIEWER_ENABLE_KTX
"Enable KTX support in viewer"
OFF
"BUILD_VIEWER"
OFF
)
if (VIEWER_ENABLE_KTX)
set(USE_KTX ON)
set(USE_KTX ON)
endif()

## The generate_all targets collects all offline code generation targets
Expand Down
76 changes: 41 additions & 35 deletions cts/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ add_dependencies(generate_all generate_cts)

option(CTS_DEV "Copy compiled python module next to python script to make developing easier" OFF)
mark_as_advanced(CTS_DEV)
if (CTS_DEV AND NOT BUILD_SHARED_LIBS)
if (CTS_DEV)
add_custom_command(TARGET ${PROJECT_NAME}
COMMAND ${CMAKE_COMMAND}
-DBUILD_CONFIG_DIR=${CMAKE_CFG_INTDIR}
Expand All @@ -77,44 +77,50 @@ if (CTS_DEV AND NOT BUILD_SHARED_LIBS)
)
endif()

anari_sdk_fetch_project(
NAME anari_cts_glTFSampleAssets
URL https://github.com/KhronosGroup/glTF-Sample-Assets/archive/754a32a333b27698b6c36d8bec8ff7ed5f729538.zip
MD5 1250786407d1d0e649faaade748c24ab
)
if (CTS_ENABLE_GLTF)
anari_sdk_fetch_project(
NAME anari_cts_glTFSampleAssets
URL https://github.com/KhronosGroup/glTF-Sample-Assets/archive/754a32a333b27698b6c36d8bec8ff7ed5f729538.zip
MD5 1250786407d1d0e649faaade748c24ab
)

message("Copying glTF Sample Models")
file(GLOB GLTF_SAMPLE_ASSETS_FILES ${anari_cts_glTFSampleAssets_LOCATION}/Models/*)
list(FILTER GLTF_SAMPLE_ASSETS_FILES EXCLUDE REGEX ".*Unicode❤♻Test")
file(COPY ${GLTF_SAMPLE_ASSETS_FILES} DESTINATION ${CMAKE_CURRENT_LIST_DIR}/gltf-Sample-Assets)
message("Copying glTF Sample Models")
file(GLOB GLTF_SAMPLE_ASSETS_FILES ${anari_cts_glTFSampleAssets_LOCATION}/Models/*)
list(FILTER GLTF_SAMPLE_ASSETS_FILES EXCLUDE REGEX ".*Unicode❤♻Test")
file(COPY ${GLTF_SAMPLE_ASSETS_FILES} DESTINATION ${CMAKE_CURRENT_LIST_DIR}/gltf-Sample-Assets)
endif()

## Installation ##

# .pyd files are considered library files
if (WIN32)
install(TARGETS ${PROJECT_NAME}
LIBRARY DESTINATION ${CMAKE_INSTALL_BINDIR}
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
if (INSTALL_CTS)
# .pyd files are considered library files
if (WIN32)
install(TARGETS ${PROJECT_NAME}
LIBRARY DESTINATION ${CMAKE_INSTALL_BINDIR}
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
)
else()
install(TARGETS ${PROJECT_NAME}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
)
endif()

install(FILES ${python_files} ${CMAKE_CURRENT_LIST_DIR}/default_test_scene.json
${CMAKE_CURRENT_LIST_DIR}/pyproject.toml
${CMAKE_CURRENT_LIST_DIR}/poetry.lock
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/anari/cts
)
else()
install(TARGETS ${PROJECT_NAME}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
)
endif()

install(FILES ${python_files} ${CMAKE_CURRENT_LIST_DIR}/default_test_scene.json
${CMAKE_CURRENT_LIST_DIR}/pyproject.toml
${CMAKE_CURRENT_LIST_DIR}/poetry.lock
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/anari/cts
)

install(DIRECTORY ${CMAKE_CURRENT_LIST_DIR}/test_scenes
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/anari/cts
)
install(DIRECTORY ${CMAKE_CURRENT_LIST_DIR}/test_scenes
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/anari/cts
)

install(DIRECTORY ${CMAKE_CURRENT_LIST_DIR}/gltf-Sample-Assets
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/anari/cts
)
if (CTS_ENABLE_GLTF)
install(DIRECTORY ${CMAKE_CURRENT_LIST_DIR}/gltf-Sample-Assets
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/anari/cts
)
endif()
endif()
8 changes: 0 additions & 8 deletions examples/empty_helium_device/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,3 @@ anari_generate_queries(
CPP_NAMESPACE hecore
JSON_DEFINITIONS_FILE ${CMAKE_CURRENT_SOURCE_DIR}/HeCoreDefinitions.json
)

## Installation ##

install(TARGETS ${PROJECT_NAME}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
)