Skip to content

Commit 628fef3

Browse files
committed
Bootstrap Linux/macOS binary packaging scaffolding
1 parent 43866d8 commit 628fef3

24 files changed

Lines changed: 552 additions & 0 deletions

.github/workflows/build.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: build
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
workflow_dispatch:
8+
9+
jobs:
10+
build-and-verify:
11+
runs-on: ubuntu-latest
12+
env:
13+
VERSION: 0.0.0-dev
14+
steps:
15+
- uses: actions/checkout@v4
16+
17+
- uses: actions/setup-node@v4
18+
with:
19+
node-version: 20
20+
21+
- name: Build mock binaries
22+
run: npm run ci:build
23+
24+
- name: Stage packages
25+
run: npm run ci:stage
26+
27+
- name: Generate manifest
28+
run: npm run ci:manifest
29+
30+
- name: Verify artifacts
31+
run: npm run ci:verify
32+
33+
- name: Upload manifest
34+
uses: actions/upload-artifact@v4
35+
with:
36+
name: manifests
37+
path: manifests/*.json

.github/workflows/release.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: release
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
version:
7+
description: Release version (example 0.15.0)
8+
required: true
9+
dry_run:
10+
description: Run npm publish in dry-run mode
11+
required: true
12+
default: "true"
13+
14+
jobs:
15+
release:
16+
runs-on: ubuntu-latest
17+
env:
18+
VERSION: ${{ inputs.version }}
19+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
20+
steps:
21+
- uses: actions/checkout@v4
22+
23+
- uses: actions/setup-node@v4
24+
with:
25+
node-version: 20
26+
registry-url: https://registry.npmjs.org
27+
28+
- name: Build artifacts
29+
run: npm run ci:build
30+
31+
- name: Stage packages
32+
run: npm run ci:stage
33+
34+
- name: Generate manifest
35+
run: npm run ci:manifest
36+
37+
- name: Verify artifacts
38+
run: npm run ci:verify
39+
40+
- name: Publish all packages (dry run)
41+
if: ${{ inputs.dry_run == 'true' }}
42+
run: npm run release:dry-run
43+
44+
- name: Publish all packages
45+
if: ${{ inputs.dry_run != 'true' }}
46+
run: ./scripts/publish-all.sh

.github/workflows/verify.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: verify
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
version:
7+
description: Version to verify
8+
required: true
9+
10+
jobs:
11+
verify:
12+
runs-on: ubuntu-latest
13+
env:
14+
VERSION: ${{ inputs.version }}
15+
steps:
16+
- uses: actions/checkout@v4
17+
- uses: actions/setup-node@v4
18+
with:
19+
node-version: 20
20+
- run: npm run ci:build
21+
- run: npm run ci:stage
22+
- run: npm run ci:manifest
23+
- run: npm run ci:verify

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
node_modules/
2+
.DS_Store
3+
*.log
4+
dist/
5+
*.tgz
6+
packages/*/bin/
7+
manifests/*.json

CONTRIBUTING.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Contributing
2+
3+
## Requirements
4+
- Node.js 20+
5+
- npm 10+
6+
- Bash
7+
8+
## Local Validation
9+
```bash
10+
VERSION=0.0.0-dev npm run ci:build
11+
VERSION=0.0.0-dev npm run ci:stage
12+
VERSION=0.0.0-dev npm run ci:manifest
13+
VERSION=0.0.0-dev npm run ci:verify
14+
```
15+
16+
## Notes
17+
- Windows is not supported.
18+
- Keep package versions exactly aligned across all platform packages.
19+
- Do not publish partial target sets.

README.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# xsnap-worker-binaries
2+
3+
Prebuilt `xsnap-worker` binary packages for `@agoric/xsnap`.
4+
5+
## Support Matrix
6+
- `linux-x64`
7+
- `linux-arm64`
8+
- `darwin-x64`
9+
- `darwin-arm64`
10+
11+
Windows is not supported.
12+
13+
## Package Names
14+
- `@agoric/xsnap-linux-x64`
15+
- `@agoric/xsnap-linux-arm64`
16+
- `@agoric/xsnap-darwin-x64`
17+
- `@agoric/xsnap-darwin-arm64`
18+
19+
## Repository Layout
20+
- `packages/`: platform npm packages.
21+
- `scripts/`: build, stage, verify, and publish scripts.
22+
- `manifests/`: generated SHA256 manifests.
23+
- `.github/workflows/`: CI, verify, and release workflows.
24+
25+
## Release Contract
26+
For version `X.Y.Z`:
27+
1. Publish all four platform packages at `X.Y.Z`.
28+
2. Verify package availability on npm.
29+
3. Unblock `@agoric/xsnap@X.Y.Z` release in agoric-sdk.
30+
31+
## Quick Start
32+
```bash
33+
npm run ci:build
34+
npm run ci:stage
35+
npm run ci:manifest
36+
npm run ci:verify
37+
```
38+
39+
`ci:build` uses mock artifacts by default for bootstrap validation. Real native build integration should replace mock generation in `scripts/build-target.sh`.

RELEASE.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Release Process
2+
3+
## Preconditions
4+
- All CI checks pass on `main`.
5+
- Four supported packages are ready to publish at the same version.
6+
- `NPM_TOKEN` is configured in GitHub Actions secrets.
7+
8+
## Dry Run
9+
```bash
10+
VERSION=X.Y.Z npm run ci:build
11+
VERSION=X.Y.Z npm run ci:stage
12+
VERSION=X.Y.Z npm run ci:manifest
13+
VERSION=X.Y.Z npm run ci:verify
14+
VERSION=X.Y.Z npm run release:dry-run
15+
```
16+
17+
## Publish
18+
```bash
19+
VERSION=X.Y.Z ./scripts/publish-all.sh
20+
```
21+
22+
## Post-publish
23+
- Confirm all four package versions are visible on npm.
24+
- Publish/share `manifests/X.Y.Z.json` for agoric-sdk consumption.

manifests/.gitkeep

Whitespace-only changes.

package.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"name": "xsnap-worker-binaries",
3+
"private": true,
4+
"version": "0.0.0",
5+
"description": "Prebuilt xsnap-worker platform packages",
6+
"license": "Apache-2.0",
7+
"scripts": {
8+
"ci:build": "./scripts/build-all.sh --mock",
9+
"ci:stage": "./scripts/stage-packages.sh",
10+
"ci:manifest": "./scripts/generate-manifest.sh",
11+
"ci:verify": "./scripts/verify-artifacts.sh",
12+
"release:dry-run": "./scripts/publish-all.sh --dry-run"
13+
}
14+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# @agoric/xsnap-darwin-arm64
2+
3+
Prebuilt `xsnap-worker` binary package for macOS arm64.

0 commit comments

Comments
 (0)