name: ci on: push: pull_request: env: CARGO_TERM_COLOR: always jobs: # Fast checks + release build of the workspace. checks: runs-on: ubuntu-latest steps: - uses: https://gitea.com/actions/checkout@v4 # Installs the toolchain pinned in rust-toolchain.toml. - uses: actions-rust-lang/setup-rust-toolchain@v1 - name: Format run: cargo fmt --all -- --check # No system OpenSSL in this graph: the daemon builds without it, # and the dev reqwest rides rustls (the runner's gcc covers the # C sources rustls compiles). - name: Clippy (warnings are errors) run: cargo clippy --workspace --all-targets --all-features -- -D warnings - name: Build (release) run: cargo build --release --workspace test: runs-on: ubuntu-latest steps: - uses: https://gitea.com/actions/checkout@v4 - uses: actions-rust-lang/setup-rust-toolchain@v1 # The loopback test drives the daemon with the real client over # the real wire; the DO's neutral half tests host-side without # the worker feature. No test talks to the network. - name: Test run: cargo test --workspace --all-features # The DO compiles to wasm32: the worker feature is the real build, # and the platform-neutral half must also stay wasm-clean without # it — workerd is the one host that provides the bindings. wasm: runs-on: ubuntu-latest steps: - uses: https://gitea.com/actions/checkout@v4 - uses: actions-rust-lang/setup-rust-toolchain@v1 with: target: wasm32-unknown-unknown - name: Check the Durable Object build run: cargo check -p rhema-cloudflare-code --target wasm32-unknown-unknown --features worker - name: Check the platform-neutral half run: cargo check -p rhema-cloudflare-code --target wasm32-unknown-unknown --no-default-features