release: v0.1.2 demo deployment, UX fixes, and CI smoke #42
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" ] | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.11' | |
| - name: Install LibTorch | |
| run: | | |
| curl -L https://download.pytorch.org/libtorch/cpu/libtorch-cxx11-abi-shared-with-deps-2.0.0%2Bcpu.zip -o libtorch.zip | |
| unzip libtorch.zip | |
| echo "LIBTORCH=$(pwd)/libtorch" >> $GITHUB_ENV | |
| echo "LD_LIBRARY_PATH=$(pwd)/libtorch/lib:$LD_LIBRARY_PATH" >> $GITHUB_ENV | |
| - name: Build | |
| run: cargo build --verbose --workspace | |
| - name: Run tests | |
| run: cargo test --verbose --workspace | |
| - name: Run alignment regression | |
| run: python demo_visual/ci_regression.py | |
| - name: Run clippy | |
| run: cargo clippy --workspace -- -D warnings | |
| - name: Check formatting | |
| run: cargo fmt --all -- --check | |
| demo-smoke: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.11' | |
| - name: Install PyTorch CPU wheel | |
| run: python -m pip install --upgrade pip && python -m pip install torch --index-url https://download.pytorch.org/whl/cpu | |
| - name: Start demo server | |
| run: | | |
| cargo run --release -p demo_visual --bin demo_visual > demo.log 2>&1 & | |
| echo $! > demo.pid | |
| sleep 45 | |
| - name: Check demo endpoints | |
| run: | | |
| curl -fsS http://127.0.0.1:3003/ > /tmp/demo.html | |
| curl -fsS http://127.0.0.1:3003/pipeline_stats | |
| curl -fsS http://127.0.0.1:3003/promo_status | |
| - name: Stop demo server | |
| if: always() | |
| run: | | |
| kill "$(cat demo.pid)" || true | |
| sleep 2 |