Files
marqdo-knowledge/.woodpecker/main.yml
T
2026-11-27 21:19:22 +08:00

58 lines
2.2 KiB
YAML

# Tag-only compatibility and release artifact validation for marqdo-knowledge.
#
# Mirrors the local lanes in scripts/ci.sh and the GitHub workflow. The core CLI
# is built from the pinned marqdo-cli commit because the Analysis contract is an
# external boundary; integration tests always run against that real binary.
when:
event: [tag]
steps:
test:
image: rust:1.100-bookworm
commands:
- apt-get update
- apt-get install -y --no-install-recommends ca-certificates python3
- rustup component add clippy rustfmt
- python3 tools/ci/test_release_metadata.py
- cargo fmt --all -- --check
- cargo clippy --workspace --all-targets --locked -- -D warnings
- cargo test --workspace --locked
minimum-rust:
image: rust:1.89-bookworm
commands:
- apt-get update
- apt-get install -y --no-install-recommends ca-certificates build-essential
- cargo check --locked --workspace --all-targets
core-analysis:
image: rust:1.100-bookworm
commands:
- apt-get update
- apt-get install -y --no-install-recommends ca-certificates git build-essential
- |
set -eu
core_sha=4bbefc92449ee480c8a2c89b0308feb4cda8d0e7
work=$(mktemp -d)
git clone --quiet https://git.cflmy.cn/cflmy/marqdo-cli.git "$work/core"
( cd "$work/core" && git checkout --quiet "$core_sha" \
&& cargo build --release --locked -p marqdo-cli )
MARQDO_TEST_BIN="$work/core/target/release/marqdo" \
cargo test --workspace --locked
- cargo build --locked
- target/debug/marqdo-knowledge --help >/dev/null
release:
depends_on: [test, minimum-rust, core-analysis]
image: git.cflmy.cn/cflmy/marqdo-ci-rust:3.0.0-rc.5
commands:
- |
set -eu
cargo build --release --locked
version="$(sed -n 's/^version = "\(.*\)"/\1/p' Cargo.toml | head -1)"
python3 tools/release/package.py --source-sha "$CI_COMMIT_SHA" --version "$version"
python3 tools/release/smoke.py --archive "dist/marqdo-knowledge-$version-x86_64-unknown-linux-gnu.tar.gz" --evidence-out dist/smoke-evidence.json
- cat dist/RELEASE_INFO.json
- cat dist/*.tar.gz.sha256
- cat dist/smoke-evidence.json