Skip to content

Commit f958001

Browse files
authored
Merge pull request #38 from TrueNine/dev
ci: update GitHub Actions workflows and turbo config (7 modified)
2 parents f4bd9f6 + ccb2d7b commit f958001

File tree

13 files changed

+253
-19
lines changed

13 files changed

+253
-19
lines changed

.github/workflows/ci.yml

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,17 @@ jobs:
1111
steps:
1212
- uses: actions/checkout@v4
1313

14+
- name: Cache apt packages
15+
uses: actions/cache@v4
16+
with:
17+
path: /var/cache/apt/archives
18+
key: apt-gtk-${{ runner.os }}-${{ hashFiles('.github/workflows/ci.yml') }}
19+
restore-keys: apt-gtk-${{ runner.os }}-
20+
1421
- name: Install GTK development dependencies
15-
run: sudo apt-get update && sudo apt-get install -y libgtk-3-dev libglib2.0-dev libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf pkg-config
22+
run: |
23+
sudo apt-get update
24+
sudo apt-get install -y libgtk-3-dev libglib2.0-dev libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf pkg-config
1625
1726
- name: Setup pnpm
1827
uses: pnpm/action-setup@v4
@@ -36,17 +45,11 @@ jobs:
3645
${{ runner.os }}-pnpm-store-
3746
3847
- name: Install dependencies
39-
run: pnpm install --frozen-lockfile
48+
run: pnpm install --frozen-lockfile --ignore-scripts
4049

4150
- name: Build
4251
run: pnpm exec turbo run build
4352

44-
- name: Lint
45-
run: pnpm exec turbo run lint
46-
47-
- name: Typecheck
48-
run: pnpm exec turbo run typecheck
49-
5053
- name: Install Rust stable
5154
uses: dtolnay/rust-toolchain@stable
5255

.github/workflows/release-cli-binary.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ jobs:
7777
- name: Install & bundle plugin-runtime
7878
shell: bash
7979
run: |
80-
pnpm install --frozen-lockfile
80+
pnpm install --frozen-lockfile --ignore-scripts
8181
pnpm exec turbo run build --filter=@truenine/memory-sync-cli...
8282
ls -la cli/dist/plugin-runtime.mjs
8383

.github/workflows/release-cli-napi.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ jobs:
6969
${{ runner.os }}-pnpm-store-
7070
7171
- name: Install dependencies
72-
run: pnpm install --frozen-lockfile
72+
run: pnpm install --frozen-lockfile --ignore-scripts
7373

7474
- name: Install Rust stable
7575
uses: dtolnay/rust-toolchain@stable

.github/workflows/release-cli.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ jobs:
8282
8383
- name: Install & Build
8484
run: |
85-
pnpm install --frozen-lockfile
85+
pnpm install --frozen-lockfile --ignore-scripts
8686
pnpm exec turbo run build --filter=@truenine/memory-sync-cli...
8787
8888
- name: Publish to npm

.github/workflows/release-gui.yml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
matrix:
2828
include:
2929
- platform: 'macos-14'
30-
args: ''
30+
args: '--target universal-apple-darwin'
3131
rust_targets: 'aarch64-apple-darwin,x86_64-apple-darwin'
3232
- platform: 'ubuntu-24.04'
3333
args: ''
@@ -64,6 +64,7 @@ jobs:
6464
- name: Install Rust stable
6565
uses: dtolnay/rust-toolchain@stable
6666
with:
67+
toolchain: stable
6768
targets: ${{ matrix.rust_targets }}
6869

