Files
chenlin c32df70326
Checks / Layout, translation and Colab checks (push) Has been cancelled
Checks / Ruff (push) Has been cancelled
Checks / Framework tests (native backend, CPU) (push) Has been cancelled
Checks / Portable Rust controller (push) Has been cancelled
release: v0.1 generic robot training and application platform
2026-11-05 11:05:01 +08:00

109 lines
4.1 KiB
YAML

name: Checks
on:
push:
pull_request:
workflow_dispatch:
permissions:
contents: read
jobs:
layout-and-translations:
name: Layout, translation and Colab checks
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Check out repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.4.0
- name: Set up Python
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
with:
python-version: "3.13"
# These checks parse files, validate translations and exercise Colab backup
# contracts with short-lived subprocesses. They need no MuJoCo or GPU stack.
- name: Install test runner
run: python -m pip install --disable-pip-version-check pytest
- name: Check layout, translations and Colab helpers
run: python -m pytest tests/test_layout.py tests/test_translations.py tests/test_colab.py tests/test_colab_metrics.py tests/test_colab_backup_inspection.py tests/test_colab_notebook_workflow.py -q
lint:
name: Ruff
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Check out repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.4.0
- name: Set up Python
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
with:
python-version: "3.13"
# The rule set is written into pyproject.toml, so the ruff version is not
# what decides what passes here; CONTRIBUTING.md asks for this command
# before handing a change over, and this is the same command.
- name: Install ruff
run: python -m pip install --disable-pip-version-check ruff
- name: Lint
run: python -m ruff check .
framework-tests:
name: Framework tests (native backend, CPU)
runs-on: ubuntu-latest
timeout-minutes: 40
steps:
- name: Check out repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.4.0
- name: Set up Python
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
with:
python-version: "3.12"
cache: pip
cache-dependency-path: pyproject.toml
# The whole suite on the native CPU backend: the seam, the vendored
# copies, the registry, the task contracts, export and the bundle checks.
# No GPU, so CUDA-specific checks skip. Current Rust/wasm runtimes are
# built from temporary deterministic test exports, not old applications
# under out/. The CPU torch wheel limits installation disk usage.
#
# mjlab sets MUJOCO_GL=egl on Linux before mujoco is imported, so every
# test that imports a task needs an EGL the loader can find, GPU or not:
# Mesa's. Without it collection fails on 29 files with
# `'NoneType' object has no attribute 'eglQueryString'` (measured in a
# python:3.12-slim container on 2026-10-08; the packages below fixed it).
- name: Install Mesa EGL for headless rendering
run: sudo apt-get update -qq && sudo apt-get install -y -qq libegl1 libegl-mesa0 libgl1-mesa-dri
- name: Install PyTorch (CPU build)
run: python -m pip install --disable-pip-version-check torch torchvision --index-url https://download.pytorch.org/whl/cpu
- name: Install this repository
run: python -m pip install --disable-pip-version-check -e ".[dev]"
- name: Install portable controller build tools
run: |
rustup target add wasm32-unknown-unknown
cargo install wasm-bindgen-cli --version 0.2.128 --locked
- name: Run framework and onboarding checks
run: python -m pytest tests/ --ignore=tests/test_replay.py -q
- name: Run all locked-template replay checks
run: python -m pytest tests/test_replay.py -q
controller-core:
name: Portable Rust controller
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.4.0
- name: Test the hardware-independent controller
run: cargo test --manifest-path deploy/fsm/Cargo.toml --no-default-features