Merge pull request #1673 from Idclip/stencil_minmax #1614
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
name: NanoVDB | |
on: | |
push: | |
branches: | |
- 'master' | |
- 'feature/**' | |
- 'pr/**' | |
paths-ignore: | |
- 'CHANGES' | |
- 'CODEOWNERS' | |
- 'doc/**' | |
- 'openvdb_ax/**' | |
- 'openvdb_maya/**' | |
- 'openvdb_houdini/**' | |
- 'pendingchanges/**' | |
- '**.md' | |
pull_request: | |
branches: | |
- '**' | |
paths-ignore: | |
- 'CHANGES' | |
- 'CODEOWNERS' | |
- 'doc/**' | |
- 'openvdb_ax/**' | |
- 'openvdb_maya/**' | |
- 'openvdb_houdini/**' | |
- 'pendingchanges/**' | |
- '**.md' | |
schedule: | |
# run this workflow every day 7am UTC | |
- cron: '0 7 * * *' | |
workflow_dispatch: | |
inputs: | |
type: | |
description: 'The type of CI to run (all, linux, win, mac)' | |
required: true | |
default: 'all' | |
# Allow subsequent pushes to the same PR or REF to cancel any previous jobs. | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: true | |
jobs: | |
linux-nanovdb: | |
if: | | |
github.event_name != 'workflow_dispatch' || | |
github.event.inputs.type == 'all' || | |
github.event.inputs.type == 'linux' | |
runs-on: ${{ (github.repository_owner == 'AcademySoftwareFoundation' && 'ubuntu-20.04-8c-32g-300h') || 'ubuntu-latest' }} | |
name: > | |
linux-nanovdb:cxx:${{ matrix.config.cxx }}-${{ matrix.config.build }} | |
container: | |
image: aswf/ci-base:2022 | |
env: | |
CXX: ${{ matrix.config.cxx }} | |
strategy: | |
matrix: | |
config: | |
- { cxx: g++, build: 'Release' } | |
- { cxx: g++, build: 'Debug' } | |
- { cxx: clang++, build: 'Release' } | |
- { cxx: clang++, build: 'Debug' } | |
fail-fast: false | |
steps: | |
- uses: actions/checkout@v3 | |
- name: install_cuda_11 | |
run: | | |
yum -y install yum-utils | |
yum-config-manager --add-repo http://developer.download.nvidia.com/compute/cuda/repos/rhel7/x86_64/cuda-rhel7.repo | |
echo "Installing cuda toolkit" | |
yum --enablerepo=epel -y install cuda-toolkit-11-0 | |
echo "/usr/local/cuda-11.0/bin" >> $GITHUB_PATH | |
echo "LD_LIBRARY_PATH=/usr/local/cuda-11.0/lib64:$LD_LIBRARY_PATH" >> $GITHUB_ENV | |
- name: build | |
run: > | |
./ci/build.sh -v | |
--build-type=${{ matrix.config.build }} | |
--components=core,nano,nanotest,nanoexam,nanobench,nanotool | |
--cargs=\' | |
-DUSE_EXPLICIT_INSTANTIATION=OFF | |
-DNANOVDB_USE_CUDA=ON | |
-DNANOVDB_USE_OPENVDB=ON | |
-DCMAKE_INSTALL_PREFIX=`pwd` | |
-DUSE_BLOSC=OFF | |
\' | |
- name: test | |
run: cd build && sudo ctest -V | |
windows-nanovdb: | |
if: | | |
github.event_name != 'workflow_dispatch' || | |
github.event.inputs.type == 'all' || | |
github.event.inputs.type == 'win' | |
runs-on: ${{ (github.repository_owner == 'AcademySoftwareFoundation' && 'windows-2022-8c-32g-300h') || 'windows-latest' }} | |
env: | |
VCPKG_DEFAULT_TRIPLET: ${{ matrix.config.vc }} | |
visual_studio: "Visual Studio 17 2022" | |
cuda: "11.6.2" | |
strategy: | |
matrix: | |
config: | |
# static build of blosc from vcpkg does not build internal sources. | |
# USE_STATIC_DEPENDENCIES is required for IlmBase/OpenEXR defines and | |
# Boost as both shared and static libs are installed. | |
- { vc: 'x64-windows-static', build: 'Release', cmake: '-A x64 -G \"Visual Studio 17 2022\" -DOPENVDB_CORE_SHARED=OFF -DUSE_STATIC_DEPENDENCIES=ON -DBLOSC_USE_EXTERNAL_SOURCES=ON' } | |
- { vc: 'x64-windows-static', build: 'Debug', cmake: '-A x64 -G \"Visual Studio 17 2022\" -DOPENVDB_CORE_SHARED=OFF -DUSE_STATIC_DEPENDENCIES=ON -DBLOSC_USE_EXTERNAL_SOURCES=ON' } | |
- { vc: 'x64-windows', build: 'Release', cmake: '-A x64 -G \"Visual Studio 17 2022\" -DOPENVDB_CORE_STATIC=OFF' } | |
- { vc: 'x64-windows', build: 'Debug', cmake: '-A x64 -G \"Visual Studio 17 2022\" -DOPENVDB_CORE_STATIC=OFF' } | |
fail-fast: false | |
steps: | |
- uses: actions/checkout@v3 | |
- name: path | |
run: | | |
# note: system path must be modified in a previous step to it's use | |
echo "$Env:VCPKG_INSTALLATION_ROOT\installed\${{ matrix.config.vc }}\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append | |
echo "${{github.workspace}}\build\openvdb\openvdb\${{ matrix.config.build }}" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append | |
- name: install_cuda | |
shell: powershell | |
run: .\ci\install_windows_cuda.ps1 | |
- name: install_deps | |
shell: bash | |
run: | | |
vcpkg update | |
vcpkg install zlib tbb gtest blosc boost-iostreams boost-system boost-any boost-uuid boost-interprocess boost-algorithm | |
- name: build | |
shell: bash | |
run: > | |
./ci/build.sh -v | |
--config=${{ matrix.config.build }} | |
--components=core,nano,nanotest,nanoexam,nanobench,nanotool | |
--cargs=\' | |
${{ matrix.config.cmake }} | |
-DMSVC_COMPRESS_PDB=ON | |
-DUSE_EXPLICIT_INSTANTIATION=OFF | |
-DNANOVDB_USE_CUDA=ON | |
-DNANOVDB_USE_OPENVDB=ON | |
-DVCPKG_TARGET_TRIPLET=${VCPKG_DEFAULT_TRIPLET} | |
-DCMAKE_TOOLCHAIN_FILE=\"${VCPKG_INSTALLATION_ROOT}\\scripts\\buildsystems\\vcpkg.cmake\" | |
\' | |
- name: test | |
shell: bash | |
run: cd build && ctest -V | |
macos-nanovdb: | |
if: | | |
github.event_name != 'workflow_dispatch' || | |
github.event.inputs.type == 'all' || | |
github.event.inputs.type == 'mac' | |
runs-on: ${{ matrix.config.runner }} | |
env: | |
CXX: ${{ matrix.config.cxx }} | |
strategy: | |
matrix: | |
config: | |
- { runner: 'macos-11', cxx: 'clang++', build: 'Release' } | |
- { runner: 'macos-11', cxx: 'clang++', build: 'Debug' } | |
fail-fast: false | |
steps: | |
- uses: actions/checkout@v3 | |
- name: install_deps | |
run: ./ci/install_macos.sh | |
- name: build | |
run: > | |
./ci/build.sh -v | |
--build-type=${{ matrix.config.build }} | |
--components=core,nano,nanotest,nanoexam,nanobench,nanotool | |
--cargs=\'-DUSE_EXPLICIT_INSTANTIATION=OFF -DNANOVDB_USE_CUDA=OFF -DNANOVDB_USE_OPENVDB=ON\' | |
- name: test | |
run: cd build && ctest -V | |
nanovdb-lite: | |
if: | | |
github.event_name != 'workflow_dispatch' || | |
github.event.inputs.type == 'all' || | |
github.event.inputs.type == 'linux' | |
runs-on: ${{ (github.repository_owner == 'AcademySoftwareFoundation' && 'ubuntu-20.04-8c-32g-300h') || 'ubuntu-latest' }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: install_gtest | |
run: | | |
sudo apt-get update | |
sudo apt-get -q install -y libgtest-dev | |
- name: build_and_test | |
run: | | |
cd nanovdb/nanovdb | |
sudo mkdir .build | |
cd .build | |
sudo cmake -DUSE_EXPLICIT_INSTANTIATION=OFF -DNANOVDB_BUILD_UNITTESTS=ON ../ | |
sudo make -j8 install | |
sudo ctest -V |