ci(rust): 添加 Gitea host runner 工作流

补充自托管 Gitea host-runner workflow,并将项目状态、缺口、开发指南与路线图同步到当前实际情况。
This commit is contained in:
2026-07-21 10:39:11 +08:00
parent 0ab3f3b953
commit d76f6f1c88
14 changed files with 260 additions and 125 deletions
+59
View File
@@ -0,0 +1,59 @@
# Gitea Actions workflow for the Rust workspace.
# If your Gitea instance only scans ".gitea/workflows/*.yml", copy this file
# there as well. This file stays host-runner friendly and does not touch real
# resource directories.
name: bat-rust
on:
push:
branches:
- "**"
pull_request:
workflow_dispatch:
jobs:
rust:
name: Build and test Rust
runs-on: host
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1
BAT_SKIP_ENV_FILE: "1"
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt,clippy
- name: Show tool versions
shell: bash
run: |
set -euo pipefail
rustc --version
cargo --version
command -v curl
command -v unzip
- name: Check formatting
shell: bash
run: cargo fmt --all -- --check
- name: Check workspace
shell: bash
run: cargo check --workspace --locked
- name: Build workspace
shell: bash
run: cargo build --workspace --locked
- name: Run clippy
shell: bash
run: cargo clippy --workspace --all-targets --locked -- -D warnings
- name: Run tests
shell: bash
run: cargo test --workspace --locked
+58
View File
@@ -0,0 +1,58 @@
# Gitea Actions workflow for the Rust workspace.
# This workflow is host-runner friendly and does not touch real resource
# directories.
name: bat-rust
on:
push:
branches:
- "**"
pull_request:
workflow_dispatch:
jobs:
rust:
name: Build and test Rust
runs-on: host
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1
BAT_SKIP_ENV_FILE: "1"
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt,clippy
- name: Show tool versions
shell: bash
run: |
set -euo pipefail
rustc --version
cargo --version
command -v curl
command -v unzip
- name: Check formatting
shell: bash
run: cargo fmt --all -- --check
- name: Check workspace
shell: bash
run: cargo check --workspace --locked
- name: Build workspace
shell: bash
run: cargo build --workspace --locked
- name: Run clippy
shell: bash
run: cargo clippy --workspace --all-targets --locked -- -D warnings
- name: Run tests
shell: bash
run: cargo test --workspace --locked