WIP: fVDB CI setup #31
Workflow file for this run
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: 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: nvidia/cuda:12.3.1-devel-rockylinux8 # using this image, which is the base of aswf 2024, to avoid docker image bloat in aswf image | |
# image: aswf/ci-openvdb:2024-clang17.1 | |
env: | |
PYTHONPATH: | |
options: --rm | |
defaults: | |
run: | |
shell: bash -el {0} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Free up disk space | |
run: | | |
yum remove -y python3.11 gcc cuda-toolkit-12-config-common mesa-libGL cuda-compat-12-3 cuda-command-line-tools-12-3 cuda-nsight-compute-12-3 java-1.8.0-openjdk-headless nodejs nodejs-docs python39-libs doxygen cuda-nvprof-12-3 ruby-libs graphviz libnccl xorg-x11-server-utils libxkbcommon-x11 xorg-x11-proto-devel && | |
df -h | |
- name: Unset PYTHONPATH | |
run: | | |
echo $PYTHONPATH && | |
unset PYTHONPATH && | |
echo $PYTHONPATH | |
- 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 | |
auto-activate-base: false | |
- name: Buid fvdb | |
run: | | |
echo $PYTHONPATH && | |
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: nvidia/cuda:12.3.1-devel-rockylinux8 | |
env: | |
PYTHONPATH: | |
options: --rm --gpus all | |
defaults: | |
run: | |
shell: bash -el {0} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Free up disk space | |
run: | | |
yum remove -y python3.11 gcc cuda-toolkit-12-config-common mesa-libGL cuda-compat-12-3 cuda-command-line-tools-12-3 cuda-nsight-compute-12-3 java-1.8.0-openjdk-headless nodejs nodejs-docs python39-libs doxygen cuda-nvprof-12-3 ruby-libs graphviz libnccl xorg-x11-server-utils libxkbcommon-x11 xorg-x11-proto-devel | |
df -h | |
- 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 | |
auto-activate-base: false | |
- 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: Run tests | |
run: | | |
cd fvdb/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: nvidia/cuda:12.3.1-devel-rockylinux8 | |
env: | |
PYTHONPATH: | |
options: --rm --gpus all | |
defaults: | |
run: | |
shell: bash -el {0} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Free up disk space | |
run: | | |
yum remove -y python3.11 gcc cuda-toolkit-12-config-common mesa-libGL cuda-compat-12-3 cuda-command-line-tools-12-3 cuda-nsight-compute-12-3 java-1.8.0-openjdk-headless nodejs nodejs-docs python39-libs doxygen cuda-nvprof-12-3 ruby-libs graphviz libnccl xorg-x11-server-utils libxkbcommon-x11 xorg-x11-proto-devel | |
df -h | |
- 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 | |
auto-activate-base: false | |
- 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: Run benchmarks | |
run: | | |
cd fvdb/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: fvdb/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" |