Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
255 changes: 134 additions & 121 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,155 +1,168 @@
name: CI

env:
DEBIAN_FRONTEND: noninteractive
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: "true"

on:
push:
branches:
- master
- main
- public
branches: [main, master, public]
pull_request:
branches:
- master
- main
- public

jobs:
branches: [main, master, public]

build_linux:
name: Build on Linux Systems

runs-on: ${{ matrix.os }}
concurrency:
group: ${{ github.workflow }}:${{ github.head_ref || github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}

jobs:
build-linux:
name: linux (CUDA ${{ matrix.cuda_version }} Ubuntu ${{ matrix.ubuntu_version }} OSPRay ${{ matrix.ospray_mode }})
runs-on: ubuntu-${{ matrix.ubuntu_version }}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-20.04
arch: 86
cuda: "11.3"
optix: "7.3.0"
ospray: "2.5.0"
- os: ubuntu-20.04
arch: 75
cuda: "11.3"
optix: "7.3.0"
ospray: "2.5.0"

- cuda_version: "11.8.0"
ubuntu_version: "22.04"
arch: "86"
ospray_mode: fetchcontent
- cuda_version: "11.8.0"
ubuntu_version: "22.04"
arch: "86"
ospray_mode: external
- cuda_version: "12.8.1"
ubuntu_version: "24.04"
arch: "86"
ospray_mode: fetchcontent
- cuda_version: "12.8.1"
ubuntu_version: "24.04"
arch: "86"
ospray_mode: external
env:
build_dir: "build"
config: "Release"
GDT_CUDA_ARCHITECTURES: ${{ matrix.arch }}
BUILD_DIR: build
CONFIG: Release

steps:
- name: Install dependencies
run: sudo apt-get update && sudo apt-get install cmake gcc g++ libtbb-dev libglfw3-dev xorg-dev

# - name: Add gitlab.com into known_hosts
# run: mkdir -p ~/.ssh && ssh-keyscan -H gitlab.com > ~/.ssh/known_hosts
# shell: bash
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@main
with:
tool-cache: true
android: true
dotnet: true
haskell: true
large-packages: true
swap-storage: true

- uses: actions/checkout@v4
with:
submodules: recursive

- uses: actions/checkout@v2
- name: Install build dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
cmake \
gcc \
g++ \
libtbb-dev \
libglfw3-dev \
xorg-dev \
wget

- name: Install CUDA toolkit
uses: Jimver/cuda-toolkit@v0.2.34
id: cuda-toolkit
with:
# ssh-key: ${{ secrets.SUBMODULE_CONTENT_PULL_KEY }}
submodules: 'recursive'
# ssh-known-hosts: ''
cuda: ${{ matrix.cuda_version }}
method: network

- name: Install OptiX
- name: Install external OSPRay archive
if: matrix.ospray_mode == 'external'
shell: bash
working-directory: github-actions
env:
optix: ${{ matrix.optix }}
run: bash ./optix-cmake-github-actions/install_optix.sh
run: |
OSPRAY_URL="https://github.com/wilsonCernWq/ospray/releases/download/sparse_sampling_v2.11.0/ospray-2.11.0.x86_64.linux_sparse_sampling.tar.gz"
OSPRAY_ROOT="$RUNNER_TEMP/ospray-2.11.0.x86_64.linux_sparse_sampling"

- name: Install OSPRay
shell: bash
working-directory: github-actions
env:
ospray: ${{ matrix.ospray }}
run: bash ./ospray-cmake-github-actions/install_ospray_ubuntu.sh
wget -O "$RUNNER_TEMP/ospray.tar.gz" "$OSPRAY_URL"
tar -xzf "$RUNNER_TEMP/ospray.tar.gz" -C "$RUNNER_TEMP"

- name: Install CUDA
echo "OSPRAY_DIR=$OSPRAY_ROOT/lib/cmake/ospray-2.11.0" >> "$GITHUB_ENV"

- name: Configure
shell: bash
working-directory: github-actions
run: bash ./cuda-cmake-github-actions/scripts/actions/install_cuda_ubuntu.sh
env:
cuda: ${{ matrix.cuda }}

- name: CMake
env:
OptiX_INSTALL_DIR: ${{ env.OptiX_INSTALL_DIR }}
run: cmake . -B ${{ env.build_dir }}
-DCMAKE_BUILD_TYPE=${{ env.config }}
-DOVR_BUILD_DEVICE_OPTIX7=ON
-DOVR_BUILD_DEVICE_OSPRAY=ON
-Dospray_DIR=${{ env.OSPRAY_CMAKE_DIR }}
-DGDT_CUDA_ARCHITECTURES=${{ matrix.arch }}
run: |
CMAKE_ARGS=(
-DCMAKE_BUILD_TYPE="${CONFIG}"
-DOVR_BUILD_DEVICE_OPTIX7=ON
-DOVR_BUILD_DEVICE_OSPRAY=ON
-DCMAKE_CUDA_ARCHITECTURES="${{ matrix.arch }}"
)

if [[ "${{ matrix.ospray_mode }}" == "external" ]]; then
CMAKE_ARGS+=("-Dospray_DIR=${OSPRAY_DIR}")
fi

cmake -S . -B "${BUILD_DIR}" "${CMAKE_ARGS[@]}"

- name: Build
working-directory: ${{ env.build_dir }}
run: cmake --build . --target all --verbose -j `nproc`
run: cmake --build "${BUILD_DIR}" --target all --verbose -j"$(nproc)"

build_windows:
name: Build on Windows
runs-on: ${{ matrix.os }}
build-windows:
name: windows (CUDA ${{ matrix.cuda_version }})
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
include:
- os: windows-2019
visual_studio: "Visual Studio 16 2019"
cuda: "11.5.1"
optix: "7.3.0"
ospray: "2.5.0"
arch: 86
- os: windows-2019
visual_studio: "Visual Studio 16 2019"
cuda: "11.5.1"
optix: "7.3.0"
ospray: "2.5.0"
arch: 75

- cuda_version: "12.8.1"
arch: "86"
env:
build_dir: "build"
config: "Release"
GDT_CUDA_ARCHITECTURES: ${{ matrix.arch }}
BUILD_DIR: build
CONFIG: Release

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
submodules: recursive

- name: Install OptiX
shell: powershell
working-directory: github-actions
run: .\optix-cmake-github-actions\install_optix.ps1
env:
optix: ${{ matrix.optix }}

- name: Install OSPRay
shell: powershell
working-directory: github-actions
run: .\ospray-cmake-github-actions\install_ospray_windows.ps1
env:
ospray: ${{ matrix.ospray }}

- name: Install CUDA
shell: powershell
working-directory: github-actions
run: .\cuda-cmake-github-actions\scripts\actions\install_cuda_windows.ps1
env:
cuda: ${{ matrix.cuda }}
visual_studio: ${{ matrix.visual_studio }}

- name: CMake
env:
OptiX_INSTALL_DIR: ${{ env.OptiX_INSTALL_DIR }}
run: cmake . -B ${{ env.build_dir }}
-G "${{ matrix.visual_studio }}" -A x64
-DCMAKE_BUILD_TYPE=${{ env.config }}
-DOVR_BUILD_DEVICE_OPTIX7=ON
-DOVR_BUILD_DEVICE_OSPRAY=ON
-Dospray_DIR=${{ env.OSPRAY_CMAKE_DIR }}
-DTBB_DIR=${{ env.TBB_CMAKE_DIR }}
-DGDT_CUDA_ARCHITECTURES=${{ matrix.arch }}
- name: Set up MSVC
uses: ilammy/msvc-dev-cmd@v1
with:
arch: x64

- name: Install oneTBB
shell: pwsh
run: |
$tbbVersion = "2021.9.0"
$tbbArchive = Join-Path $env:RUNNER_TEMP "oneapi-tbb-win.zip"
$tbbRoot = Join-Path $env:RUNNER_TEMP "oneapi-tbb-$tbbVersion"

Invoke-WebRequest -Uri "https://github.com/oneapi-src/oneTBB/releases/download/v$tbbVersion/oneapi-tbb-$tbbVersion-win.zip" -OutFile $tbbArchive
Expand-Archive -Path $tbbArchive -DestinationPath $env:RUNNER_TEMP -Force

"TBB_DIR=$tbbRoot/lib/cmake/tbb" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append

- name: Install CUDA toolkit
uses: Jimver/cuda-toolkit@v0.2.34
id: cuda-toolkit
with:
cuda: ${{ matrix.cuda_version }}
method: network

- name: Configure
shell: pwsh
run: |
$cmakeArgs = @(
"-S", ".",
"-B", $env:BUILD_DIR,
"-DCMAKE_BUILD_TYPE=$env:CONFIG",
"-DOVR_BUILD_DEVICE_OPTIX7=ON",
"-DOVR_BUILD_DEVICE_OSPRAY=ON",
"-DCMAKE_CUDA_ARCHITECTURES=${{ matrix.arch }}",
"-DTBB_DIR=$env:TBB_DIR"
)
cmake @cmakeArgs

- name: Build
working-directory: ${{ env.build_dir }}
run: cmake --build . --config ${{ env.config }} --target ALL_BUILD --verbose
shell: pwsh
run: cmake --build $env:BUILD_DIR --config $env:CONFIG --target ALL_BUILD --verbose
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,7 @@ projects/
*.obj
*.mpi
*.raw

CLAUDE.md

__pycache__/
9 changes: 0 additions & 9 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,12 +1,3 @@
[submodule "github-actions"]
path = github-actions
url = https://github.com/wilsonCernWq/github-workflow-collections.git
[submodule "extern/imgui/implot"]
path = extern/imgui/implot
url = https://github.com/epezent/implot.git
[submodule "extern/imgui/imgui"]
path = extern/imgui/imgui
url = https://github.com/ocornut/imgui.git
[submodule "extern/pybind11"]
path = extern/pybind11
url = https://github.com/pybind/pybind11.git
Loading
Loading