Skip to content

ci: bump actions/setup-java from 5 to 6 #305

ci: bump actions/setup-java from 5 to 6

ci: bump actions/setup-java from 5 to 6 #305

Workflow file for this run

name: CI
on:
pull_request:
push:
branches: [main]
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
# Cancel superseded PR runs, but never cancel push-to-main runs (avoids
# spurious "cancelled" marks when several PRs are merged in quick succession).
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
lint:
name: ruff (lint + format)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
with:
python-version: "3.12"
cache: pip
- run: pip install ruff==0.15.14
- run: ruff check --output-format=github .
- run: ruff format --check .
pre-commit:
name: pre-commit (all hooks)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
with:
python-version: "3.12"
cache: pip
# Runs every hook in .pre-commit-config.yaml against the full tree.
# Catches what local hooks would catch (yaml/toml/json validity, trailing
# whitespace, eof newlines, merge conflicts, oversized files), even when
# a contributor commits with --no-verify or skips installing the hooks.
- uses: pre-commit/action@v3.0.1
bridge:
name: java bridge (build)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-java@v6
with:
distribution: temurin
java-version: "17"
# Recompile src/ against the vendored microrts.jar so the bridge source
# cannot silently drift from the committed bridge.jar.
- run: bash microrts_agent/microrts/build_bridge.sh
tests-matrix:
name: pytest matrix
runs-on: ubuntu-latest
timeout-minutes: 15
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
cache: pip
cache-dependency-path: pyproject.toml
- uses: actions/setup-java@v6
with:
distribution: temurin
java-version: "17"
# Smoke tests exercise CLI subcommands, the JNI bridge, every shipped
# agent's loadability, end-to-end evaluate and a 256-step PPO train.
# Force CPU because GitHub runners have no GPU; install the CPU-only
# torch wheel first to skip ~3 GB of nvidia-* CUDA wheels that the
# default PyPI torch wheel would otherwise drag in transitively.
- env:
CUDA_VISIBLE_DEVICES: ""
run: |
pip install torch --index-url https://download.pytorch.org/whl/cpu
pip install -e ".[dev]"
bash microrts_agent/microrts/build_bridge.sh
pytest tests/
# Aggregator job: keeps the `pytest (smoke)` required-check stable across
# matrix expansion. Succeeds iff every matrix entry above succeeds; the
# `needs:` chain causes it to skip (and thus fail the required-status gate)
# if any matrix entry fails.
tests:
name: pytest (smoke)
needs: tests-matrix
runs-on: ubuntu-latest
steps:
- run: echo "All pytest matrix entries passed."