Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
7 changes: 6 additions & 1 deletion .cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ linker = "rust-lld"
rustflags = ["-C", "target-feature=+crt-static"]

[alias]
workshop = "run -p build-workshop --"
installer = "run -p build-installer --"
xtask = "run -p build-xtask --"
# Outlines the workspace with the vibelight checkout next to this repo. Cargo
# builds it in release mode on first use and rebuilds it when its source
Expand All @@ -24,3 +24,8 @@ outline = "run --release --bin vibelight --manifest-path ../vibelight/Cargo.toml
# identifies it.
[env]
CLIPPY_DISABLE_DOCS_LINKS = "1"
# The runvil-workshop checkout `cargo installer` builds from and its tests
# read: the one next to this repo, unless the variable is already set. The
# path is relative to this file's parent's parent, and Cargo passes it on
# as an absolute path.
RUNVIL_WORKSHOP = { value = "../runvil-workshop", relative = true }
21 changes: 0 additions & 21 deletions .cursor/rules/workshop-architecture.mdc

This file was deleted.

22 changes: 0 additions & 22 deletions .cursor/rules/workshop-spa.mdc

This file was deleted.

16 changes: 0 additions & 16 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,3 @@
*.icns binary
*.gguf binary
*.bin binary
# The UI sources are bundled by esbuild; CRLF conversion on Windows
# checkouts would change bundle bytes between platforms.
crates/gateway/config-ui/ui/** text eol=lf
crates/workshop/ui/** text eol=lf
crates/workshop/look/** text eol=lf
crates/workshop/platform/** text eol=lf
# Images are not text; the blanket rules above must not convert them.
crates/gateway/config-ui/ui/**/*.png binary
crates/workshop/ui/**/*.png binary
crates/workshop/look/**/*.png binary
# The event-log schema canary pins the version-1 file exactly as the log
# writer emits it (LF); autocrlf must not rewrite it on Windows checkouts.
crates/workshop/server/tests/it/observer/*.jsonl text eol=lf
# The Gateway discovery contract's golden fixtures are compared byte for
# byte against what the writer emits (LF); a checkout must not rewrite them.
crates/workshop/gateway-discovery/fixtures/*.json text eol=lf
4 changes: 2 additions & 2 deletions .githooks/pre-push
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
set -e

echo "==> Running docs-claims wording scan..."
node --test crates/workshop/ui/test/docs-claims.mjs
node --test tools/docs-claims.mjs

echo "==> Running Clippy on workspace..."
CARGO_BUILD_WARNINGS=deny cargo clippy --workspace --exclude workshop --exclude workshop-server --exclude workshop-server-api --all-targets --all-features
CARGO_BUILD_WARNINGS=deny cargo clippy --workspace --all-targets --all-features

if command -v cargo-deny >/dev/null 2>&1; then
echo "==> Running cargo deny check..."
Expand Down
63 changes: 63 additions & 0 deletions .github/actions/workshop-checkout/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: Check out Workshop
description: >-
Checks out cppalliance/runvil-workshop into runvil-workshop/, at the commit
the root Cargo.toml pins or at the ref given, and sets RUNVIL_WORKSHOP to
the checkout. Run it after the checkout of this repository.

inputs:
ref:
description: >-
The runvil-workshop commit, branch or tag to check out. Empty takes the
commit [workspace.metadata.workshop] pins in the root Cargo.toml.
required: false
default: ""

outputs:
sha:
description: The runvil-workshop commit that was checked out.
value: ${{ steps.report.outputs.sha }}

runs:
using: composite
steps:
# awk, not a TOML parser, because the action runs on every runner image
# and the Python that Ubuntu 22.04 ships has no tomllib. The value must
# then be a full commit id, so a pin the scan misread, a branch name or
# a short id stops the job here.
- name: Read the Workshop pin
id: pin
shell: bash
env:
REF: ${{ inputs.ref }}
run: |
set -euo pipefail
if [ -n "$REF" ]; then
echo "ref=$REF" >> "$GITHUB_OUTPUT"
echo "Workshop ref (given): $REF"
exit 0
fi
rev=$(awk '
/^\[workspace\.metadata\.workshop\]/ { table = 1; next }
/^\[/ { table = 0 }
table && /^rev[ \t]*=/ { gsub(/[ \t"\r]/, ""); sub(/^rev=/, ""); print }
' Cargo.toml)
[[ "$rev" =~ ^[0-9a-f]{40}$ ]] ||
{ echo "[workspace.metadata.workshop] in Cargo.toml must give rev as a 40-digit commit id, got '$rev'"; exit 1; }
echo "ref=$rev" >> "$GITHUB_OUTPUT"
echo "Workshop ref (pinned): $rev"

- uses: actions/checkout@v4
with:
repository: cppalliance/runvil-workshop
ref: ${{ steps.pin.outputs.ref }}
path: runvil-workshop

- name: Report the Workshop checkout
id: report
shell: bash
run: |
set -euo pipefail
sha=$(git -C runvil-workshop rev-parse HEAD)
echo "sha=$sha" >> "$GITHUB_OUTPUT"
echo "RUNVIL_WORKSHOP=$GITHUB_WORKSPACE/runvil-workshop" >> "$GITHUB_ENV"
echo "Workshop SHA: $sha"
1 change: 0 additions & 1 deletion .github/fixtures/workshop-package-smoke/gateway.state.toml

This file was deleted.

9 changes: 0 additions & 9 deletions .github/fixtures/workshop-package-smoke/gateway.toml

This file was deleted.

20 changes: 9 additions & 11 deletions .github/installers/cell.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,20 @@
# are present and that each present one runs, then runs the selection's
# Windows-only check (update, relaunch, rerun, or rejections).
#
# Usage: cell.ps1 <setup> <selection> <version>
# <setup> the NSIS -setup.exe
# <selection> all, workshop, gateway, gateway-stt, or rejections
# <version> the version Workshop must print; the Gateway must print the
# version gateway-pin/pin.json names
# Usage: cell.ps1 <setup> <selection> <version> <gateway-version>
# <setup> the NSIS -setup.exe
# <selection> all, workshop, gateway, gateway-stt, or rejections
# <version> the version Workshop must print
# <gateway-version> the version the Gateway must print: the release the
# Workshop checkout the setup was built from pins
#
# Environment:
# CELL_LOGS write the logs here (default: a new temporary directory)
param(
[Parameter(Mandatory = $true, Position = 0)][string]$Setup,
[Parameter(Mandatory = $true, Position = 1)][string]$Selection,
[Parameter(Mandatory = $true, Position = 2)][string]$Version
[Parameter(Mandatory = $true, Position = 2)][string]$Version,
[Parameter(Mandatory = $true, Position = 3)][string]$GatewayVersion
)
Set-StrictMode -Version Latest
$ErrorActionPreference = 'Stop'
Expand All @@ -36,10 +38,6 @@ if (-not $selections.ContainsKey($Selection)) {
Fail "selection must be all, workshop, gateway, gateway-stt, or rejections; got '$Selection'"
}
$want = $selections[$Selection]
# The setup carries the Gateway release the repository pins.
$pin = Join-Path $PSScriptRoot '..\..\gateway-pin\pin.json'
$gatewayVersion = (Get-Content -LiteralPath $pin -Raw | ConvertFrom-Json).version
if (-not $gatewayVersion) { Fail "$pin names no Gateway version" }

$root = Join-Path $env:LOCALAPPDATA 'Runvil'
$profileDir = Join-Path $env:USERPROFILE '.runvil'
Expand Down Expand Up @@ -278,7 +276,7 @@ function Test-Selection($Want) {
# 3. Every present executable prints the version.
foreach ($check in @(
@{ Wanted = $Want.Workshop; Exe = $workshopExe; Expected = "runvil-workshop $Version" },
@{ Wanted = $Want.Gateway; Exe = $gatewayExe; Expected = "runvil-gateway $gatewayVersion" })) {
@{ Wanted = $Want.Gateway; Exe = $gatewayExe; Expected = "runvil-gateway $GatewayVersion" })) {
if (-not $check.Wanted) { continue }
$output = (& $check.Exe --version | Out-String).Trim()
if ($output -ne $check.Expected) { Fail "$($check.Exe) --version printed '$output', required '$($check.Expected)'" }
Expand Down
19 changes: 9 additions & 10 deletions .github/installers/cell.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@
# selection with the Qt IFW installer, then checks that exactly the selected
# components are present and that each present one runs.
#
# Usage: cell.sh <installer> <selection> <version>
# <installer> the .dmg on macOS, the .run on Linux
# <selection> all, workshop, or gateway
# <version> the version Workshop must print; the Gateway must print the
# version gateway-pin/pin.json names
# Usage: cell.sh <installer> <selection> <version> <gateway-version>
# <installer> the .dmg on macOS, the .run on Linux
# <selection> all, workshop, or gateway
# <version> the version Workshop must print
# <gateway-version> the version the Gateway must print: the release the
# Workshop checkout the installer was built from pins
#
# Environment:
# CELL_ROOT install here (IFW --root) instead of the default location,
Expand All @@ -22,10 +23,12 @@ fail() {
exit 1
}

[ "$#" -eq 3 ] || fail "usage: cell.sh <installer> <all|workshop|gateway> <version>; got $# arguments"
[ "$#" -eq 4 ] || fail "usage: cell.sh <installer> <all|workshop|gateway> <version> <gateway-version>; got $# arguments"
installer=$1
selection=$2
version=$3
gateway_version=$4
[ -n "$gateway_version" ] || fail "the Gateway version is empty"
[ -f "$installer" ] || fail "installer $installer does not exist"
case "$installer" in
/*) ;;
Expand All @@ -43,10 +46,6 @@ esac
ids=""
[ "$want_workshop" = 0 ] || ids="$ids com.runvil.workshop"
[ "$want_gateway" = 0 ] || ids="$ids com.runvil.gateway"
# The installers carry the Gateway release the repository pins.
pin="$(cd "$(dirname "$0")/../.." && pwd)/gateway-pin/pin.json"
gateway_version=$(python3 -c 'import json, sys; print(json.load(open(sys.argv[1]))["version"])' "$pin") ||
fail "cannot read the Gateway version from $pin"

system=$(uname -s)
profile="$HOME/.runvil"
Expand Down
Loading
Loading