Skip to content

Commit a96c6d7

Browse files
committed
chore: harden v0.1 release pipeline
1 parent 3786862 commit a96c6d7

7 files changed

Lines changed: 80 additions & 26 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727

2828
steps:
2929
- name: Checkout
30-
uses: actions/checkout@v6
30+
uses: actions/checkout@v7
3131

3232
- name: Install Rust
3333
uses: dtolnay/rust-toolchain@stable
@@ -84,7 +84,7 @@ jobs:
8484
runs-on: ubuntu-latest
8585
steps:
8686
- name: Checkout
87-
uses: actions/checkout@v6
87+
uses: actions/checkout@v7
8888

8989
- name: Install Rust 1.95
9090
uses: dtolnay/rust-toolchain@master

‎.github/workflows/release.yml‎

Lines changed: 41 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
runs-on: ubuntu-latest
1515
steps:
1616
- name: Checkout
17-
uses: actions/checkout@v6
17+
uses: actions/checkout@v7
1818

1919
- name: Install Rust
2020
uses: dtolnay/rust-toolchain@stable
@@ -29,10 +29,34 @@ jobs:
2929
cargo fmt --check
3030
cargo test --locked --workspace
3131
cargo clippy --locked --workspace --all-targets -- -D warnings
32+
cargo fmt --manifest-path tools/agent-memory-eval/Cargo.toml -- --check
33+
cargo test --manifest-path tools/agent-memory-eval/Cargo.toml
34+
cargo clippy --manifest-path tools/agent-memory-eval/Cargo.toml --all-targets -- -D warnings
35+
RUSTDOCFLAGS="-D warnings" cargo doc --locked --workspace --no-deps
36+
37+
msrv:
38+
name: Verify Rust 1.95 MSRV
39+
runs-on: ubuntu-latest
40+
steps:
41+
- name: Checkout
42+
uses: actions/checkout@v7
43+
44+
- name: Install Rust 1.95
45+
uses: dtolnay/rust-toolchain@master
46+
with:
47+
toolchain: 1.95.0
48+
49+
- name: Cache cargo
50+
uses: Swatinem/rust-cache@v2
51+
with:
52+
key: release-msrv-1.95
53+
54+
- name: Check workspace on MSRV
55+
run: cargo check --locked --workspace --all-targets
3256

3357
build:
3458
name: Build ${{ matrix.target }}
35-
needs: verify
59+
needs: [verify, msrv]
3660
runs-on: ${{ matrix.os }}
3761
strategy:
3862
fail-fast: false
@@ -53,7 +77,7 @@ jobs:
5377

5478
steps:
5579
- name: Checkout
56-
uses: actions/checkout@v6
80+
uses: actions/checkout@v7
5781

5882
- name: Install Rust
5983
uses: dtolnay/rust-toolchain@stable
@@ -97,7 +121,7 @@ jobs:
97121
"$hash ${{ matrix.archive }}" | Set-Content -Encoding ascii "dist/${{ matrix.archive }}.sha256"
98122
99123
- name: Upload archive
100-
uses: actions/upload-artifact@v4
124+
uses: actions/upload-artifact@v7
101125
with:
102126
name: ${{ matrix.target }}
103127
path: |
@@ -111,17 +135,27 @@ jobs:
111135
runs-on: ubuntu-latest
112136
steps:
113137
- name: Download archives
114-
uses: actions/download-artifact@v4
138+
uses: actions/download-artifact@v8
115139
with:
116140
path: dist
117141
merge-multiple: true
118142

