diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml new file mode 100644 index 0000000..454d024 --- /dev/null +++ b/.gitea/workflows/ci.yml @@ -0,0 +1,33 @@ +# Every push and pull request: build, test, clippy (report only — the tree is not rustfmt' +# clean, so `cargo fmt --check` would need its own one-time reformatting change first). Release builds are release.yml's job. +# +# Runners (see deploy/ci/README.md): +# anybot-linux a Linux computer with Docker; jobs run in anybot-builder:22.04 +# +# The nightly `cargo check` keeps the window honest between releases; the computer-use +# bench (bench/computer-use) is NOT here on purpose: it needs a real test box (a Lima VM +# with gVisor, its own volume and image — see its README "怎麼跑"), and it must never run +# against a real box. Run it by hand per release, before tagging, and record the numbers +# in bench/computer-use/README.md. +name: CI +on: + pull_request: + push: + branches: [main] + +env: + CARGO_TARGET_DIR: /ci-target + +jobs: + check: + runs-on: anybot-linux + steps: + - uses: actions/checkout@v4 + - name: Build + run: cargo build --bin anybot + - name: Test + run: cargo test --bin anybot -- --skip live 2>&1 | tail -5 + - name: Clippy (report only) + run: cargo clippy --bin anybot 2>&1 | tail -30 + - name: Relay build and test + run: cd relay && cargo test