Skip to content

WIP: Setting up fVDB GHA tests #17

WIP: Setting up fVDB GHA tests

WIP: Setting up fVDB GHA tests #17

Workflow file for this run

name: fVDB
on:
push:
branches:
- 'master'
- 'feature/**'
- 'pr/**'
paths-ignore:
- 'CHANGES'
- 'CODEOWNERS'
- 'doc/**'
- 'openvdb/**'
- 'openvdb_cmd/**'
- 'openvdb_ax/**'
- 'openvdb_maya/**'
- 'openvdb_houdini/**'
- 'nanovdb/**'
- 'pendingchanges/**'
- '**.md'
- 'fvdb/debug/**'
- 'fvdb/docs/**'
- 'fvdb/examples/**'
- 'fvdb/notebooks/**'
- 'fvdb/scripts/**'
pull_request:
branches:
- '**'
paths-ignore:
- 'CHANGES'
- 'CODEOWNERS'
- 'doc/**'
- 'openvdb/**'
- 'openvdb_cmd/**'
- 'openvdb_ax/**'
- 'openvdb_maya/**'
- 'openvdb_houdini/**'
- 'nanovdb/**'
- 'pendingchanges/**'
- '**.md'
- 'fvdb/debug/**'
- 'fvdb/docs/**'
- 'fvdb/examples/**'
- 'fvdb/notebooks/**'
- 'fvdb/scripts/**'
schedule:
# run this workflow every day 7am UTC
- cron: '0 7 * * *'
permissions:
contents: write
deployments: write
jobs:
fvdb-build:
name: fVDB Build
runs-on: ${{ (github.repository_owner == 'AcademySoftwareFoundation' && 'ubuntu-20.04-16c-64g-600h') || 'ubuntu-latest' }}
container:
image: aswf/ci-openvdb:2023-clang15.0
options: --rm
defaults:
run:
shell: bash -el {0}
steps:
- uses: actions/checkout@v4
- name: Set up fvdb_build Conda env
uses: conda-incubator/setup-miniconda@v3
with:
miniforge-version: latest
activate-environment: fvdb_build
environment-file: fvdb/env/build_environment.yml
- name: Buid fvdb
run: |
cd fvdb &&
TORCH_CUDA_ARCH_LIST="7.0;7.5;8.0;8.6+PTX" MAX_JOBS=$(($(nproc) < $(free -g | awk '/^Mem:/{jobs=int($7/2.5); if(jobs<1) jobs=1; print jobs}') ? $(nproc) : $(free -g | awk '/^Mem:/{jobs=int($7/2.5); if(jobs<1) jobs=1; print jobs}'))) python setup.py bdist_wheel --dist-dir=dist &&
tree
- name: Upload package
uses: actions/upload-artifact@v4
with:
name: fvdb-test-package
path: fvdb/dist/*.whl
retention-days: 4
- name: Cleanup
if: always()
run: |
echo "Cleaning up /__w/_temp directory"
sudo rm -rf /__w/_temp/*
echo "Cleanup completed"
fvdb-unit-test:
needs: [fvdb-build]
name: fVDB Unit Tests
runs-on: ubuntu-20.04-gpu-t4-4c-16g-176h
container:
image: aswf/ci-openvdb:2023-clang15.0
options: --rm
defaults:
run:
shell: bash -el {0}
steps:
- uses: actions/checkout@v4
- name: Set up fvdb_test Conda env
uses: conda-incubator/setup-miniconda@v3
with:
miniforge-version: latest
activate-environment: fvdb_test
environment-file: fvdb/env/test_environment.yml
- name: Download package
uses: actions/download-artifact@v4
with:
name: fvdb-test-package
path: ./dist
- name: Install package
run: |
conda activate fvdb_test
pip install ./dist/*.whl
- name: cd fvdb
run: cd fvdb
- name: Run tests
run: |
cd tests;
pytest -v unit
- name: Cleanup
if: always()
run: |
echo "Cleaning up /__w/_temp directory"
sudo rm -rf /__w/_temp/*
echo "Cleanup completed"
fvdb-benchmarks:
needs: [fvdb-build]
name: fVDB Continuous Benchmarking
runs-on:
- ubuntu-20.04-gpu-t4-4c-16g-176h
container:
image: aswf/ci-openvdb:2023-clang15.0
options: --rm
defaults:
run:
shell: bash -el {0}
steps:
- uses: actions/checkout@v4
- name: Set up fvdb_test Conda env
uses: conda-incubator/setup-miniconda@v3
with:
miniforge-version: latest
activate-environment: fvdb_test
environment-file: fvdb/env/test_environment.yml
- name: Download package
uses: actions/download-artifact@v4
with:
name: fvdb-test-package
path: ./dist
- name: Install package
run: |
conda activate fvdb_test
pip install ./dist/*.whl
- name: Disable git ownership verification
run: |
git config --global --add safe.directory "$(pwd)"
- name: cd fvdb
run: cd fvdb
- name: Run benchmarks
run: |
tree &&
cd tests &&
pytest benchmark --benchmark-json benchmark/output.json
- name: Store benchmark result
uses: benchmark-action/github-action-benchmark@v1
with:
name: Python Benchmark with pytest-benchmark
tool: 'pytest'
output-file-path: tests/benchmark/output.json
# Use personal access token instead of GITHUB_TOKEN due to https://github.community/t/github-action-not-triggering-gh-pages-upon-push/16096
github-token: ${{ secrets.GITHUB_TOKEN }}
auto-push: true
# Show alert with commit comment on detecting possible performance regression
alert-threshold: '200%'
comment-on-alert: true
fail-on-alert: true
alert-comment-cc-users: '@swahtz'
- name: Cleanup
if: always()
run: |
echo "Cleaning up /__w/_temp directory"
sudo rm -rf /__w/_temp/*
echo "Cleanup completed"