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

WIP: fVDB CI Integration #1890

Closed
318 changes: 160 additions & 158 deletions .github/workflows/ax.yml
Original file line number Diff line number Diff line change
@@ -1,165 +1,167 @@

name: AX
# name: AX

on:
push:
branches:
- 'master'
- 'feature/**'
- 'pr/**'
paths-ignore:
- 'CHANGES'
- 'CODEOWNERS'
- 'doc/**'
- 'nanovdb/**'
- 'openvdb_maya/**'
- 'openvdb_houdini/**'
- 'pendingchanges/**'
- '**.md'
pull_request:
branches:
- '**'
paths-ignore:
- 'CHANGES'
- 'CODEOWNERS'
- 'doc/**'
- 'nanovdb/**'
- '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, mac, linux, grammar)'
required: true
default: 'all'
# on:
# push:
# branches:
# - 'master'
# - 'feature/**'
# - 'pr/**'
# paths-ignore:
# - 'CHANGES'
# - 'CODEOWNERS'
# - 'doc/**'
# - 'nanovdb/**'
# - 'openvdb_maya/**'
# - 'openvdb_houdini/**'
# - 'fvdb/**'
# - 'pendingchanges/**'
# - '**.md'
# pull_request:
# branches:
# - '**'
# paths-ignore:
# - 'CHANGES'
# - 'CODEOWNERS'
# - 'doc/**'
# - 'nanovdb/**'
# - 'openvdb_maya/**'
# - 'openvdb_houdini/**'
# - 'fvdb/**'
# - '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, mac, linux, grammar)'
# 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
# # 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
# defaults:
# run:
# shell: bash

jobs:
linux-ax:
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-ax:${{ matrix.config.image }}-cxx:${{ matrix.config.cxx }}-${{ matrix.config.build }}
container:
image: aswf/ci-openvdb:${{ matrix.config.image }}
env:
CXX: ${{ matrix.config.cxx }}
CCACHE_DIR: /tmp/ccache
strategy:
matrix:
# Only test unified builds (core+ax). weekly CI should test standalone
config:
- { image: '2023-clang15', cxx: 'clang++', build: 'Release', cmake: '' }
- { image: '2023-clang15', cxx: 'g++', build: 'Release', cmake: '' }
- { image: '2023-clang15', cxx: 'clang++', build: 'Debug', cmake: '' }
- { image: '2022-clang11', cxx: 'clang++', build: 'Release', cmake: '' }
- { image: '2022-clang11', cxx: 'g++', build: 'Release', cmake: '' }
- { image: '2021-clang10', cxx: 'clang++', build: 'Release', cmake: '-DDISABLE_DEPENDENCY_VERSION_CHECKS=ON' }
- { image: '2021-clang10', cxx: 'g++', build: 'Release', cmake: '-DDISABLE_DEPENDENCY_VERSION_CHECKS=ON' }
fail-fast: false
steps:
- 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-ax${{ matrix.config.image }}-${{ matrix.config.cxx }}-${{ steps.timestamp.outputs.timestamp }}
restore-keys: linux-ax${{ matrix.config.image }}-${{ matrix.config.cxx }}-
- name: build
run: >
./ci/build.sh -v
--build-type=${{ matrix.config.build }}
--components='core,python,bin,axcore,axbin,axtest'
--cargs=\"
${{ matrix.config.cmake }}
-DOPENVDB_AX_TEST_CMD_DOWNLOADS=ON
-DUSE_EXPLICIT_INSTANTIATION=OFF
-DOPENVDB_CXX_STRICT=ON
\"
- name: test
run: cd build && ctest -V
- name: test_doxygen_examples
run: ./ci/extract_test_examples.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
# jobs:
# linux-ax:
# 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-ax:${{ matrix.config.image }}-cxx:${{ matrix.config.cxx }}-${{ matrix.config.build }}
# container:
# image: aswf/ci-openvdb:${{ matrix.config.image }}
# env:
# CXX: ${{ matrix.config.cxx }}
# CCACHE_DIR: /tmp/ccache
# strategy:
# matrix:
# # Only test unified builds (core+ax). weekly CI should test standalone
# config:
# - { image: '2023-clang15', cxx: 'clang++', build: 'Release', cmake: '' }
# - { image: '2023-clang15', cxx: 'g++', build: 'Release', cmake: '' }
# - { image: '2023-clang15', cxx: 'clang++', build: 'Debug', cmake: '' }
# - { image: '2022-clang11', cxx: 'clang++', build: 'Release', cmake: '' }
# - { image: '2022-clang11', cxx: 'g++', build: 'Release', cmake: '' }
# - { image: '2021-clang10', cxx: 'clang++', build: 'Release', cmake: '-DDISABLE_DEPENDENCY_VERSION_CHECKS=ON' }
# - { image: '2021-clang10', cxx: 'g++', build: 'Release', cmake: '-DDISABLE_DEPENDENCY_VERSION_CHECKS=ON' }
# fail-fast: false
# steps:
# - 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-ax${{ matrix.config.image }}-${{ matrix.config.cxx }}-${{ steps.timestamp.outputs.timestamp }}
# restore-keys: linux-ax${{ matrix.config.image }}-${{ matrix.config.cxx }}-
# - name: build
# run: >
# ./ci/build.sh -v
# --build-type=${{ matrix.config.build }}
# --components='core,python,bin,axcore,axbin,axtest'
# --cargs=\"
# ${{ matrix.config.cmake }}
# -DOPENVDB_AX_TEST_CMD_DOWNLOADS=ON
# -DUSE_EXPLICIT_INSTANTIATION=OFF
# -DOPENVDB_CXX_STRICT=ON
# \"
# - name: test
# run: cd build && ctest -V
# - name: test_doxygen_examples
# run: ./ci/extract_test_examples.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

