Build #613
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: Build | |
on: | |
push: | |
branches: | |
- 'master' | |
- 'feature/**' | |
- 'pr/**' | |
paths-ignore: | |
- 'CHANGES' | |
- 'CODEOWNERS' | |
- 'doc/**' | |
- 'openvdb_maya/**' | |
- 'openvdb_houdini/**' | |
- 'openvdb_ax/**' | |
- 'nanovdb/**' | |
- 'fvdb/**' | |
- 'pendingchanges/**' | |
- '**.md' | |
pull_request: | |
branches: | |
- '**' | |
paths-ignore: | |
- 'CHANGES' | |
- 'CODEOWNERS' | |
- 'doc/**' | |
- 'openvdb_maya/**' | |
- 'openvdb_houdini/**' | |
- 'openvdb_ax/**' | |
- 'nanovdb/**' | |
- 'fvdb/**' | |
- 'pendingchanges/**' | |
- '**.md' | |
schedule: | |
# run this workflow every day at 7am UTC except Monday | |
- cron: '0 7 * * 0,2-6' | |
# run this workflow Monday 7am UTC | |
# warning: This pattern is checked in various places below | |
- cron: '0 7 * * 1' | |
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 | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
linux-vfx: | |
# VFX platform jobs. These are run on the appropriate CentOS images from | |
# the provided ASWF docker containers | |
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-vfx:${{ matrix.config.image }}- | |
abi:${{ matrix.config.abi }}- | |
cxx:${{ matrix.config.cxx }}- | |
type:${{ matrix.config.build }} | |
container: | |
image: aswf/ci-openvdb:${{ matrix.config.image }} | |
env: | |
CXX: ${{ matrix.config.cxx }} | |
CCACHE_DIR: /tmp/ccache | |
strategy: | |
matrix: | |
config: | |
# @note we specifically use clang15.0 (not clang15) here as the newest | |
# versions of the clang15.X containers have some issues with the GLFW | |
# installation | |
- { cxx: clang++, image: '2023-clang15.0', abi: '11', build: 'Release', cmake: '' } | |
- { cxx: g++, image: '2023-clang15.0', abi: '11', build: 'Release', cmake: '' } | |
- { cxx: clang++, image: '2022-clang11', abi: '11', build: 'Debug', cmake: '' } | |
- { cxx: clang++, image: '2022-clang11', abi: '10', build: 'Release', cmake: '' } | |
- { cxx: g++, image: '2022-clang11', abi: '10', build: 'Release', cmake: '' } | |
- { cxx: clang++, image: '2022-clang11', abi: '9', build: 'Release', cmake: '-DDISABLE_DEPENDENCY_VERSION_CHECKS=ON' } | |
- { cxx: g++, image: '2022-clang11', abi: '9', build: 'Release', cmake: '-DDISABLE_DEPENDENCY_VERSION_CHECKS=ON' } | |
fail-fast: false | |
steps: | |
- name: Enable Node 16 | |
# Solution taken from https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default | |
if: contains(matrix.config.image, '2022') | |
run: | | |
echo "ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION=true" >> $GITHUB_ENV | |
- uses: actions/checkout@v3 | |
- name: pybind11 | |
#if: contains(matrix.config.image, '2023') == false | |
run: ./ci/install_pybind11.sh 2.10.0 | |
- name: timestamp | |
id: timestamp | |
run: echo "timestamp=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_OUTPUT | |
- name: ccache | |
# don't use ccache for debug builds | |
if: matrix.config.build == 'Release' | |
id: ccache | |
uses: actions/cache@v3 | |
with: | |
path: /tmp/ccache | |
key: linux-vfx${{ matrix.config.image }}-abi${{ matrix.config.abi }}-${{ matrix.config.cxx }}-${{ steps.timestamp.outputs.timestamp }} | |
restore-keys: linux-vfx${{ matrix.config.image }}-abi${{ matrix.config.abi }}-${{ matrix.config.cxx }}- | |
- name: build | |
run: > | |
./ci/build.sh -v | |
--build-type=${{ matrix.config.build }} | |
--components=\"core,python,bin,view,render,test\" | |
--cargs=\" | |
${{ matrix.config.cmake }} | |
-DOPENVDB_CXX_STRICT=ON | |
-DOPENVDB_ABI_VERSION_NUMBER=${{ matrix.config.abi }} | |
\" | |
- name: test | |
# Always run tests on weekly builds but skip Debug on commits as they take a while. | |
# https://github.community/t/distinct-job-for-each-schedule/17811/2 | |
if: contains(github.event.schedule, '0 7 * * 1') || matrix.config.build == 'Release' | |
run: | | |
cd build && ctest -V | |
cd - && ./ci/test_install.sh | |
# Keep ccache light by stripping out any caches not accessed in the last day | |
- name: ccache_clean | |
if: matrix.config.build == 'Release' | |
run: ccache --evict-older-than 1d | |
windows: | |
# Windows CI. Tests a dynamic build with MD. | |
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' }} | |
name: windows | |
env: | |
VCPKG_DEFAULT_TRIPLET: x64-windows | |
strategy: | |
fail-fast: false | |
steps: | |
- uses: actions/checkout@v3 | |
- name: path | |
shell: pwsh | |
run: | | |
# note: system path must be modified in a previous step to it's use | |
echo "$Env:VCPKG_INSTALLATION_ROOT\installed\x64-windows\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append | |
echo "${{github.workspace}}\build\openvdb\openvdb\Release" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append | |
- name: install | |
run: ./ci/install_windows.sh | |
- name: build | |
run: > | |
./ci/build.sh -v | |
--config='Release' | |
--components='core,bin,view,render,python,test' | |
--cargs=\' | |
-A x64 -G \"Visual Studio 17 2022\" -DOPENVDB_CORE_STATIC=OFF | |
-DMSVC_COMPRESS_PDB=ON | |
-DUSE_EXR=ON | |
-DUSE_PNG=ON | |
-DVCPKG_TARGET_TRIPLET=${VCPKG_DEFAULT_TRIPLET} | |
-DCMAKE_TOOLCHAIN_FILE=\"${VCPKG_INSTALLATION_ROOT}\\scripts\\buildsystems\\vcpkg.cmake\" | |
\' | |
- name: size | |
# Print the build directy size (monitor if we're hitting runner limits) | |
run: du -h build | |
- name: test | |
run: cd build && ctest -V -C Release | |
macos: | |
if: | | |
github.event_name != 'workflow_dispatch' || | |
github.event.inputs.type == 'all' || | |
github.event.inputs.type == 'mac' | |
runs-on: macos-13 # Last macos runner befor M1 (macos-14) | |
env: | |
CXX: clang++ | |
steps: | |
- uses: actions/checkout@v3 | |
- name: install | |
run: | | |
./ci/install_macos.sh | |
./ci/install_tbb_macos.sh | |
- name: build | |
run: > | |
./ci/build.sh -v | |
--build-type=Release | |
--components=\"core,python,bin,view,render,test\" | |
--cargs=\' | |
-DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/install | |
\' | |
- name: test | |
run: cd build && ctest -V |