- build target/release/marqdo-knowledge in both tag-release lanes before the deterministic packager; beta.2 failed exactly at that missing step and produced no archive or Gitea release - package.py now fails with a corrective message instead of a traceback when the release binary is absent - bump the tool to 0.1.0-beta.3, add release notes and CHANGELOG entry and mark v0.1.0-beta.2 withdrawn; contracts and SQLite schema are unchanged - keep the full completed / NOT complete inventory and beta limitations unchanged
109 lines
3.6 KiB
YAML
109 lines
3.6 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
pull_request:
|
|
workflow_dispatch:
|
|
|
|
env:
|
|
CARGO_TERM_COLOR: always
|
|
CORE_REPO: https://github.com/cflmy/marqdo-cli
|
|
CORE_SHA: 4bbefc92449ee480c8a2c89b0308feb4cda8d0e7
|
|
|
|
jobs:
|
|
test:
|
|
name: fmt + clippy + workspace tests
|
|
runs-on: ubuntu-24.04
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: dtolnay/rust-toolchain@stable
|
|
with:
|
|
components: rustfmt, clippy
|
|
- uses: Swatinem/rust-cache@v2
|
|
- name: Release metadata consistency
|
|
run: python3 tools/ci/test_release_metadata.py
|
|
- run: cargo fmt --all -- --check
|
|
- run: cargo clippy --workspace --all-targets --locked -- -D warnings
|
|
- run: cargo test --workspace --locked
|
|
|
|
minimum-rust:
|
|
name: MSRV check (1.89)
|
|
runs-on: ubuntu-24.04
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: dtolnay/rust-toolchain@1.89
|
|
- uses: Swatinem/rust-cache@v2
|
|
- run: cargo check --locked --workspace --all-targets
|
|
|
|
core-analysis:
|
|
name: real Analysis integration (pinned core CLI)
|
|
runs-on: ubuntu-24.04
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: dtolnay/rust-toolchain@stable
|
|
- uses: Swatinem/rust-cache@v2
|
|
- name: Build pinned core CLI
|
|
run: |
|
|
set -eu
|
|
git clone --quiet "$CORE_REPO" /tmp/marqdo-cli
|
|
cd /tmp/marqdo-cli
|
|
git checkout --quiet "$CORE_SHA"
|
|
cargo build --release --locked -p marqdo-cli
|
|
- name: Run integration lane against the real binary
|
|
env:
|
|
MARQDO_TEST_BIN: /tmp/marqdo-cli/target/release/marqdo
|
|
run: |
|
|
/tmp/marqdo-cli/target/release/marqdo --version
|
|
cargo test --workspace --locked
|
|
- name: CLI smoke
|
|
run: cargo build --locked && target/debug/marqdo-knowledge --help >/dev/null
|
|
|
|
release:
|
|
name: beta release archive
|
|
if: startsWith(github.ref, 'refs/tags/')
|
|
needs: [test, minimum-rust, core-analysis]
|
|
runs-on: ubuntu-24.04
|
|
permissions:
|
|
contents: write
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: dtolnay/rust-toolchain@stable
|
|
- uses: Swatinem/rust-cache@v2
|
|
- name: Build pinned core CLI
|
|
run: |
|
|
set -eu
|
|
git clone --quiet "$CORE_REPO" /tmp/marqdo-cli
|
|
cd /tmp/marqdo-cli
|
|
git checkout --quiet "$CORE_SHA"
|
|
cargo build --release --locked -p marqdo-cli
|
|
- name: Deterministic package and cold-install smoke
|
|
env:
|
|
MARQDO_BIN: /tmp/marqdo-cli/target/release/marqdo
|
|
run: |
|
|
cargo build --release --locked
|
|
version="$(python3 -c 'import re,pathlib;print(re.search(r"(?m)^version\s*=\s*\"([^\"]+)\"", pathlib.Path("Cargo.toml").read_text()).group(1))')"
|
|
python3 tools/release/package.py --source-sha "${{ github.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 dist/*.tar.gz.sha256 dist/smoke-evidence.json
|
|
- name: Upload release archive
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: marqdo-knowledge-beta
|
|
path: |
|
|
dist/*.tar.gz
|
|
dist/*.sha256
|
|
dist/RELEASE_INFO.json
|
|
dist/FILES.sha256
|
|
dist/smoke-evidence.json
|
|
- name: Publish GitHub prerelease
|
|
uses: softprops/action-gh-release@v2
|
|
with:
|
|
prerelease: true
|
|
files: |
|
|
dist/*.tar.gz
|
|
dist/*.sha256
|
|
dist/RELEASE_INFO.json
|
|
dist/FILES.sha256
|
|
dist/smoke-evidence.json
|
|
body_path: docs/releases/0.1.0-beta.2.md
|