6970
- name: Get Cargo deps hash (exclude root package version for stable cache key)
@@ -86,14 +87,22 @@ jobs:
8687
restore-keys: |
8788
${{ runner.os }}-cargo-
8889
90+
- name: Cache apt packages
91+
if: matrix.platform == 'ubuntu-24.04'
92+
uses: actions/cache@v4
93+
with:
94+
path: /var/cache/apt/archives
95+
key: apt-gtk-${{ runner.os }}-${{ hashFiles('.github/workflows/release-gui.yml') }}
96+
restore-keys: apt-gtk-${{ runner.os }}-
97+
8998
- name: Install dependencies (ubuntu x86_64)
9099
if: matrix.platform == 'ubuntu-24.04'
91100
run: |
92101
sudo apt-get update
93102
sudo apt-get install -y --no-install-recommends libgtk-3-dev libglib2.0-dev pkg-config libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf
94103
95104
- name: Install workspace dependencies
96-
run: pnpm install --frozen-lockfile
105+
run: pnpm install --frozen-lockfile --ignore-scripts
97106

98107
- name: Sync Tauri version from CLI
99108
shell: bash
@@ -118,7 +127,7 @@ jobs:
118127
- name: Upload artifacts
119128
uses: actions/upload-artifact@v4
120129
with:
121-
name: gui-${{ matrix.platform }}${{ matrix.args && format('-{0}', matrix.args) || '' }}
130+
name: gui-${{ matrix.platform }}
122131
path: |
123132
gui/src-tauri/target/**/bundle/**/*.dmg
124133
gui/src-tauri/target/**/bundle/**/*.exe

.github/workflows/test.yml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,17 @@ jobs:
1111
steps:
1212
- uses: actions/checkout@v4
1313

14+
- name: Cache apt packages
15+
uses: actions/cache@v4
16+
with:
17+
path: /var/cache/apt/archives
18+
key: apt-gtk-${{ runner.os }}-${{ hashFiles('.github/workflows/test.yml') }}
19+
restore-keys: apt-gtk-${{ runner.os }}-
20+
1421
- name: Install GTK development dependencies
15-
run: sudo apt-get update && sudo apt-get install -y libgtk-3-dev libglib2.0-dev libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf pkg-config
22+
run: |
23+
sudo apt-get update
24+
sudo apt-get install -y libgtk-3-dev libglib2.0-dev libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf pkg-config
1625
1726
- name: Setup pnpm
1827
uses: pnpm/action-setup@v4
@@ -36,7 +45,7 @@ jobs:
3645
${{ runner.os }}-pnpm-store-
3746
3847
- name: Install dependencies
39-
run: pnpm install --frozen-lockfile
48+
run: pnpm install --frozen-lockfile --ignore-scripts
4049

4150
- name: Install Rust stable
4251
uses: dtolnay/rust-toolchain@stable
@@ -55,6 +64,9 @@ jobs:
5564
- name: Generate Tauri icons
5665
run: pnpm -F @truenine/memory-sync-gui run generate:icons
5766

67+
- name: Generate route tree
68+
run: pnpm -F @truenine/memory-sync-gui run generate:routes
69+
5870
- name: Run tests
5971
run: pnpm exec turbo run test
6072

gui/.gitignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@ Thumbs.db
2626
# TypeScript
2727
*.tsbuildinfo
2828

29-
# TanStack Router (auto-generated route tree)
30-
src/routeTree.gen.ts
3129

3230
# Test
3331
coverage/

