Repository navigation
Add cross-platform Docker and hardware CI #28
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # SPDX-License-Identifier: Apache-2.0 | |
| # Copyright (c) 2026 RL-Kernel Contributors | |
| name: CI-Pipeline | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| permissions: | |
| contents: read | |
| jobs: | |
| linting: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout Code | |
| uses: actions/checkout@v4 | |
| - name: Set up Python 3.10 | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.10' | |
| cache: 'pip' | |
| - name: Run pre-commit hooks | |
| uses: pre-commit/action@v3.0.1 | |
| - name: Install MyPy | |
| run: pip install mypy | |
| - name: Run MyPy | |
| run: mypy --ignore-missing-imports rl_engine/ | |
| unit-tests: | |
| needs: linting | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout Code | |
| uses: actions/checkout@v4 | |
| - name: Free Disk Space | |
| run: | | |
| echo "==> Before cleanup:" | |
| df -h | |
| sudo rm -rf /usr/share/dotnet | |
| sudo rm -rf /usr/local/lib/android | |
| sudo rm -rf /opt/ghc | |
| sudo rm -rf /usr/local/share/boost | |
| echo "==> After cleanup:" | |
| df -h | |
| - name: Set up Python 3.10 | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.10' | |
| - name: Install Project Dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install torch --index-url https://download.pytorch.org/whl/cpu | |
| pip install -e ".[test]" | |
| - name: Run Mocked Hardware Discovery Tests | |
| run: | | |
| python -m pytest rl_engine/tests/test_dispatch.py -v | |
| python -m pytest tests/test_kernel_registry.py -q | |
| PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 python -m pytest tests/test_attention_correctness.py -q -rs | |
| - name: Run CPU-only Operator Tests | |
| run: | | |
| python -m pytest tests/test_linear_logp.py -q -rs -k "native" | |
| python -m pytest tests/test_cpu_hal.py -q | |
| docs: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout Code | |
| uses: actions/checkout@v4 | |
| - name: Set up Python 3.10 | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.10' | |
| cache: 'pip' | |
| - name: Install Documentation Dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r requirements-docs.txt | |
| - name: Build Documentation | |
| run: mkdocs build --strict -f mkdocs.yaml |