Skip to content

Commit 155c92f

Browse files
authored
Merge pull request #57 from nikomatsakis/cancel-prompts
VSCode extension improvements + release infrastructure
2 parents ac47595 + 14ee397 commit 155c92f

File tree

828 files changed

+78344
-239
lines changed

Some content is hidden

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

828 files changed

+78344
-239
lines changed

.github/workflows/ci.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,12 @@ jobs:
107107
cache: "npm"
108108
cache-dependency-path: vscode-extension/package-lock.json
109109

110+
- name: Build vendored mynah-ui
111+
working-directory: vendor/mynah-ui
112+
run: |
113+
npm ci
114+
npm run build
115+
110116
- name: Install dependencies
111117
working-directory: vscode-extension
112118
run: npm ci
Lines changed: 189 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,189 @@
1+
name: Release Binaries
2+
3+
# Triggered when release-plz creates a release for symposium-acp-agent
4+
on:
5+
release:
6+
types: [published]
7+
8+
jobs:
9+
build-binaries:
10+
name: Build ${{ matrix.target }}
11+
if: startsWith(github.ref_name, 'symposium-acp-agent-v')
12+
strategy:
13+
matrix:
14+
include:
15+
- target: x86_64-apple-darwin
16+
os: macos-latest
17+
artifact: symposium-darwin-x64
18+
- target: aarch64-apple-darwin
19+
os: macos-latest
20+
artifact: symposium-darwin-arm64
21+
- target: x86_64-unknown-linux-gnu
22+
os: ubuntu-latest
23+
artifact: symposium-linux-x64
24+
- target: aarch64-unknown-linux-gnu
25+
os: ubuntu-latest
26+
artifact: symposium-linux-arm64
27+
- target: x86_64-unknown-linux-musl
28+
os: ubuntu-latest
29+
artifact: symposium-linux-x64-musl
30+
- target: x86_64-pc-windows-msvc
31+
os: windows-latest
32+
artifact: symposium-windows-x64
33+
34+
runs-on: ${{ matrix.os }}
35+
36+
steps:
37+
- uses: actions/checkout@v4
38+
39+
- name: Install Rust
40+
uses: dtolnay/rust-toolchain@stable
41+
with:
42+
targets: ${{ matrix.target }}
43+
44+
- name: Install cross-compilation tools (Linux ARM64)
45+
if: matrix.target == 'aarch64-unknown-linux-gnu'
46+
run: |
47+
sudo apt-get update
48+
sudo apt-get install -y gcc-aarch64-linux-gnu
49+
50+
- name: Install musl tools
51+
if: matrix.target == 'x86_64-unknown-linux-musl'
52+
run: |
53+
sudo apt-get update
54+
sudo apt-get install -y musl-tools
55+
56+
- name: Build
57+
run: cargo build --release --target ${{ matrix.target }} -p symposium-acp-agent
58+
env:
59+
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER: aarch64-linux-gnu-gcc
60+
61+
- name: Package (Unix)
62+
if: runner.os != 'Windows'
63+
run: |
64+
mkdir -p dist
65+
cp target/${{ matrix.target }}/release/symposium-acp-agent dist/
66+
cd dist
67+
tar -czvf ${{ matrix.artifact }}.tar.gz symposium-acp-agent
68+
69+
- name: Package (Windows)
70+
if: runner.os == 'Windows'
71+
run: |
72+
mkdir dist
73+
copy target\${{ matrix.target }}\release\symposium-acp-agent.exe dist\
74+
cd dist
75+
7z a ${{ matrix.artifact }}.zip symposium-acp-agent.exe
76+
77+
- name: Upload to release
78+
uses: softprops/action-gh-release@v1
79+
with:
80+
files: dist/${{ matrix.artifact }}.*
81+
env:
82+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
83+
84+
- name: Upload artifact for VSCode job
85+
uses: actions/upload-artifact@v4
86+
with:
87+
name: ${{ matrix.artifact }}
88+
path: dist/symposium-acp-agent*
89+
90+
build-vscode-extensions:
91+
name: Build VSCode Extensions
92+
needs: build-binaries
93+
runs-on: ubuntu-latest
94+
95+
strategy:
96+
matrix:
97+
include:
98+
- vscode-target: darwin-arm64
99+
artifact: symposium-darwin-arm64
100+
binary: symposium-acp-agent
101+
- vscode-target: darwin-x64
102+
artifact: symposium-darwin-x64
103+
binary: symposium-acp-agent
104+
- vscode-target: linux-x64
105+
artifact: symposium-linux-x64
106+
binary: symposium-acp-agent
107+
- vscode-target: linux-arm64
108+
artifact: symposium-linux-arm64
109+
binary: symposium-acp-agent
110+
- vscode-target: win32-x64
111+
artifact: symposium-windows-x64
112+
binary: symposium-acp-agent.exe
113+
114+
steps:
115+
- uses: actions/checkout@v4
116+
117+
- name: Setup Node.js
118+
uses: actions/setup-node@v4
119+
with:
120+
node-version: "20"
121+
122+
- name: Download binary
123+
uses: actions/download-artifact@v4
124+
with:
125+
name: ${{ matrix.artifact }}
126+
path: vscode-extension/bin/${{ matrix.vscode-target }}
127+
128+
- name: Make binary executable
129+
if: runner.os != 'Windows'
130+
run: chmod +x vscode-extension/bin/${{ matrix.vscode-target }}/${{ matrix.binary }}
131+
132+
- name: Build vendored mynah-ui
133+
working-directory: vendor/mynah-ui
134+
run: |
135+
npm ci
136+
npm run build
137+
138+
- name: Install extension dependencies
139+
working-directory: vscode-extension
140+
run: npm ci
141+
142+
- name: Package extension
143+
working-directory: vscode-extension
144+
run: npx vsce package --target ${{ matrix.vscode-target }}
145+
146+
- name: Upload to release
147+
uses: softprops/action-gh-release@v1
148+
with:
149+
files: vscode-extension/*.vsix
150+
env:
151+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
152+
153+
- name: Upload vsix artifact
154+
uses: actions/upload-artifact@v4
155+
with:
156+
name: vsix-${{ matrix.vscode-target }}
157+
path: vscode-extension/*.vsix
158+
159+
publish-vscode-marketplace:
160+
name: Publish to VSCode Marketplace
161+
needs: build-vscode-extensions
162+
runs-on: ubuntu-latest
163+
steps:
164+
- name: Download all vsix artifacts
165+
uses: actions/download-artifact@v4
166+
with:
167+
pattern: vsix-*
168+
merge-multiple: true
169+
170+
- name: Publish to marketplace
171+
run: npx vsce publish --packagePath *.vsix
172+
env:
173+
VSCE_PAT: ${{ secrets.VSCE_PAT }}
174+
175+
publish-open-vsx:
176+
name: Publish to Open VSX
177+
needs: build-vscode-extensions
178+
runs-on: ubuntu-latest
179+
steps:
180+
- name: Download all vsix artifacts
181+
uses: actions/download-artifact@v4
182+
with:
183+
pattern: vsix-*
184+
merge-multiple: true
185+
186+
- name: Publish to Open VSX
187+
run: npx ovsx publish *.vsix
188+
env:
189+
OVSX_PAT: ${{ secrets.OVSX_PAT }}

.github/workflows/release-plz.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Release-plz
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
release-plz-release:
10+
name: Release-plz release
11+
runs-on: ubuntu-latest
12+
if: ${{ github.repository_owner == 'symposium-dev' }}
13+
permissions:
14+
contents: write
15+
id-token: write
16+
steps:
17+
- &checkout
18+
name: Checkout repository
19+
uses: actions/checkout@v5
20+
with:
21+
fetch-depth: 0
22+
persist-credentials: true
23+
token: ${{ secrets.RELEASE_PLZ_TOKEN }}
24+
- &install-rust
25+
name: Install Rust toolchain
26+
uses: dtolnay/rust-toolchain@stable
27+
- name: Run release-plz
28+
uses: release-plz/[email protected]
29+
with:
30+
command: release
31+
env:
32+
GITHUB_TOKEN: ${{ secrets.RELEASE_PLZ_TOKEN }}
33+
34+
release-plz-pr:
35+
name: Release-plz PR
36+
runs-on: ubuntu-latest
37+
if: ${{ github.repository_owner == 'symposium-dev' }}
38+
permissions:
39+
pull-requests: write
40+
contents: write
41+
concurrency:
42+
group: release-plz-${{ github.ref }}
43+
cancel-in-progress: false
44+
steps:
45+
- *checkout
46+
- *install-rust
47+
- name: Run release-plz
48+
uses: release-plz/[email protected]
49+
with:
50+
command: release-pr
51+
env:
52+
GITHUB_TOKEN: ${{ secrets.RELEASE_PLZ_TOKEN }}

book.toml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@ title = "Symposium"
77
[preprocessor.mermaid]
88
command = "mdbook-mermaid"
99

10-
[preprocessor.rfd]
11-
command = "cargo run -p md-rfd-preprocessor --"
12-
1310
[output]
1411

1512
[output.html]

md/SUMMARY.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
# Design and implementation
1919

2020
- [Overview](./design/implementation-overview.md)
21+
- [Distribution](./design/distribution.md)
2122
- [Components](./design/components.md)
2223
- [Rust Crate Sources](./design/rust-crate-sources.md)
2324
- [VSCode Extension](./design/vscode-extension/architecture.md)
@@ -27,6 +28,7 @@
2728
- [Webview Lifecycle](./design/vscode-extension/webview-lifecycle.md)
2829
- [Testing](./design/vscode-extension/testing.md)
2930
- [Testing Implementation](./design/vscode-extension/testing-implementation.md)
31+
- [Packaging](./design/vscode-extension/packaging.md)
3032
- [Implementation Status](./design/vscode-extension/implementation-status.md)
3133

3234
# References

md/design/distribution.md

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
# Distribution
2+
3+
This chapter documents how Symposium is released and distributed across platforms.
4+
5+
## Release Orchestration
6+
7+
Releases are triggered by [release-plz](https://release-plz.dev/), which:
8+
9+
1. Creates a release PR when changes accumulate on `main`
10+
2. When merged, publishes to crates.io and creates GitHub releases with tags
11+
12+
The `symposium-acp-agent-v*` tag triggers the binary release workflow.
13+
14+
## Distribution Channels
15+
16+
```
17+
release-plz creates tag
18+
19+
┌───────────────────────────────────────┐
20+
│ GitHub Release │
21+
│ - Binary archives (all platforms) │
22+
│ - VSCode .vsix files │
23+
│ - Source reference │
24+
└───────────────────────────────────────┘
25+
26+
┌─────────────┬─────────────┬───────────┐
27+
│ crates.io │ VSCode │ Zed │
28+
│ │ Marketplace │Extensions │
29+
│ │ + Open VSX │ │
30+
└─────────────┴─────────────┴───────────┘
31+
```
32+
33+
### crates.io
34+
35+
The Rust crates are published directly by release-plz. Users can install via:
36+
```bash
37+
cargo install symposium-acp-agent
38+
```
39+
40+
### VSCode Marketplace / Open VSX
41+
42+
Platform-specific extensions are built and published automatically. Each platform gets its own ~7MB extension containing only that platform's binary.
43+
44+
See [VSCode Packaging](./vscode-extension/packaging.md) for details.
45+
46+
### Zed Extensions
47+
48+
The Zed extension (`zed-extension/`) points to GitHub release archives. Publishing requires submitting a PR to the [zed-industries/extensions](https://github.com/zed-industries/extensions) repository.
49+
50+
### Direct Download
51+
52+
Binary archives are attached to each GitHub release for direct download:
53+
- `symposium-darwin-arm64.tar.gz`
54+
- `symposium-darwin-x64.tar.gz`
55+
- `symposium-linux-x64.tar.gz`
56+
- `symposium-linux-arm64.tar.gz`
57+
- `symposium-linux-x64-musl.tar.gz`
58+
- `symposium-windows-x64.zip`
59+
60+
## Supported Platforms
61+
62+
| Platform | Architecture | Notes |
63+
|----------|--------------|-------|
64+
| macOS | arm64 (Apple Silicon) | Primary development platform |
65+
| macOS | x64 (Intel) | |
66+
| Linux | x64 (glibc) | Standard Linux distributions |
67+
| Linux | arm64 | ARM servers, Raspberry Pi |
68+
| Linux | x64 (musl) | Static binary, Alpine Linux |
69+
| Windows | x64 | |
70+
71+
## Secrets Required
72+
73+
The release workflow requires these GitHub secrets:
74+
75+
| Secret | Purpose |
76+
|--------|---------|
77+
| `RELEASE_PLZ_TOKEN` | GitHub token for release-plz to create releases |
78+
| `VSCE_PAT` | Azure DevOps PAT for VSCode Marketplace |
79+
| `OVSX_PAT` | Open VSX access token |

0 commit comments

Comments
 (0)