ci: add CI/CD pipelines and deterministic release tooling
Modeled on cflmy/marqdo-cli: - Woodpecker pipeline with fmt/clippy/tests, MSRV 1.89 lane, a lane that builds the pinned core CLI and runs the real Analysis integration tests, and a tag-only release lane - GitHub Actions mirror with the same gates plus artifact upload and prerelease publication - scripts/ci.sh local lanes (test/minimum/core/release/all) - package-release.sh now refuses a dirty tree or SOURCE_SHA mismatch, runs a locked release build and records SOURCE_SHA, RELEASE_INFO.json and SHA-256 - verify-release.sh cold-installs the archive into an isolated MARQDO_TOOL_HOME and runs the documented install/help/compile/query/check/remove smoke path - docs/ci.md and docs/releasing.md document gates, explicit non-gates and the beta freeze/tag procedure
This commit is contained in:
1 parent
66be3e4464
commit
d8d439e6d7
7 files changed
+467
-40
No files matched your search
@@ -0,0 +1,63 @@
|
||||
# Woodpecker CI pipeline 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: [push, pull_request, tag]
|
||||
|
||||
steps:
|
||||
test:
|
||||
image: rust:1.100-bookworm
|
||||
commands:
|
||||
- apt-get update
|
||||
- apt-get install -y --no-install-recommends ca-certificates
|
||||
- rustup component add clippy rustfmt
|
||||
- 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://github.com/cflmy/marqdo-cli "$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]
|
||||
when:
|
||||
event: [tag]
|
||||
image: rust:1.100-bookworm
|
||||
commands:
|
||||
- apt-get update
|
||||
- apt-get install -y --no-install-recommends ca-certificates git build-essential python3
|
||||
- |
|
||||
set -eu
|
||||
core_sha=4bbefc92449ee480c8a2c89b0308feb4cda8d0e7
|
||||
work=$(mktemp -d)
|
||||
git clone --quiet https://github.com/cflmy/marqdo-cli "$work/core"
|
||||
( cd "$work/core" && git checkout --quiet "$core_sha" \
|
||||
&& cargo build --release --locked -p marqdo-cli )
|
||||
export MARQDO_BIN="$work/core/target/release/marqdo"
|
||||
SOURCE_SHA="$CI_COMMIT_SHA" scripts/package-release.sh
|
||||
scripts/verify-release.sh
|
||||
- cat dist/RELEASE_INFO.json
|
||||
- cat dist/*.tar.gz.sha256
|
||||
Reference in new issue
Block a user