name: ci-tier2

on:
  push:
    branches: [stage, main]
  workflow_dispatch:

jobs:
  build-tier2:
    runs-on: [self-hosted, jetson, orin-nano-super]
    steps:
      - uses: actions/checkout@v4
      - name: Native build (deployment)
        run: |
          cmake -S . -B build -DBUILD_VINS_MONO=OFF -DBUILD_VPR_SALAD=OFF -DBUILD_C11_TILE_MANAGER=OFF
          cmake --build build --parallel

  ac-bound-nfts:
    runs-on: [self-hosted, jetson, orin-nano-super]
    needs: build-tier2
    steps:
      - uses: actions/checkout@v4
      - name: AC-bound NFTs (NFT-PERF / NFT-LIM / NFT-RES / NFT-SEC / IT-12)
        run: |
          pytest -m tier2 -q tests/perf tests/security tests/resilience
