Skip to content

Commit 1774acf

Browse files
committed
refactor: extract cortex-gui to separate repository
- Removed cortex-gui from workspace members - Removed src/cortex-gui/ directory (migrated to github.com/CortexLM/cortex-gui) - Updated CI workflows to remove GUI-related jobs - Updated release workflow to only build CLI binaries The GUI is now maintained in a separate private repository: https://github.com/CortexLM/cortex-gui
1 parent 8962b4e commit 1774acf

File tree

11,138 files changed

+302
-1252112
lines changed

Some content is hidden

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

11,138 files changed

+302
-1252112
lines changed

.github/workflows/ci.yml

Lines changed: 5 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ jobs:
9191
shared-key: ${{ needs.setup-cache.outputs.cache-key }}
9292

9393
- name: Run clippy
94-
run: cargo +nightly clippy --workspace --all-targets --all-features --exclude cortex-gui -- -D warnings
94+
run: cargo +nightly clippy --workspace --all-targets --all-features -- -D warnings
9595

9696
# ==========================================================================
9797
# Test jobs - Matrix for all platforms (32 vCPU for compilation)
@@ -137,7 +137,7 @@ jobs:
137137
shared-key: ${{ needs.setup-cache.outputs.cache-key }}
138138

139139
- name: Run tests
140-
run: cargo +nightly test --workspace --all-features --exclude cortex-gui
140+
run: cargo +nightly test --workspace --all-features
141141
env:
142142
RUSTFLAGS: "-Zthreads=32"
143143

@@ -185,79 +185,7 @@ jobs:
185185
shared-key: ${{ needs.setup-cache.outputs.cache-key }}
186186

187187
- name: Check build
188-
run: cargo +nightly check --workspace --all-features --exclude cortex-gui
189-
env:
190-
RUSTFLAGS: "-Zthreads=32"
191-
192-
# ==========================================================================
193-
# GUI Check - All platforms (32 vCPU for compilation)
194-
# ==========================================================================
195-
gui-check:
196-
name: GUI Check (${{ matrix.name }})
197-
runs-on: ${{ matrix.runner }}
198-
needs: setup-cache
199-
strategy:
200-
fail-fast: false
201-
matrix:
202-
include:
203-
- name: ubuntu
204-
runner: blacksmith-32vcpu-ubuntu-2404
205-
- name: macos
206-
runner: macos-latest
207-
- name: windows
208-
runner: blacksmith-32vcpu-windows-2025
209-
steps:
210-
- uses: actions/checkout@v4
211-
212-
- uses: actions/setup-node@v4
213-
with:
214-
node-version: "20"
215-
cache: "npm"
216-
cache-dependency-path: src/cortex-gui/package-lock.json
217-
218-
- name: Install Linux dependencies
219-
if: matrix.name == 'ubuntu'
220-
run: |
221-
sudo apt-get update
222-
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf libglib2.0-dev libasound2-dev
223-
224-
- name: Cache npm (Blacksmith 4x faster cache)
225-
uses: actions/cache@v4
226-
with:
227-
path: |
228-
cortex-gui/node_modules
229-
~/.npm
230-
key: npm-${{ matrix.name }}-${{ hashFiles('src/cortex-gui/package-lock.json') }}
231-
restore-keys: |
232-
npm-${{ matrix.name }}-
233-
234-
- name: Install frontend dependencies
235-
working-directory: src/cortex-gui
236-
run: npm ci
237-
238-
- name: Build frontend
239-
working-directory: src/cortex-gui
240-
run: npm run build
241-
242-
- name: Install Rust nightly
243-
uses: dtolnay/rust-toolchain@nightly
244-
245-
- name: Setup Rust cache (Blacksmith optimized)
246-
if: contains(matrix.runner, 'blacksmith')
247-
uses: useblacksmith/rust-cache@v3
248-
with:
249-
prefix-key: "rust-gui-${{ matrix.name }}"
250-
shared-key: ${{ needs.setup-cache.outputs.cache-key }}
251-
252-
- name: Setup Rust cache (non-Blacksmith)
253-
if: "!contains(matrix.runner, 'blacksmith')"
254-
uses: Swatinem/rust-cache@v2
255-
with:
256-
prefix-key: "rust-gui-${{ matrix.name }}"
257-
shared-key: ${{ needs.setup-cache.outputs.cache-key }}
258-
259-
- name: Check GUI build
260-
run: cargo +nightly check -p cortex-gui
188+
run: cargo +nightly check --workspace --all-features
261189
env:
262190
RUSTFLAGS: "-Zthreads=32"
263191

