Skip to content

RAD LOD Viewer

RAD LOD Viewer #2803

Workflow file for this run

name: Ubuntu CUDA Build
on:
push:
branches: [ dev, master ]
paths-ignore:
- '**.md'
- 'docs/**'
pull_request:
branches: [ dev, master ]
paths-ignore:
- '**.md'
- 'docs/**'
workflow_dispatch:
jobs:
build-ubuntu:
if: github.repository == 'MrNeRF/LichtFeld-Studio' || github.event.pull_request.base.repo.full_name == 'MrNeRF/LichtFeld-Studio'
runs-on: ubuntu-24.04
container:
image: nvidia/cuda:12.8.0-devel-ubuntu24.04
strategy:
fail-fast: false
matrix:
build_type: [Release, Debug]
env:
VCPKG_ROOT: ${{ github.workspace }}/../vcpkg
CC: gcc-14
CXX: g++-14
VCPKG_BUILD_TYPE: release
VCPKG_FORCE_SYSTEM_BINARIES: 1
CMAKE_MAKE_PROGRAM: /usr/bin/ninja
steps:
- name: Install Git
run: |
apt-get update
apt-get install -y git
- name: Checkout source
uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive
- name: Free disk space
run: |
apt-get clean
rm -rf /var/lib/apt/lists/*
# Host paths (may not exist in container)
rm -rf /usr/share/dotnet /opt/ghc /opt/hostedtoolcache /usr/local/lib/android /opt/az
# CUDA extras - samples, docs, tools we don't need
rm -rf /usr/local/cuda/nsight* /usr/local/cuda/compute-sanitizer
rm -rf /usr/local/cuda/extras /usr/local/cuda/tools
rm -rf /usr/local/cuda/doc
# Remove large static libs but keep ones needed for build
find /usr/local/cuda/targets/x86_64-linux/lib -name '*.a' \
! -name 'libcudart_static.a' \
! -name 'libcudadevrt.a' \
! -name 'libnvjpeg_static.a' \
! -name 'libnvjpeg2k_static.a' \
! -name 'libculibos.a' \
-delete 2>/dev/null || true
df -h
- name: Install build dependencies
run: |
apt-get update
apt-get install -y ca-certificates gpg wget
# CMake 3.30+ from Kitware
wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | tee /usr/share/keyrings/kitware-archive-keyring.gpg >/dev/null
echo 'deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ noble main' | tee /etc/apt/sources.list.d/kitware.list >/dev/null
apt-get update
apt-get install -y git curl unzip cmake gcc-14 g++-14 ccache ninja-build \
zip tar pkg-config python3 python3-dev libxinerama-dev libxcursor-dev xorg-dev libglu1-mesa-dev \
libwayland-dev libxkbcommon-dev libegl-dev libdecor-0-dev libibus-1.0-dev libdbus-1-dev \
libsystemd-dev libgtk-3-dev \
nasm autoconf autoconf-archive automake libtool
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-14 100 \
--slave /usr/bin/g++ g++ /usr/bin/g++-14
- name: Cache vcpkg tool
id: cache-vcpkg-tool
uses: actions/cache@v4
with:
path: ${{ env.VCPKG_ROOT }}
key: vcpkg-tool-${{ runner.os }}-2026-02-21
restore-keys: vcpkg-tool-${{ runner.os }}-
- name: Setup vcpkg
if: steps.cache-vcpkg-tool.outputs.cache-hit != 'true'
run: |
cd ..
git clone https://github.com/microsoft/vcpkg.git
./vcpkg/bootstrap-vcpkg.sh -disableMetrics
- name: Configure vcpkg triplet
run: |
cat >> $VCPKG_ROOT/triplets/x64-linux.cmake << 'EOF'
set(VCPKG_BUILD_TYPE release)
set(VCPKG_MAX_CONCURRENCY 2)
EOF
- name: Cache ccache
uses: actions/cache@v4
with:
path: /github/home/.cache/ccache
key: ccache-${{ runner.os }}-${{ matrix.build_type }}-${{ github.run_id }}
restore-keys: ccache-${{ runner.os }}-${{ matrix.build_type }}-
- name: Cache vcpkg packages
uses: actions/cache@v4
with:
path: /github/home/.cache/vcpkg/archives
key: vcpkg-pkgs-${{ runner.os }}-linux-gui-v1-${{ hashFiles('**/vcpkg.json') }}
restore-keys: vcpkg-pkgs-${{ runner.os }}-
- name: Configure
run: |
cmake -B build -S . -G Ninja \
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
-DCMAKE_CUDA_COMPILER=/usr/local/cuda/bin/nvcc \
-DBUILD_PYTHON_STUBS=OFF \
-DLFS_DEV_IMPORT_SOURCE_PYTHON=OFF \
-DLFS_DEV_IMPORT_SOURCE_RESOURCES=OFF \
-DCUDA_DEVICE_DEBUG=OFF
- name: Clean vcpkg buildtrees
run: |
rm -rf build/vcpkg_installed/vcpkg/blds
df -h
- name: Build
run: cmake --build build -j $(nproc)