Stable docker-compose setup for building Rust projects on Gitea Actions. DinD-isolated daemon, built-in cache server, capacity=4 parallel jobs, healthcheck-gated startup. Portable to other build machines via .env. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HU4wDwdydNZpR3YkMiYYy8
21 lines
553 B
YAML
21 lines
553 B
YAML
# Copy to your repo at: .gitea/workflows/build.yaml
|
|
name: Build Rust
|
|
on: [push, pull_request]
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Install Rust toolchain
|
|
uses: actions-rust-lang/setup-rust-toolchain@v1
|
|
# This action already wires Swatinem/rust-cache under the hood,
|
|
# caching ~/.cargo registry + target/ via the runner's cache server.
|
|
|
|
- name: Build
|
|
run: cargo build --release --locked
|
|
|
|
- name: Test
|
|
run: cargo test --release --locked
|