Skip to content

build release

build release #126

Workflow file for this run

name: build release
on:
workflow_dispatch:
inputs:
tag:
description: 'Build tag'
required: true
default: 'pre-release'
jobs:
build-pylib-binaries:
runs-on: windows-2022
defaults:
run:
shell: bash -el {0}
env:
CUDA_SUB_PACKAGES:
CUDA_PATH: "C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v12.1"
strategy:
matrix:
# https://en.wikipedia.org/wiki/CUDA#GPUs_supported
artifact: [
{
arch: "61",
name: "Pascal",
gpus: "GTX 1050 - 1080 & Ti, Quadro P400 - P6000"
},
{
arch: "75",
name: "Turing",
gpus: "RTX 2060 - 2080 & Ti, Quadro RTX 4000 - 8000"
},
{
arch: "86",
name: "Ampere",
gpus: "RTX 3050 - 3090 & Ti, RTX A2000 - A6000"
},
{
arch: "89",
name: "Lovelace",
gpus: "RTX 4070 - 4090, RTX 6000 Ada"
}
]
steps:
- name: Checkout Repo
uses: actions/checkout@v3
with:
ref: ${{ github.sha }}
submodules: recursive
- name: Install CMake
uses: lukka/[email protected]
- name: Install CUDA Toolkit
uses: Jimver/[email protected]
id: cuda-toolkit
with:
cuda: "12.1.0"
method: 'network'
sub-packages: '[
"cublas",
"cublas_dev",
"cudart",
"curand",
"curand_dev",
"nvcc",
"nvrtc",
"nvrtc_dev",
"thrust",
"visual_studio_integration"
]'
- name: Setup Conda
uses: conda-incubator/[email protected]
with:
activate-environment: py310
environment-file: etc/py310.yml
auto-activate-base: false
- name: CMake Configure
env:
CUDA_ARCH_LIST: ${{ matrix.artifact.arch }}
TCNN_CUDA_ARCHITECTURES: ${{ matrix.artifact.arch }}
run: |
cmake . \
-B build \
-G "Visual Studio 17 2022" \
-A x64 \
-DCMAKE_BUILD_TYPE=Release \
-DPYTHON_EXECUTABLE="${CONDA_PREFIX}\\python.exe" \
-DTN_BUILD_PYD=ON \
-DTN_BUILD_EXE=OFF
- name: CMake Build
run: cmake --build build --config Release -j
- name: Archive Build Result
uses: thedoctor0/[email protected]
with:
type: 'zip'
directory: build/Release/
path: .
filename: '../archive/PyTurboNeRF-${{ matrix.artifact.name }}.zip'
- name: Generate Release
id: gen-release
uses: ncipollo/release-action@v1
with:
allowUpdates: true
artifacts: 'build/archive/PyTurboNeRF-${{ matrix.artifact.name }}.zip'
bodyFile: etc/pre-release.md
commit: ${{ github.sha }}
makeLatest: true
name: 'PyTurboNeRF Binaries'
prerelease: true
replacesArtifacts: true
tag: ${{ inputs.tag }}
token: ${{ secrets.GITHUB_TOKEN }}
outputs:
release_url: ${{ steps.gen-release.outputs.html_url }}
notify-discord:
runs-on: ubuntu-20.04
needs: build-pylib-binaries
steps:
- name: Dispatch Release Notification
uses: Ilshidur/[email protected]
env:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
with:
args: "A new version of the TurboNeRF core binary is now available! [PyTurboNeRF ${{ inputs.tag }}](<${{ needs.build-pylib-binaries.outputs.release_url }}>)"
trigger-blender-addon-release:
runs-on: ubuntu-20.04
needs: build-pylib-binaries
steps:
- name: Trigger TurboNeRF-Blender Release
uses: peter-evans/repository-dispatch@v2
with:
token: ${{ secrets.SYNC_PAT }}
repository: 'JamesPerlman/TurboNeRF-Blender'
event-type: 'release'
client-payload: |
{
"tag": "${{ inputs.tag }}",
"release_url": "${{ needs.build-pylib-binaries.outputs.release_url }}"
}