macos-ax:
if: |
github.event_name != 'workflow_dispatch' ||
github.event.inputs.type == 'all' ||
github.event.inputs.type == 'mac'
runs-on: ${{ matrix.config.runner }}
name: macos-cxx:${{ matrix.config.cxx }}-llvm:${{ matrix.config.llvm }}-${{ matrix.config.build }}
env:
CXX: ${{ matrix.config.cxx }}
strategy:
matrix:
config:
#@note llvm10 never got its own brew formula...
- { runner: 'macos-latest', cxx: 'clang++', build: 'Release', llvm: '11' }
- { runner: 'macos-latest', cxx: 'clang++', build: 'Release', llvm: '12' }
- { runner: 'macos-latest', cxx: 'clang++', build: 'Release', llvm: '13' }
fail-fast: false
steps:
- uses: actions/checkout@v3
- name: install_deps
run: ./ci/install_macos.sh ${{ matrix.config.llvm }}
- name: build
run: >
./ci/build.sh -v
--build-type=${{ matrix.config.build }}
--components="core,python,bin,axcore,axbin,axtest"
--cargs=\"
-DOPENVDB_AX_TEST_CMD_DOWNLOADS=ON
-DUSE_EXPLICIT_INSTANTIATION=OFF
-DLLVM_DIR=/usr/local/opt/llvm@${{ matrix.config.llvm }}/lib/cmake/llvm
\"
- name: test
run: cd build && ctest -V
- name: test_doxygen_examples
run: ./ci/extract_test_examples.sh
# macos-ax:
# if: |
# github.event_name != 'workflow_dispatch' ||
# github.event.inputs.type == 'all' ||
# github.event.inputs.type == 'mac'
# runs-on: ${{ matrix.config.runner }}
# name: macos-cxx:${{ matrix.config.cxx }}-llvm:${{ matrix.config.llvm }}-${{ matrix.config.build }}
# env:
# CXX: ${{ matrix.config.cxx }}
# strategy:
# matrix:
# config:
# #@note llvm10 never got its own brew formula...
# - { runner: 'macos-latest', cxx: 'clang++', build: 'Release', llvm: '11' }
# - { runner: 'macos-latest', cxx: 'clang++', build: 'Release', llvm: '12' }
# - { runner: 'macos-latest', cxx: 'clang++', build: 'Release', llvm: '13' }
# fail-fast: false
# steps:
# - uses: actions/checkout@v3
# - name: install_deps
# run: ./ci/install_macos.sh ${{ matrix.config.llvm }}
# - name: build
# run: >
# ./ci/build.sh -v
# --build-type=${{ matrix.config.build }}
# --components="core,python,bin,axcore,axbin,axtest"
# --cargs=\"
# -DOPENVDB_AX_TEST_CMD_DOWNLOADS=ON
# -DUSE_EXPLICIT_INSTANTIATION=OFF
# -DLLVM_DIR=/usr/local/opt/llvm@${{ matrix.config.llvm }}/lib/cmake/llvm
# \"
# - name: test
# run: cd build && ctest -V
# - name: test_doxygen_examples
# run: ./ci/extract_test_examples.sh

gen-grammar:
if: |
github.event_name == 'workflow_dispatch' &&
github.event.inputs.type == 'grammar'
runs-on: ${{ (github.repository_owner == 'AcademySoftwareFoundation' && 'ubuntu-20.04-8c-32g-300h') || 'ubuntu-latest' }}
container:
image: aswf/ci-openvdb:2022-clang11
steps:
- uses: actions/checkout@v3
- name: build
run: ./ci/build.sh -v --components=axgr --target=openvdb_ax_grammar --cargs=\"-DOPENVDB_AX_GRAMMAR_NO_LINES=ON\"
- name: upload grammar
uses: actions/upload-artifact@v2
with:
name: ax_grammar
path: ./build/openvdb_ax/openvdb_ax/openvdb_ax/grammar
retention-days: 5
# gen-grammar:
# if: |
# github.event_name == 'workflow_dispatch' &&
# github.event.inputs.type == 'grammar'
# runs-on: ${{ (github.repository_owner == 'AcademySoftwareFoundation' && 'ubuntu-20.04-8c-32g-300h') || 'ubuntu-latest' }}
# container:
# image: aswf/ci-openvdb:2022-clang11
# steps:
# - uses: actions/checkout@v3
# - name: build
# run: ./ci/build.sh -v --components=axgr --target=openvdb_ax_grammar --cargs=\"-DOPENVDB_AX_GRAMMAR_NO_LINES=ON\"
# - name: upload grammar
# uses: actions/upload-artifact@v2
# with:
# name: ax_grammar
# path: ./build/openvdb_ax/openvdb_ax/openvdb_ax/grammar
# retention-days: 5
Loading
Loading