Skip to content

Commit 6acb298

Browse files
Merge pull request #2329 from rocketstack-matt/feat/add-calm-suite
2 parents 5b431aa + 077b251 commit 6acb298

538 files changed

Lines changed: 164576 additions & 253 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/CODEOWNERS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010

1111
/shared/ @aidanm3341 @lbulanti-ms @willosborne @grahampacker-ms @jpgough-ms @rocketstack-matt @Thels @LeighFinegold @markscott-ms
1212

13+
/calm-suite/ @opsflowanoop @gjs-opsflo @eddie-knight @rocketstack-matt @markscott-ms @jpgough-ms
14+
1315
# Ownership for dependency-related files at the root level
1416
/package.json @finos/architecture-as-code-maintainers
1517
/package-lock.json @finos/architecture-as-code-maintainers
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: CALM Studio - Automated Release
2+
3+
concurrency:
4+
group: calm-studio-release
5+
cancel-in-progress: false
6+
7+
permissions:
8+
contents: write
9+
issues: write
10+
pull-requests: write
11+
12+
on:
13+
push:
14+
branches:
15+
- main
16+
paths:
17+
- 'calm-suite/calm-studio/**'
18+
workflow_dispatch:
19+
20+
defaults:
21+
run:
22+
working-directory: calm-suite/calm-studio
23+
24+
jobs:
25+
release:
26+
name: Multi-Package Semantic Release
27+
runs-on: ubuntu-latest
28+
steps:
29+
- name: Checkout
30+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
31+
with:
32+
fetch-depth: 0
33+
persist-credentials: false
34+
35+
- name: Setup pnpm
36+
uses: pnpm/action-setup@v4
37+
with:
38+
version: 9
39+
40+
- name: Setup Node.js
41+
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6
42+
with:
43+
node-version: 22
44+
cache: pnpm
45+
cache-dependency-path: calm-suite/calm-studio/pnpm-lock.yaml
46+
registry-url: 'https://registry.npmjs.org'
47+
48+
- name: Install dependencies
49+
run: pnpm install --frozen-lockfile
50+
51+
- name: Build
52+
run: pnpm -r run build
53+
54+
- name: Release
55+
run: pnpm dlx multi-semantic-release
56+
env:
57+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
58+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
name: Build CALM Guard
2+
3+
permissions:
4+
contents: read
5+
6+
on:
7+
pull_request:
8+
branches:
9+
- 'main'
10+
- 'release*'
11+
paths:
12+
- 'calm-suite/calm-guard/**'
13+
- '.github/workflows/build-calm-guard.yml'
14+
push:
15+
branches:
16+
- 'main'
17+
- 'release*'
18+
paths:
19+
- 'calm-suite/calm-guard/**'
20+
- '.github/workflows/build-calm-guard.yml'
21+
22+
defaults:
23+
run:
24+
working-directory: calm-suite/calm-guard
25+
26+
jobs:
27+
lint:
28+
name: Lint & Typecheck
29+
runs-on: ubuntu-latest
30+
steps:
31+
- name: Checkout
32+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
33+
34+
- name: Install pnpm
35+
uses: pnpm/action-setup@v4
36+
with:
37+
package_json_file: calm-suite/calm-guard/package.json
38+
39+
- name: Setup Node.js
40+
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6
41+
with:
42+
node-version: 22
43+
cache: pnpm
44+
cache-dependency-path: calm-suite/calm-guard/pnpm-lock.yaml
45+
46+
- name: Install dependencies
47+
run: pnpm install --frozen-lockfile
48+
49+
- name: Lint
50+
run: pnpm lint
51+
52+
- name: Typecheck
53+
run: pnpm typecheck
54+
55+
test:
56+
name: Test
57+
runs-on: ubuntu-latest
58+
needs: lint
59+
steps:
60+
- name: Checkout
61+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
62+
63+
- name: Install pnpm
64+
uses: pnpm/action-setup@v4
65+
with:
66+
package_json_file: calm-suite/calm-guard/package.json
67+
68+
- name: Setup Node.js
69+
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6
70+
with:
71+
node-version: 22
72+
cache: pnpm
73+
cache-dependency-path: calm-suite/calm-guard/pnpm-lock.yaml
74+
75+
- name: Install dependencies
76+
run: pnpm install --frozen-lockfile
77+
78+
- name: Run tests
79+
run: pnpm test:run
80+
81+
build:
82+
name: Build
83+
runs-on: ubuntu-latest
84+
needs: test
85+
env:
86+
NEXT_SKIP_VALIDATE: "1"
87+
steps:
88+
- name: Checkout
89+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
90+
91+
- name: Install pnpm
92+
uses: pnpm/action-setup@v4
93+
with:
94+
package_json_file: calm-suite/calm-guard/package.json
95+
96+
- name: Setup Node.js
97+
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6
98+
with:
99+
node-version: 22
100+
cache: pnpm
101+
cache-dependency-path: calm-suite/calm-guard/pnpm-lock.yaml
102+
103+
- name: Install dependencies
104+
run: pnpm install --frozen-lockfile
105+
106+
- name: Build
107+
run: pnpm build
Lines changed: 148 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,148 @@
1+
name: Build CALM Studio Desktop
2+
3+
permissions:
4+
contents: write
5+
6+
on:
7+
push:
8+
tags:
9+
- 'calm-studio-v*'
10+
workflow_dispatch:
11+
inputs:
12+
draft:
13+
description: 'Create as draft release'
14+
type: boolean
15+
default: true
16+
17+
defaults:
18+
run:
19+
working-directory: calm-suite/calm-studio
20+
21+
jobs:
22+
build-sidecar:
23+
name: Build MCP Sidecar (${{ matrix.target }})
24+
runs-on: ${{ matrix.os }}
25+
strategy:
26+
matrix:
27+
include:
28+
- os: macos-latest
29+
target: node20-macos-arm64
30+
triple: aarch64-apple-darwin
31+
- os: macos-13
32+
target: node20-macos-x64
33+
triple: x86_64-apple-darwin
34+
- os: ubuntu-22.04
35+
target: node20-linux-x64
36+
triple: x86_64-unknown-linux-gnu
37+
- os: windows-latest
38+
target: node20-win-x64
39+
triple: x86_64-pc-windows-msvc
40+
steps:
41+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
42+
- uses: pnpm/action-setup@v4
43+
with:
44+
version: 9
45+
- uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6
46+
with:
47+
node-version: 22
48+
cache: pnpm
49+
cache-dependency-path: calm-suite/calm-studio/pnpm-lock.yaml
50+
- run: pnpm install --frozen-lockfile
51+
- run: pnpm --filter @calmstudio/calm-core build
52+
- name: Build sidecar
53+
run: |
54+
cd packages/mcp-server
55+
pnpm build:bundle
56+
pnpm dlx @yao-pkg/pkg dist/bundle.cjs --target ${{ matrix.target }} --output dist/calmstudio-mcp
57+
- name: Rename with target triple
58+
shell: bash
59+
run: |
60+
cd packages/mcp-server/dist
61+
if [ "${{ runner.os }}" = "Windows" ]; then
62+
mv calmstudio-mcp.exe calmstudio-mcp-${{ matrix.triple }}.exe
63+
else
64+
mv calmstudio-mcp calmstudio-mcp-${{ matrix.triple }}
65+
fi
66+
- uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7
67+
with:
68+
name: sidecar-${{ matrix.triple }}
69+
path: calm-suite/calm-studio/packages/mcp-server/dist/calmstudio-mcp-*
70+
71+
build-desktop:
72+
name: Build Desktop (${{ matrix.triple }})
73+
needs: build-sidecar
74+
runs-on: ${{ matrix.os }}
75+
strategy:
76+
matrix:
77+
include:
78+
- os: macos-latest
79+
args: --target aarch64-apple-darwin
80+
triple: aarch64-apple-darwin
81+
- os: macos-13
82+
args: --target x86_64-apple-darwin
83+
triple: x86_64-apple-darwin
84+
- os: ubuntu-22.04
85+
args: ''
86+
triple: x86_64-unknown-linux-gnu
87+
- os: windows-latest
88+
args: ''
89+
triple: x86_64-pc-windows-msvc
90+
steps:
91+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
92+
- uses: pnpm/action-setup@v4
93+
with:
94+
version: 9
95+
- uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6
96+
with:
97+
node-version: 22
98+
cache: pnpm
99+
cache-dependency-path: calm-suite/calm-studio/pnpm-lock.yaml
100+
- run: cd calm-suite/calm-studio && pnpm install --frozen-lockfile
101+
102+
- name: Install Linux dependencies
103+
if: runner.os == 'Linux'
104+
run: |
105+
sudo apt-get update
106+
sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf
107+
108+
- name: Install Rust
109+
uses: dtolnay/rust-toolchain@stable
110+
with:
111+
targets: ${{ matrix.triple }}
112+
113+
- name: Rust cache
114+
uses: swatinem/rust-cache@v2
115+
with:
116+
workspaces: calm-suite/calm-studio/apps/studio/src-tauri
117+
118+
- name: Download sidecar binary
119+
uses: actions/download-artifact@v4
120+
with:
121+
name: sidecar-${{ matrix.triple }}
122+
path: calm-suite/calm-studio/apps/studio/src-tauri/binaries/
123+
124+
- name: Make sidecar executable
125+
if: runner.os != 'Windows'
126+
run: chmod +x apps/studio/src-tauri/binaries/calmstudio-mcp-*
127+
128+
- name: Build desktop app
129+
uses: tauri-apps/tauri-action@v0
130+
env:
131+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
132+
APPLE_CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE }}
133+
APPLE_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }}
134+
APPLE_SIGNING_IDENTITY: ${{ secrets.APPLE_SIGNING_IDENTITY }}
135+
APPLE_ID: ${{ secrets.APPLE_ID }}
136+
APPLE_PASSWORD: ${{ secrets.APPLE_PASSWORD }}
137+
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
138+
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }}
139+
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }}
140+
with:
141+
projectPath: calm-suite/calm-studio/apps/studio
142+
tauriScript: pnpm tauri
143+
args: ${{ matrix.args }}
144+
tagName: ${{ github.ref_name }}
145+
releaseName: 'CalmStudio ${{ github.ref_name }}'
146+
releaseBody: 'See the assets below for platform-specific downloads.'
147+
releaseDraft: ${{ github.event.inputs.draft || 'false' }}
148+
prerelease: false

0 commit comments

Comments
 (0)