@@ -291,7 +219,7 @@ jobs:
291219
ci-success:
292220
name: CI Success
293221
runs-on: blacksmith-4vcpu-ubuntu-2404
294-
needs: [version-check, fmt, clippy, test, build-check, gui-check, audit]
222+
needs: [version-check, fmt, clippy, test, build-check, audit]
295223
if: always()
296224
steps:
297225
- name: Check all jobs
@@ -302,8 +230,7 @@ jobs:
302230
"${{ needs.fmt.result }}" == "failure" || \
303231
"${{ needs.clippy.result }}" == "failure" || \
304232
"${{ needs.test.result }}" == "failure" || \
305-
"${{ needs.build-check.result }}" == "failure" || \
306-
"${{ needs.gui-check.result }}" == "failure" ]]; then
233+
"${{ needs.build-check.result }}" == "failure" ]]; then
307234
echo "One or more jobs failed"
308235
exit 1
309236
fi

.github/workflows/release.yml

Lines changed: 3 additions & 185 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,11 @@ on:
55
tags:
66
- 'v*'
77
- 'cli-v*'
8-
- 'gui-v*'
98
workflow_dispatch:
109
inputs:
1110
version:
1211
description: 'Version to release (e.g., 0.1.0)'
1312
required: true
14-
release_type:
15-
description: 'Release type'
16-
required: true
17-
type: choice
18-
options:
19-
- both
20-
- cli
21-
- gui
2213

2314
env:
2415
CARGO_TERM_COLOR: always
@@ -49,8 +40,6 @@ jobs:
4940
outputs:
5041
version: ${{ steps.version.outputs.version }}
5142
tag: ${{ steps.version.outputs.tag }}
52-
build_cli: ${{ steps.version.outputs.build_cli }}
53-
build_gui: ${{ steps.version.outputs.build_gui }}
5443
cache_key: ${{ steps.cache.outputs.key }}
5544
steps:
5645
- uses: actions/checkout@v4
@@ -65,40 +54,19 @@ jobs:
6554
run: |
6655
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
6756
VERSION="${{ inputs.version }}"
68-
if [ "${{ inputs.release_type }}" = "cli" ]; then
69-
TAG="cli-v${VERSION}"
70-
echo "build_cli=true" >> $GITHUB_OUTPUT
71-
echo "build_gui=false" >> $GITHUB_OUTPUT
72-
elif [ "${{ inputs.release_type }}" = "gui" ]; then
73-
TAG="gui-v${VERSION}"
74-
echo "build_cli=false" >> $GITHUB_OUTPUT
75-
echo "build_gui=true" >> $GITHUB_OUTPUT
76-
else
77-
TAG="v${VERSION}"
78-
echo "build_cli=true" >> $GITHUB_OUTPUT
79-
echo "build_gui=true" >> $GITHUB_OUTPUT
80-
fi
57+
TAG="v${VERSION}"
8158
else
8259
TAG="${GITHUB_REF#refs/tags/}"
8360
if [[ "$TAG" == cli-v* ]]; then
8461
VERSION="${TAG#cli-v}"
85-
echo "build_cli=true" >> $GITHUB_OUTPUT
86-
echo "build_gui=false" >> $GITHUB_OUTPUT
87-
elif [[ "$TAG" == gui-v* ]]; then
88-
VERSION="${TAG#gui-v}"
89-
echo "build_cli=false" >> $GITHUB_OUTPUT
90-
echo "build_gui=true" >> $GITHUB_OUTPUT
9162
else
9263
VERSION="${TAG#v}"
93-
echo "build_cli=true" >> $GITHUB_OUTPUT
94-
echo "build_gui=true" >> $GITHUB_OUTPUT
9564
fi
9665
fi
9766
echo "version=$VERSION" >> $GITHUB_OUTPUT
9867
echo "tag=$TAG" >> $GITHUB_OUTPUT
9968
10069
- name: Verify CLI version consistency
101-
if: steps.version.outputs.build_cli == 'true'
10270
run: |
10371
CLI_RELEASE_VERSION="${{ steps.version.outputs.version }}" ./scripts/check-cli-version.sh
10472
@@ -109,7 +77,6 @@ jobs:
10977
name: CLI ${{ matrix.artifact }}
11078
runs-on: ${{ matrix.runner }}
11179
needs: prepare
112-
if: needs.prepare.outputs.build_cli == 'true'
11380
strategy:
11481
fail-fast: false
11582
matrix:
@@ -339,160 +306,13 @@ jobs:
339306
${{ matrix.artifact }}.zip
340307
if-no-files-found: ignore
341308

