Skip to content

feat(explorer): add ambient and colored model preview lights #3303

feat(explorer): add ambient and colored model preview lights

feat(explorer): add ambient and colored model preview lights #3303

Workflow file for this run

name: Build & Unit Test
on:
push:
branches: [ "**" ]
paths-ignore:
- '**/*.md'
# Not needed with wildcard branches
# pull_request:
# branches: ["main"]
# paths-ignore:
# - '**/*.md'
env:
CARGO_TERM_COLOR: always
jobs:
build:
strategy:
fail-fast: false
matrix:
os: [macOS-latest, ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
# Install Linux-specific dependencies
- name: Install ALSA (Linux only)
if: runner.os == 'Linux'
run: sudo apt-get update && sudo apt-get install -y libasound2-dev libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev ffmpeg libavcodec-dev libavformat-dev libavutil-dev libavdevice-dev libavfilter-dev libswresample-dev libswscale-dev pkg-config yasm
# Install macOS-specific dependencies
- name: Install macOS dependencies
if: runner.os == 'macOS'
run: |
# Install FFmpeg 6 which is compatible with ffmpeg-the-third 2.0.1
brew install ffmpeg@6 pkg-config
# Set up environment for FFmpeg@6
echo "PKG_CONFIG_PATH=$(brew --prefix)/lib/pkgconfig:$(brew --prefix ffmpeg@6)/lib/pkgconfig:$PKG_CONFIG_PATH" >> $GITHUB_ENV
echo "FFMPEG_DIR=$(brew --prefix ffmpeg@6)" >> $GITHUB_ENV
echo "CPPFLAGS=-I$(brew --prefix ffmpeg@6)/include" >> $GITHUB_ENV
echo "LDFLAGS=-L$(brew --prefix ffmpeg@6)/lib" >> $GITHUB_ENV
# Windows builds with FFmpeg disabled - no additional dependencies needed
- name: Windows setup
if: runner.os == 'Windows'
run: echo "Windows build will use default-features = false to skip FFmpeg"
# Caches ~/.cargo/registry, ~/.cargo/git, and target/ with smart
# partial-hit keys (restore-keys), so a Cargo.lock change no longer
# forces a fully cold build. Replaces the previous target-only cache.
- name: Cache cargo build
uses: Swatinem/rust-cache@v2
# Actual build steps.
# Build and test both run in --release so the optimized dependency tree
# is compiled once and reused by the test step, instead of compiling the
# whole graph a second time in the dev profile.
#
# Everything is built (and tested) in a single cargo invocation per OS so
# features resolve once and the large shared workspace crates (shock2vr,
# engine) compile a single time, rather than being partially recompiled
# when each package is built in its own step.
# Note: dark_viewer is excluded on Windows due to compilation issues.
# TODO: Fix dark_viewer Windows compatibility and include it everywhere.
- name: Build all (Unix)
if: runner.os != 'Windows'
run: cargo build --verbose --release -p engine -p desktop_runtime -p dark_viewer -p dark_query -p debug_runtime -p debug_command
env:
RUSTFLAGS: "-D warnings"
- name: Run all tests (Unix)
if: runner.os != 'Windows'
run: cargo test --verbose --release -p engine -p desktop_runtime -p dark_viewer -p dark_query -p debug_runtime -p debug_command
env:
RUSTFLAGS: "-D warnings"
- name: Build all (Windows)
if: runner.os == 'Windows'
run: cargo build --verbose --release -p engine -p desktop_runtime -p dark_query -p debug_runtime -p debug_command
env:
RUSTFLAGS: "-D warnings"
- name: Run all tests (Windows)
if: runner.os == 'Windows'
run: cargo test --verbose --release -p engine -p desktop_runtime -p dark_query -p debug_runtime -p debug_command
env:
RUSTFLAGS: "-D warnings"