143+
- name: Prepare checksums
144+
shell: bash
145+
run: |
146+
set -euo pipefail
147+
cat dist/*.sha256 | sort > dist/SHA256SUMS
148+
rm dist/*.sha256
149+
119150
- name: Create or update draft release
120151
env:
121152
GH_TOKEN: ${{ github.token }}
153+
shell: bash
122154
run: |
155+
set -euo pipefail
156+
assets=(dist/*.tar.gz dist/*.zip dist/SHA256SUMS)
123157
if gh release view "${GITHUB_REF_NAME}" >/dev/null 2>&1; then
124-
gh release upload "${GITHUB_REF_NAME}" dist/* --clobber
158+
gh release upload "${GITHUB_REF_NAME}" "${assets[@]}" --clobber
125159
else
126-
gh release create "${GITHUB_REF_NAME}" dist/* --draft --generate-notes --title "${GITHUB_REF_NAME}"
160+
gh release create "${GITHUB_REF_NAME}" "${assets[@]}" --draft --generate-notes --title "${GITHUB_REF_NAME}"
127161
fi

‎QUICKSTART.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ This guide shows the shortest path to a working local Memory Genome store.
44

55
## Use A Release Binary
66

7-
For the public preview release, download the archive for your platform from:
7+
Download the latest release archive for your platform from:
88

99
```text
1010
https://github.com/ECD5A/Memory-Genome-Engine/releases

‎SECURITY.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Memory Genome Engine has a full security and threat-model document in [docs/SECU
44

55
## Supported Versions
66

7-
Security fixes target the current `main` branch and the latest GitHub release candidate when one exists.
7+
Security fixes target the current `main` branch and the latest supported GitHub release.
88

99
## Reporting A Vulnerability
1010

‎docs/RELEASE.md‎

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,7 @@ Use `--help` on either benchmark binary for deeper development-only options. Cor
264264
- `cargo fmt --check` passes.
265265
- `cargo test --locked` passes.
266266
- `cargo clippy --locked --workspace --all-targets -- -D warnings` passes.
267+
- `cargo audit` reports no known vulnerable runtime dependencies.
267268
- `RUSTDOCFLAGS="-D warnings" cargo doc --locked --workspace --no-deps` passes.
268269
- `cargo check --locked -p mge-cli --bins` passes.
269270
- `cargo build --locked -p mge-cli --bin mge --bin mge-mcp-server --release` passes.
@@ -294,7 +295,7 @@ Use `--help` on either benchmark binary for deeper development-only options. Cor
294295

295296
## Tag Release Workflow
296297

297-
`.github/workflows/release.yml` runs only for `v*` tags. It first verifies format, workspace tests, and strict clippy with the locked dependency graph. It then builds checksummed product archives for Windows x86-64, Linux x86-64, macOS Apple Silicon, and macOS Intel, uploads them as workflow artifacts, and creates or updates a **draft** GitHub Release. The workflow includes only `mge` and `mge-mcp-server`; SDK packages and development benchmark binaries are not published. A maintainer must review checksums, notes, and every platform result before publishing the draft.
298+
`.github/workflows/release.yml` runs only for `v*` tags. It verifies format, workspace and eval tests, strict clippy, rustdoc, and Rust 1.95 compatibility with the locked dependency graph. It then builds checksummed product archives for Windows x86-64, Linux x86-64, macOS Apple Silicon, and macOS Intel, uploads them as workflow artifacts, and creates or updates a **draft** GitHub Release with one combined `SHA256SUMS`. The workflow includes only `mge` and `mge-mcp-server`; SDK packages and development benchmark binaries are not published. A maintainer must review checksums, notes, and every platform result before publishing the draft.
298299

299300
Rust crates and both repository-local SDK manifests use version `0.1.0`. Integration schema versioning is independent from package versioning.
300301

@@ -312,14 +313,16 @@ Do not publish packages from this repository until release ownership, versioning
312313

313314
Current recommendation: GitHub release assets are enough for the public preview. Package-manager publishing should wait until Windows, Linux, and macOS preview users have exercised the archives.
314315

315-
## GitHub Preview Release
316+
## GitHub v0.1 Release
316317

317-
For a first public preview, create a draft release from a clean `main` commit after the checklist above passes.
318+
Create the first public `v0.1.0` release from a clean `main` commit after the checklist above passes. Use `v0.1.0-rc.1` first to exercise the complete private tag workflow and exact release archives.
318319

319320
Recommended assets:
320321

321-
- Windows archive from `scripts/build-release.ps1`;
322-
- Linux archive from `scripts/build-release.sh`;
322+
- `mge-windows-x86_64.zip`;
323+
- `mge-linux-x86_64.tar.gz`;
324+
- `mge-macos-aarch64.tar.gz`;
325+
- `mge-macos-x86_64.tar.gz`;
323326
- combined `SHA256SUMS`.
324327

325328
Keep the release product-focused:
@@ -329,15 +332,11 @@ Keep the release product-focused:
329332
- do not upload generated stores, logs, passphrases, private corpus data, or `target/` directories;
330333
- state that macOS is a supported CI/release target but was not executed locally on this Windows development host.
331334

332-
Draft release command shape:
335+
Tag command shape:
333336

334337
```bash
335-
gh release create v0.1.0-preview --draft \
336-
--title "v0.1.0-preview" \
337-
--notes-file release-notes.md \
338-
target/mge-release/archives/mge-windows-x64.zip \
339-
target/mge-release/archives/mge-linux-x86_64.tar.gz \
340-
target/mge-release/archives/SHA256SUMS
338+
git tag -a v0.1.0 -m "Memory Genome Engine v0.1.0"
339+
git push origin v0.1.0
341340
```
342341

343-
Do not publish the draft until the uploaded assets and checksums are reviewed.
342+
The tag workflow creates the draft and uploads all platform archives. Do not publish it until the downloaded assets, checksums, release notes, and platform jobs are reviewed.

‎scripts/build-release.ps1‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,11 @@ $Os = if ([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform([Sys
5858
} else {
5959
"linux"
6060
}
61-
$Arch = [System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture.ToString().ToLowerInvariant()
61+
$Arch = switch ([System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture.ToString().ToLowerInvariant()) {
62+
"x64" { "x86_64" }
63+
"arm64" { "aarch64" }
64+
default { $_ }
65+
}
6266
$LayoutDir = Join-Path $TargetRoot (Join-Path "mge-release" "$Os-$Arch")
6367
$LayoutBinDir = Join-Path $LayoutDir "bin"
6468
$LayoutDocsDir = Join-Path $LayoutDir "docs"

‎scripts/build-release.sh‎

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,24 @@ for name in "${product_bins[@]}"; do
5252
find_bin "$name" >/dev/null
5353
done
5454

55-
platform="$(uname -s | tr '[:upper:]' '[:lower:]')-$(uname -m | tr '[:upper:]' '[:lower:]')"
55+
case "$(uname -s)" in
56+
Linux*) os="linux" ;;
57+
Darwin*) os="macos" ;;
58+
MINGW*|MSYS*|CYGWIN*) os="windows" ;;
59+
*)
60+
echo "unsupported release platform: $(uname -s)" >&2
61+
exit 1
62+
;;
63+
esac
64+
case "$(uname -m)" in
65+
x86_64|amd64) arch="x86_64" ;;
66+
arm64|aarch64) arch="aarch64" ;;
67+
*)
68+
echo "unsupported release architecture: $(uname -m)" >&2
69+
exit 1
70+
;;
71+
esac
72+
platform="$os-$arch"
5673
layout_dir="$target_root/mge-release/$platform"
5774
layout_bin_dir="$layout_dir/bin"
5875
layout_docs_dir="$layout_dir/docs"

0 commit comments

Comments
 (0)