Skip to content

Commit 236a6d8

Browse files
committed
merge: release CellScript public registry
# Conflicts: # Cargo.lock # Cargo.toml # README.md # docs/README.md # docs/wiki/Home.md # docs/wiki/Tutorial-06-Metadata-Verification-and-Production-Gates.md # src/assumptions.rs # src/cli/commands.rs # src/codegen/assembler.rs # src/codegen/mod.rs # src/lib.rs # src/main.rs # tests/v0_16.rs
2 parents 42693f1 + 293c2db commit 236a6d8

595 files changed

Lines changed: 341333 additions & 53179 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.github/workflows/release.yml‎

Lines changed: 197 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,197 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*"
7+
workflow_dispatch:
8+
inputs:
9+
version:
10+
description: "Release version (without v prefix)"
11+
required: true
12+
13+
concurrency:
14+
group: cellscript-release-${{ github.ref }}
15+
cancel-in-progress: true
16+
17+
env:
18+
CARGO_INCREMENTAL: "0"
19+
20+
jobs:
21+
build:
22+
name: Build ${{ matrix.target }}
23+
runs-on: ${{ matrix.os }}
24+
strategy:
25+
fail-fast: false
26+
matrix:
27+
include:
28+
- target: x86_64-apple-darwin
29+
os: macos-latest
30+
- target: aarch64-apple-darwin
31+
os: macos-latest
32+
- target: x86_64-unknown-linux-musl
33+
os: ubuntu-latest
34+
- target: aarch64-unknown-linux-musl
35+
os: ubuntu-latest
36+
steps:
37+
- name: Check out repository
38+
uses: actions/checkout@v4
39+
40+
- name: Install Rust toolchain
41+
uses: dtolnay/rust-toolchain@stable
42+
with:
43+
toolchain: "1.85.0"
44+
targets: ${{ matrix.target }}
45+
46+
- name: Install Linux cross-compilation tools
47+
if: matrix.target == 'aarch64-unknown-linux-musl'
48+
run: |
49+
sudo apt-get update
50+
sudo apt-get install -y gcc-aarch64-linux-gnu musl-tools
51+
52+
- name: Install Linux x86_64 musl tools
53+
if: matrix.target == 'x86_64-unknown-linux-musl'
54+
run: |
55+
sudo apt-get update
56+
sudo apt-get install -y musl-tools
57+
58+
- name: Build cellc
59+
env:
60+
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_MUSL_LINKER: aarch64-linux-gnu-gcc
61+
run: cargo build --locked --release --bin cellc --target ${{ matrix.target }}
62+
63+
- name: Package archive
64+
id: package
65+
run: |
66+
VERSION="${GITHUB_REF_NAME#v}"
67+
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
68+
VERSION="${{ github.event.inputs.version }}"
69+
fi
70+
ARCHIVE="cellscript-${VERSION}-${{ matrix.target }}.tar.gz"
71+
cp "target/${{ matrix.target }}/release/cellc" cellc
72+
tar czf "$ARCHIVE" cellc
73+
printf 'archive=%s\n' "$ARCHIVE" >> "$GITHUB_OUTPUT"
74+
printf 'version=%s\n' "$VERSION" >> "$GITHUB_OUTPUT"
75+
76+
- name: Compute SHA256
77+
run: |
78+
sha256sum "${{ steps.package.outputs.archive }}" > SHA256SUMS.${{ matrix.target }}
79+
80+
- name: Upload artifact
81+
uses: actions/upload-artifact@v4
82+
with:
83+
name: cellscript-${{ matrix.target }}
84+
path: |
85+
*.tar.gz
86+
SHA256SUMS.*
87+
88+
release:
89+
name: Create GitHub Release
90+
needs: build
91+
runs-on: ubuntu-latest
92+
permissions:
93+
contents: write
94+
steps:
95+
- name: Check out repository
96+
uses: actions/checkout@v4
97+
98+
- name: Download all artifacts
99+
uses: actions/download-artifact@v4
100+
with:
101+
path: artifacts
102+
merge-multiple: false
103+
104+
- name: Merge SHA256SUMS
105+
run: |
106+
cat artifacts/*/SHA256SUMS.* > SHA256SUMS
107+
# Normalize filenames: strip per-target suffix
108+
sed -i 's/SHA256SUMS\.[a-z0-9_-]* / /' SHA256SUMS
109+
110+
- name: Determine version
111+
id: version
112+
run: |
113+
VERSION="${GITHUB_REF_NAME#v}"
114+
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
115+
VERSION="${{ github.event.inputs.version }}"
116+
fi
117+
printf 'version=%s\n' "$VERSION" >> "$GITHUB_OUTPUT"
118+
119+
- name: Create GitHub Release
120+
uses: softprops/action-gh-release@v2
121+
with:
122+
tag_name: v${{ steps.version.outputs.version }}
123+
name: CellScript ${{ steps.version.outputs.version }}
124+
draft: false
125+
prerelease: ${{ contains(steps.version.outputs.version, '-') }}
126+
generate_release_notes: true
127+
files: |
128+
scripts/install.sh
129+
artifacts/**/*.tar.gz
130+
SHA256SUMS
131+
body: |
132+
## Installation
133+
134+
### One-line install (Global)
135+
136+
```bash
137+
curl -fsSL https://raw.githubusercontent.com/${{ github.repository }}/main/scripts/install.sh | sh
138+
```
139+
140+
### One-line install (China mainland)
141+
142+
If `raw.githubusercontent.com` is unreachable, use a GitHub proxy:
143+
144+
```bash
145+
curl -fsSL https://ghgo.xyz/https://raw.githubusercontent.com/${{ github.repository }}/main/scripts/install.sh | sh
146+
```
147+
148+
Or force a specific mirror for binary downloads:
149+
150+
```bash
151+
CELLSCRIPT_MIRROR=ghgo curl -fsSL https://ghgo.xyz/https://raw.githubusercontent.com/${{ github.repository }}/main/scripts/install.sh | sh
152+
```
153+
154+
Available mirrors: `ghgo` (ghgo.xyz), `ghproxy` (gh-proxy.com), `ghfast` (ghfast.top)
155+
156+
### Install specific version
157+
158+
```bash
159+
CELLSCRIPT_VERSION=${{ steps.version.outputs.version }} curl -fsSL https://raw.githubusercontent.com/${{ github.repository }}/main/scripts/install.sh | sh
160+
```
161+
162+
### Alternative: cargo install
163+
164+
```bash
165+
cargo install cellscript
166+
```
167+
168+
---
169+
170+
## Manual download
171+
172+
| Platform | Archive |
173+
|----------|---------|
174+
| macOS (Apple Silicon) | `cellscript-${{ steps.version.outputs.version }}-aarch64-apple-darwin.tar.gz` |
175+
| macOS (Intel) | `cellscript-${{ steps.version.outputs.version }}-x86_64-apple-darwin.tar.gz` |
176+
| Linux (x86_64) | `cellscript-${{ steps.version.outputs.version }}-x86_64-unknown-linux-musl.tar.gz` |
177+
| Linux (ARM64) | `cellscript-${{ steps.version.outputs.version }}-aarch64-unknown-linux-musl.tar.gz` |
178+
179+
Unpack and add to PATH:
180+
```bash
181+
tar xzf cellscript-*.tar.gz
182+
mkdir -p ~/.cellscript/bin && mv cellc ~/.cellscript/bin/
183+
export PATH="$HOME/.cellscript/bin:$PATH"
184+
```
185+
186+
Verify: `cellc --version`
187+
188+
---
189+
190+
## Environment variables
191+
192+
| Variable | Default | Description |
193+
|----------|---------|-------------|
194+
| `CELLSCRIPT_HOME` | `~/.cellscript` | Installation directory |
195+
| `CELLSCRIPT_VERSION` | latest | Install a specific version |
196+
| `CELLSCRIPT_MIRROR` | `auto` | Mirror: `auto`, `direct`, `ghgo`, `ghproxy`, `ghfast` |
197+
| `CELLSCRIPT_DRY_RUN` | `0` | Set to `1` to preview without installing |
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: Website Build
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- main
8+
- master
9+
- "nightly-*"
10+
workflow_dispatch:
11+
12+
concurrency:
13+
group: website-build-${{ github.ref }}
14+
cancel-in-progress: true
15+
16+
jobs:
17+
build:
18+
runs-on: ubuntu-latest
19+
timeout-minutes: 15
20+
steps:
21+
- name: Check out repository
22+
uses: actions/checkout@v4
23+
24+
- name: Set up Python
25+
uses: actions/setup-python@v5
26+
with:
27+
python-version: "3.12"
28+
29+
- name: Set up Node.js
30+
uses: actions/setup-node@v4
31+
with:
32+
node-version: "22"
33+
cache: "npm"
34+
cache-dependency-path: website/package-lock.json
35+
36+
- name: Install website dependencies
37+
run: npm --prefix website ci
38+
39+
- name: Generate registry website data
40+
run: npm --prefix website run prepare:registry
41+
42+
- name: Check generated registry data is committed
43+
run: |
44+
if [[ -n "$(git status --porcelain -- website/src/data/registry-packages.json)" ]]; then
45+
echo "website/src/data/registry-packages.json is stale or missing"
46+
git status --short -- website/src/data/registry-packages.json
47+
git diff -- website/src/data/registry-packages.json
48+
exit 1
49+
fi
50+
51+
- name: Build website
52+
run: npm --prefix website run build
53+
54+
- name: Upload website dist
55+
uses: actions/upload-artifact@v4
56+
with:
57+
name: cellscript-website-dist
58+
path: website/dist/
59+
if-no-files-found: error
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: Website Data Refresh
2+
3+
# Refreshes the build-time data (GitHub releases, commits, provenance,
4+
# pipeline fragments) that the website sidebar and sections display.
5+
# Runs 3x daily so the sidebar always shows recent activity without
6+
# anyone manually running the scripts.
7+
8+
on:
9+
schedule:
10+
# 3x daily: 00:00, 08:00, 16:00 UTC
11+
- cron: "0 0,8,16 * * *"
12+
workflow_dispatch:
13+
14+
permissions:
15+
contents: write
16+
17+
concurrency:
18+
group: website-data-refresh
19+
cancel-in-progress: true
20+
21+
jobs:
22+
refresh:
23+
runs-on: ubuntu-latest
24+
timeout-minutes: 10
25+
steps:
26+
- name: Check out repository
27+
uses: actions/checkout@v4
28+
29+
- name: Set up Python
30+
uses: actions/setup-python@v5
31+
with:
32+
python-version: "3.12"
33+
34+
- name: Fetch GitHub activity data
35+
run: python3 website/scripts/fetch-github-data.py
36+
37+
- name: Check for changes
38+
id: changes
39+
run: |
40+
if git diff --quiet website/src/data/github-activity.json; then
41+
echo "changed=false" >> "$GITHUB_OUTPUT"
42+
else
43+
echo "changed=true" >> "$GITHUB_OUTPUT"
44+
fi
45+
46+
- name: Commit refreshed data
47+
if: steps.changes.outputs.changed == 'true'
48+
run: |
49+
git config user.name "github-actions[bot]"
50+
git config user.email "github-actions[bot]@users.noreply.github.com"
51+
git add website/src/data/github-activity.json
52+
git commit -m "chore(website): refresh GitHub activity data [skip ci]
53+
54+
Auto-generated by website-data-refresh workflow.
55+
Fetched: $(date -u '+%Y-%m-%d %H:%M UTC')"
56+
git push

