Enable controlled red-team weaponization promotion #159
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
| name: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: ["3.10", "3.11", "3.12"] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - run: pip install -e . | |
| - run: pip install pytest | |
| - run: pytest -q | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - run: pip install ruff | |
| - run: ruff check src/ tests/ | |
| typecheck: | |
| runs-on: ubuntu-latest | |
| continue-on-error: true | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - run: pip install -e . | |
| - run: pip install 'pyright==1.1.398' | |
| - run: pyright src/ | |
| stage-contracts: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - run: pip install -e . | |
| - run: pip install pytest | |
| - run: pytest -q tests/test_stage_contracts.py | |
| - name: validate sample run stage outputs | |
| run: | | |
| RUN_DIR=$(python - <<'PY' | |
| from pathlib import Path | |
| from aiedge.run import analyze_run, create_run | |
| tmp = Path("tmp-stage-contract-ci") | |
| tmp.mkdir(parents=True, exist_ok=True) | |
| firmware = tmp / "tiny.bin" | |
| firmware.write_bytes(b"STAGE-CONTRACT-CI") | |
| info = create_run( | |
| str(firmware), | |
| case_id="ci-stage-contracts", | |
| ack_authorization=True, | |
| runs_root=tmp / "runs", | |
| ) | |
| analyze_run(info, time_budget_s=1, no_llm=True) | |
| print(info.run_dir) | |
| PY | |
| ) | |
| python3 scripts/validate_stage_outputs.py --run-dir "$RUN_DIR" | |
| - name: AEG platform readiness audit | |
| run: aiedge aeg-readiness --out /tmp/aeg_platform_readiness.json |