gui/package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
"tauri": "tauri",
1717
"tauri:dev": "tauri dev",
1818
"tauri:build": "tauri build",
19+
"generate:routes": "tsx scripts/generate-routes.ts",
1920
"typecheck": "tsc --noEmit",
2021
"test:ui": "vitest --run",
2122
"test:tauri": "cargo test --manifest-path src-tauri/Cargo.toml",
@@ -40,6 +41,7 @@
4041
},
4142
"devDependencies": {
4243
"@tailwindcss/vite": "catalog:",
44+
"@tanstack/router-generator": "^1.162.2",
4345
"@tauri-apps/cli": "catalog:",
4446
"@types/react": "catalog:",
4547
"@types/react-dom": "catalog:",

gui/scripts/generate-routes.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/usr/bin/env tsx
2+
import { Generator, getConfig } from '@tanstack/router-generator'
3+
import { resolve } from 'node:path'
4+
5+
const root = resolve(import.meta.dirname, '..')
6+
7+
const config = await getConfig({
8+
routesDirectory: resolve(root, 'src/routes'),
9+
generatedRouteTree: resolve(root, 'src/routeTree.gen.ts'),
10+
quoteStyle: 'single',
11+
routeFileIgnorePattern: '.*\.test\.tsx?$|.*\.spec\.tsx?$',
12+
})
13+
14+
const gen = new Generator({ config, root })
15+
await gen.run()
16+
console.log('[generate-routes] routeTree.gen.ts updated')

gui/src/routeTree.gen.ts

Lines changed: 189 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,189 @@
1+
/* eslint-disable */
2+
3+
// @ts-nocheck
4+
5+
// noinspection JSUnusedGlobalSymbols
6+
7+
// This file was automatically generated by TanStack Router.
8+
// You should NOT make any changes in this file as it will be overwritten.
9+
// Additionally, you should also exclude this file from your linter and/or formatter to prevent it from being checked or modified.
10+
11+
import { Route as rootRouteImport } from './routes/__root'
12+
import { Route as SettingsRouteImport } from './routes/settings'
13+
import { Route as PluginsRouteImport } from './routes/plugins'
14+
import { Route as PipelineRouteImport } from './routes/pipeline'
15+
import { Route as LogsRouteImport } from './routes/logs'
16+
import { Route as FilesRouteImport } from './routes/files'
17+
import { Route as ConfigRouteImport } from './routes/config'
18+
import { Route as IndexRouteImport } from './routes/index'
19+
20+
const SettingsRoute = SettingsRouteImport.update({
21+
id: '/settings',
22+
path: '/settings',
23+
getParentRoute: () => rootRouteImport,
24+
} as any)
25+
const PluginsRoute = PluginsRouteImport.update({
26+
id: '/plugins',
27+
path: '/plugins',
28+
getParentRoute: () => rootRouteImport,
29+
} as any)
30+
const PipelineRoute = PipelineRouteImport.update({
31+
id: '/pipeline',
32+
path: '/pipeline',
33+
getParentRoute: () => rootRouteImport,
34+
} as any)
35+
const LogsRoute = LogsRouteImport.update({
36+
id: '/logs',
37+
path: '/logs',
38+
getParentRoute: () => rootRouteImport,
39+
} as any)
40+
const FilesRoute = FilesRouteImport.update({
41+
id: '/files',
42+
path: '/files',
43+
getParentRoute: () => rootRouteImport,
44+
} as any)
45+
const ConfigRoute = ConfigRouteImport.update({
46+
id: '/config',
47+
path: '/config',
48+
getParentRoute: () => rootRouteImport,
49+
} as any)
50+
const IndexRoute = IndexRouteImport.update({
51+
id: '/',
52+
path: '/',
53+
getParentRoute: () => rootRouteImport,
54+
} as any)
55+
56+
export interface FileRoutesByFullPath {
57+
'/': typeof IndexRoute
58+
'/config': typeof ConfigRoute
59+
'/files': typeof FilesRoute
60+
'/logs': typeof LogsRoute
61+
'/pipeline': typeof PipelineRoute
62+
'/plugins': typeof PluginsRoute
63+
'/settings': typeof SettingsRoute
64+
}
65+
export interface FileRoutesByTo {
66+
'/': typeof IndexRoute
67+
'/config': typeof ConfigRoute
68+
'/files': typeof FilesRoute
69+
'/logs': typeof LogsRoute
70+
'/pipeline': typeof PipelineRoute
71+
'/plugins': typeof PluginsRoute
72+
'/settings': typeof SettingsRoute
73+
}
74+
export interface FileRoutesById {
75+
__root__: typeof rootRouteImport
76+
'/': typeof IndexRoute
77+
'/config': typeof ConfigRoute
78+
'/files': typeof FilesRoute
79+
'/logs': typeof LogsRoute
80+
'/pipeline': typeof PipelineRoute
81+
'/plugins': typeof PluginsRoute
82+
'/settings': typeof SettingsRoute
83+
}
84+
export interface FileRouteTypes {
85+
fileRoutesByFullPath: FileRoutesByFullPath
86+
fullPaths:
87+
| '/'
88+
| '/config'
89+
| '/files'
90+
| '/logs'
91+
| '/pipeline'
92+
| '/plugins'
93+
| '/settings'
94+
fileRoutesByTo: FileRoutesByTo
95+
to:
96+
| '/'
97+
| '/config'
98+
| '/files'
99+
| '/logs'
100+
| '/pipeline'
101+
| '/plugins'
102+
| '/settings'
103+
id:
104+
| '__root__'
105+
| '/'
106+
| '/config'
107+
| '/files'
108+
| '/logs'
109+
| '/pipeline'
110+
| '/plugins'
111+
| '/settings'
112+
fileRoutesById: FileRoutesById
113+
}
114+
export interface RootRouteChildren {
115+
IndexRoute: typeof IndexRoute
116+
ConfigRoute: typeof ConfigRoute
117+
FilesRoute: typeof FilesRoute
118+
LogsRoute: typeof LogsRoute
119+
PipelineRoute: typeof PipelineRoute
120+
PluginsRoute: typeof PluginsRoute
121+
SettingsRoute: typeof SettingsRoute
122+
}
123+
124+
declare module '@tanstack/react-router' {
125+
interface FileRoutesByPath {
126+
'/settings': {
127+
id: '/settings'
128+
path: '/settings'
129+
fullPath: '/settings'
130+
preLoaderRoute: typeof SettingsRouteImport
131+
parentRoute: typeof rootRouteImport
132+
}
133+
'/plugins': {
134+
id: '/plugins'
135+
path: '/plugins'
136+
fullPath: '/plugins'
137+
preLoaderRoute: typeof PluginsRouteImport
138+
parentRoute: typeof rootRouteImport
139+
}
140+
'/pipeline': {
141+
id: '/pipeline'
142+
path: '/pipeline'
143+
fullPath: '/pipeline'
144+
preLoaderRoute: typeof PipelineRouteImport
145+
parentRoute: typeof rootRouteImport
146+
}
147+
'/logs': {
148+
id: '/logs'
149+
path: '/logs'
150+
fullPath: '/logs'
151+
preLoaderRoute: typeof LogsRouteImport
152+
parentRoute: typeof rootRouteImport
153+
}
154+
'/files': {
155+
id: '/files'
156+
path: '/files'
157+
fullPath: '/files'
158+
preLoaderRoute: typeof FilesRouteImport
159+
parentRoute: typeof rootRouteImport
160+
}
161+
'/config': {
162+
id: '/config'
163+
path: '/config'
164+
fullPath: '/config'
165+
preLoaderRoute: typeof ConfigRouteImport
166+
parentRoute: typeof rootRouteImport
167+
}
168+
'/': {
169+
id: '/'
170+
path: '/'
171+
fullPath: '/'
172+
preLoaderRoute: typeof IndexRouteImport
173+
parentRoute: typeof rootRouteImport
174+
}
175+
}
176+
}
177+
178+
const rootRouteChildren: RootRouteChildren = {
179+
IndexRoute: IndexRoute,
180+
ConfigRoute: ConfigRoute,
181+
FilesRoute: FilesRoute,
182+
LogsRoute: LogsRoute,
183+
PipelineRoute: PipelineRoute,
184+
PluginsRoute: PluginsRoute,
185+
SettingsRoute: SettingsRoute,
186+
}
187+
export const routeTree = rootRouteImport
188+
._addFileChildren(rootRouteChildren)
189+
._addFileTypes<FileRouteTypes>()

0 commit comments

Comments
 (0)