‎.gitignore‎

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
/target/
2+
node_modules/
3+
dist/
4+
services/registry-api/dist/
25
editors/vscode-cellscript/dist/
36

47
.DS_Store
58
.vscode/
69
.cap/
10+
.wrangler/
711
__pycache__/
812
*.py[cod]
913
*.swp
@@ -12,6 +16,10 @@ __pycache__/
1216
*.s
1317
*.elf
1418
*.wasm
19+
# The prebuilt WASM bundle for the website playground is a committed
20+
# build artifact (rebuilt via website/scripts/build-wasm.sh), so it
21+
# must be tracked despite the global *.wasm ignore above.
22+
!website/public/wasm/*.wasm
1523
*.meta.json
1624

1725
.cell/
@@ -36,7 +44,13 @@ proposals/novaseal/*
3644
!proposals/novaseal/dual-seal-profile-v0/**
3745
!proposals/novaseal/fiber-candidate-profile-v0/
3846
!proposals/novaseal/fiber-candidate-profile-v0/**
47+
!proposals/evolving-dob/
48+
proposals/evolving-dob/*
49+
!proposals/evolving-dob/evolving-dob-profile-v1/
50+
!proposals/evolving-dob/evolving-dob-profile-v1/**
51+
!proposals/evolving-dob/evolving-dob-profile-v1/Cell.lock
3952
proposals/novaseal/v0-mvp-skeleton/build/
53+
proposals/novaseal/**/.cell/
4054
proposals/novaseal/v0-mvp-skeleton/target/
4155
proposals/novaseal/v0-mvp-skeleton/src/.cell/
4256
proposals/novaseal/v0-mvp-skeleton/scripts/__pycache__/
@@ -66,6 +80,16 @@ proposals/novaseal/**/*.py[cod]
6680
proposals/novaseal/**/*.s
6781
proposals/novaseal/**/*.elf
6882
proposals/novaseal/**/*.meta.json
83+
proposals/evolving-dob/evolving-dob-profile-v1/build/
84+
proposals/evolving-dob/evolving-dob-profile-v1/target/
85+
proposals/evolving-dob/evolving-dob-profile-v1/.cell/
86+
proposals/evolving-dob/evolving-dob-profile-v1/src/.cell/
87+
proposals/evolving-dob/evolving-dob-profile-v1/scripts/__pycache__/
88+
proposals/evolving-dob/evolving-dob-profile-v1/.DS_Store
89+
proposals/evolving-dob/evolving-dob-profile-v1/**/*.py[cod]
90+
proposals/evolving-dob/evolving-dob-profile-v1/**/*.s
91+
proposals/evolving-dob/evolving-dob-profile-v1/**/*.elf
92+
proposals/evolving-dob/evolving-dob-profile-v1/**/*.meta.json
6993

7094
# Keep translated prose out of the CellScript repository by default.
7195
# README_CH.md is the one maintained Chinese document.

0 commit comments

Comments
 (0)