Skip to content

Warp Renderer OpenGL Lighting Parity #4320

Warp Renderer OpenGL Lighting Parity

Warp Renderer OpenGL Lighting Parity #4320

Workflow file for this run

on:
push:
branches: [main]
pull_request:
branches: [main]
types: [opened, reopened, synchronize, edited]
jobs:
format:
name: Ruff format
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.14"]
steps:
- uses: actions/checkout@v6
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
version: "0.9.27"
python-version: ${{ matrix.python-version }}
- name: Set up Python ${{ matrix.python-version }}
run: uv python install
- name: Format with Ruff
run: |
uvx ruff format --check .
linter:
name: Ruff linter
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.14"]
steps:
- uses: actions/checkout@v6
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
version: "0.9.27"
python-version: ${{ matrix.python-version }}
- name: Set up Python ${{ matrix.python-version }}
run: uv python install
- name: Lint with Ruff
run: |
uvx ruff check --output-format=github .
pre-commit:
name: Pre-commit checks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
version: "0.9.27"
python-version: "3.14"
- name: Set up Python
run: uv python install
- name: Run pre-commit
run: |
uvx --with absl-py pre-commit run -a
test:
name: Test with ${{ matrix.dep-type }} dependencies (${{ matrix.python-version }})
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.14"]
dep-type: ["locked uv", stable]
steps:
- uses: actions/checkout@v6
# Setup for locked uv dependencies
- name: Install uv
if: matrix.dep-type == 'locked uv'
uses: astral-sh/setup-uv@v7
with:
version: "0.9.27"
python-version: ${{ matrix.python-version }}
- name: Set up Python ${{ matrix.python-version }} (uv)
if: matrix.dep-type == 'locked uv'
run: uv python install
# Setup for stable dependencies
- name: Set up Python ${{ matrix.python-version }} (standard)
if: matrix.dep-type == 'stable'
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
# Common Cache step
- name: Restore Warp kernel cache
uses: actions/cache@v4
with:
path: ~/.cache/warp
key: warp-kernels-${{ runner.os }}-${{ runner.arch }}-${{ matrix.python-version }}-${{ matrix.dep-type }}-${{ hashFiles('uv.lock', 'mujoco_warp/**/*.py') }}
restore-keys: |
warp-kernels-${{ runner.os }}-${{ runner.arch }}-${{ matrix.python-version }}-${{ matrix.dep-type }}-
# Install for stable
- name: Install stable dependencies
if: matrix.dep-type == 'stable'
run: |
python -m pip install --upgrade pip
python -m pip install pytest pytest-xdist
python -m pip install .
# Run tests for locked uv
- name: Test with pytest (locked uv)
if: matrix.dep-type == 'locked uv'
run: |
uv run --with pytest --with pytest-xdist pytest -n 2
# Run tests for stable
- name: Test with pytest (stable)
if: matrix.dep-type == 'stable'
run: |
pytest -n 2
# Extra step for stable
- name: Out-of-bounds check for batched model fields
if: matrix.dep-type == 'stable'
run: |
pytest mujoco_warp/_src/io_test.py -k test_model_batched_fields --debug_mode
kernel_analyzer:
name: Kernel analyzer
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install absl-py
- name: Run kernel analyzer
run: |
python contrib/kernel_analyzer/kernel_analyzer/cli.py mujoco_warp/_src/*.py --output=github