342-
# ==========================================================================
343-
# Build GUI Binaries (Tauri) - 32 vCPU for compilation
344-
# ==========================================================================
345-
build-gui:
346-
name: GUI ${{ matrix.artifact }}
347-
runs-on: ${{ matrix.runner }}
348-
needs: prepare
349-
if: needs.prepare.outputs.build_gui == 'true'
350-
strategy:
351-
fail-fast: false
352-
matrix:
353-
include:
354-
- name: Windows x64
355-
runner: blacksmith-32vcpu-windows-2025
356-
target: x86_64-pc-windows-msvc
357-
artifact: cortex-gui-windows-x64
358-
bundle: msi
359-
360-
- name: macOS x64
361-
runner: macos-13
362-
target: x86_64-apple-darwin
363-
artifact: cortex-gui-macos-x64
364-
bundle: dmg
365-
366-
- name: macOS ARM64
367-
runner: macos-latest
368-
target: aarch64-apple-darwin
369-
artifact: cortex-gui-macos-arm64
370-
bundle: dmg
371-
372-
- name: Linux x64
373-
runner: blacksmith-32vcpu-ubuntu-2204
374-
target: x86_64-unknown-linux-gnu
375-
artifact: cortex-gui-linux-x64
376-
bundle: appimage
377-
378-
steps:
379-
- uses: actions/checkout@v4
380-
381-
- uses: pnpm/action-setup@v4
382-
383-
- uses: actions/setup-node@v4
384-
with:
385-
node-version: "20"
386-
cache: "pnpm"
387-
cache-dependency-path: cortex-gui/pnpm-lock.yaml
388-
389-
- name: Install Rust nightly
390-
uses: dtolnay/rust-toolchain@nightly
391-
with:
392-
targets: ${{ matrix.target }}
393-
394-
- name: Install system dependencies (Linux)
395-
if: runner.os == 'Linux'
396-
run: |
397-
sudo apt-get update
398-
sudo apt-get install -y \
399-
libwebkit2gtk-4.1-dev \
400-
librsvg2-dev \
401-
patchelf \
402-
libssl-dev \
403-
libgtk-3-dev \
404-
libayatana-appindicator3-dev
405-
406-
- name: Setup Rust cache (Blacksmith optimized)
407-
if: contains(matrix.runner, 'blacksmith')
408-
uses: useblacksmith/rust-cache@v3
409-
with:
410-
prefix-key: "rust-release-gui-${{ matrix.target }}"
411-
shared-key: ${{ needs.prepare.outputs.cache_key }}
412-
workspaces: |
413-
.
414-
cortex-gui/src-tauri
415-
416-
- name: Setup Rust cache (non-Blacksmith)
417-
if: "!contains(matrix.runner, 'blacksmith')"
418-
uses: Swatinem/rust-cache@v2
419-
with:
420-
prefix-key: "rust-release-gui-${{ matrix.target }}"
421-
shared-key: ${{ needs.prepare.outputs.cache_key }}
422-
workspaces: |
423-
.
424-
cortex-gui/src-tauri
425-
426-
- name: Cache pnpm (Blacksmith 4x faster cache)
427-
uses: actions/cache@v4
428-
with:
429-
path: |
430-
cortex-gui/node_modules
431-
~/.local/share/pnpm/store
432-
key: pnpm-${{ matrix.runner }}-${{ hashFiles('cortex-gui/pnpm-lock.yaml') }}
433-
restore-keys: |
434-
pnpm-${{ matrix.runner }}-
435-
436-
- name: Install frontend dependencies
437-
working-directory: cortex-gui
438-
run: pnpm install --frozen-lockfile
439-
440-
- name: Build Tauri app
441-
uses: tauri-apps/tauri-action@v0
442-
env:
443-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
444-
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }}
445-
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }}
446-
RUSTFLAGS: "-Zthreads=32"
447-
with:
448-
projectPath: cortex-gui
449-
tauriScript: pnpm tauri
450-
args: --target ${{ matrix.target }} --bundles ${{ matrix.bundle }}
451-
452-
- name: Collect artifacts (Unix)
453-
if: runner.os != 'Windows'
454-
run: |
455-
mkdir -p collected
456-
BUNDLE_DIR="target/${{ matrix.target }}/release/bundle"
457-
if [ ! -d "$BUNDLE_DIR" ]; then
458-
BUNDLE_DIR="cortex-gui/src-tauri/target/${{ matrix.target }}/release/bundle"
459-
fi
460-
461-
if [ "${{ matrix.bundle }}" = "dmg" ]; then
462-
find "$BUNDLE_DIR" -name "*.dmg" -exec cp {} collected/ \;
463-
elif [ "${{ matrix.bundle }}" = "appimage" ]; then
464-
find "$BUNDLE_DIR" -name "*.AppImage" -exec cp {} collected/ \;
465-
fi
466-
467-
ls -la collected/
468-
469-
- name: Collect artifacts (Windows)
470-
if: runner.os == 'Windows'
471-
shell: pwsh
472-
run: |
473-
New-Item -ItemType Directory -Force -Path collected
474-
$bundleDir = "target/${{ matrix.target }}/release/bundle"
475-
if (-not (Test-Path $bundleDir)) {
476-
$bundleDir = "cortex-gui/src-tauri/target/${{ matrix.target }}/release/bundle"
477-
}
478-
479-
Get-ChildItem -Path $bundleDir -Recurse -Include *.msi | Copy-Item -Destination collected/
480-
Get-ChildItem collected/
481-
482-
- name: Upload artifact
483-
uses: actions/upload-artifact@v4
484-
with:
485-
name: ${{ matrix.artifact }}
486-
path: collected/*
487-
if-no-files-found: warn
488-
489309
# ==========================================================================
490310
# Create GitHub Release (lightweight - 4 vCPU)
491311
# ==========================================================================
492312
release:
493313
name: Create Release
494-
needs: [prepare, build-cli, build-gui]
495-
if: always() && needs.prepare.result == 'success' && (needs.build-cli.result == 'success' || needs.build-cli.result == 'skipped') && (needs.build-gui.result == 'success' || needs.build-gui.result == 'skipped')
314+
needs: [prepare, build-cli]
315+
if: always() && needs.prepare.result == 'success' && needs.build-cli.result == 'success'
496316
runs-on: blacksmith-4vcpu-ubuntu-2404
497317
steps:
498318
- uses: actions/checkout@v4
@@ -528,8 +348,6 @@ jobs:
528348
VERSION="${{ needs.prepare.outputs.version }}"
529349
if [[ "$TAG" == cli-v* ]]; then
530350
echo "name=Cortex CLI v${VERSION}" >> $GITHUB_OUTPUT
531-
elif [[ "$TAG" == gui-v* ]]; then
532-
echo "name=Cortex GUI v${VERSION}" >> $GITHUB_OUTPUT
533351
else
534352
echo "name=Cortex v${VERSION}" >> $GITHUB_OUTPUT
535353
fi

0 commit comments

Comments
 (0)