Store glyph layers lazily and stream foreign imports #241
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Perf | |
| on: | |
| schedule: | |
| - cron: "0 6 * * *" | |
| push: | |
| branches: [main] | |
| paths: | |
| - "crates/**" | |
| - "apps/desktop/src/main/app/App.ts" | |
| - "apps/desktop/src/preload/**" | |
| - "apps/desktop/src/renderer/src/app/Screens.tsx" | |
| - "apps/desktop/src/renderer/src/components/home/**" | |
| - "apps/desktop/src/renderer/src/lib/graphics/**" | |
| - "apps/desktop/src/renderer/src/lib/slug/**" | |
| - "apps/desktop/src/renderer/src/lib/workspace/**" | |
| - "apps/desktop/src/renderer/src/workspace/**" | |
| - "apps/desktop/src/renderer/src/lib/editor/rendering/**" | |
| - "apps/desktop/src/renderer/src/lib/editor/Editor.ts" | |
| - "apps/desktop/src/renderer/src/lib/editor/hit/**" | |
| - "apps/desktop/src/renderer/src/lib/editor/managers/**" | |
| - "apps/desktop/src/renderer/src/lib/tools/**" | |
| - "apps/desktop/src/renderer/src/lib/model/**" | |
| - "apps/desktop/src/renderer/src/bridge/**" | |
| - "apps/desktop/src/shared/workspace/**" | |
| - "apps/desktop/src/utility/workspace/**" | |
| - "apps/desktop/src/renderer/src/lib/commands/**" | |
| - "apps/desktop/src/renderer/src/perf/**" | |
| - "apps/desktop/e2e/**" | |
| - "apps/desktop/playwright.config.ts" | |
| - ".github/workflows/perf.yml" | |
| workflow_dispatch: | |
| pull_request: | |
| paths: | |
| - "apps/desktop/src/main/app/App.ts" | |
| - "apps/desktop/src/preload/**" | |
| - "apps/desktop/src/renderer/src/app/Screens.tsx" | |
| - "apps/desktop/src/renderer/src/components/home/**" | |
| - "apps/desktop/src/renderer/src/lib/graphics/**" | |
| - "apps/desktop/src/renderer/src/lib/slug/**" | |
| - "apps/desktop/src/renderer/src/lib/workspace/**" | |
| - "apps/desktop/src/renderer/src/workspace/**" | |
| - "apps/desktop/src/renderer/src/lib/editor/rendering/**" | |
| - "apps/desktop/src/renderer/src/lib/editor/Editor.ts" | |
| - "apps/desktop/src/renderer/src/lib/editor/hit/**" | |
| - "apps/desktop/src/renderer/src/lib/editor/managers/**" | |
| - "apps/desktop/src/renderer/src/lib/tools/**" | |
| - "apps/desktop/src/renderer/src/lib/model/**" | |
| - "apps/desktop/src/renderer/src/bridge/NativeBridge.ts" | |
| - "apps/desktop/src/shared/workspace/**" | |
| - "apps/desktop/src/utility/workspace/**" | |
| - "apps/desktop/src/renderer/src/lib/commands/**" | |
| - "apps/desktop/src/renderer/src/perf/**" | |
| - "crates/shift-edit/src/**" | |
| - "crates/shift-bridge/src/**" | |
| - "crates/shift-slug/**" | |
| - "crates/shift-wire/**" | |
| - "crates/shift-workspace/**" | |
| - "packages/types/src/bridge/**" | |
| - "apps/desktop/e2e/**" | |
| - "apps/desktop/playwright.config.ts" | |
| - ".github/workflows/perf.yml" | |
| permissions: {} | |
| concurrency: | |
| group: perf-${{ github.sha }} | |
| cancel-in-progress: true | |
| jobs: | |
| engine-benchmarks: | |
| name: Engine Benchmarks | |
| if: github.event_name != 'schedule' | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@v7 | |
| with: | |
| fetch-depth: 1 | |
| - uses: pnpm/action-setup@v6 | |
| - uses: actions/setup-node@v7 | |
| with: | |
| node-version: 24 | |
| - name: Install toolchain | |
| run: rustup show | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| shared-key: shift-rust | |
| - name: Cache node_modules | |
| id: modules-cache | |
| uses: actions/cache@v6 | |
| with: | |
| path: | | |
| node_modules | |
| apps/*/node_modules | |
| packages/*/node_modules | |
| crates/*/node_modules | |
| key: node-modules-v3-node24-${{ runner.os }}-${{ hashFiles('pnpm-lock.yaml') }} | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile --prefer-offline | |
| - name: Cache native module binary | |
| id: native-cache | |
| uses: actions/cache@v6 | |
| with: | |
| path: crates/shift-bridge/*.node | |
| key: native-module-${{ runner.os }}-${{ hashFiles('crates/**', 'Cargo.lock') }} | |
| - name: Build native module | |
| if: steps.native-cache.outputs.cache-hit != 'true' | |
| run: pnpm build:native | |
| - name: Run engine benchmarks | |
| run: pnpm test:perf | |
| playwright-perf: | |
| name: Playwright Perf | |
| if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' | |
| runs-on: macos-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@v7 | |
| with: | |
| fetch-depth: 1 | |
| submodules: true | |
| - uses: pnpm/action-setup@v6 | |
| - uses: actions/setup-node@v7 | |
| with: | |
| node-version: 24 | |
| - name: Install toolchain | |
| run: rustup show | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| shared-key: shift-rust-macos | |
| - name: Restore node_modules | |
| id: modules-cache | |
| uses: actions/cache/restore@v6 | |
| with: | |
| path: | | |
| node_modules | |
| apps/*/node_modules | |
| packages/*/node_modules | |
| crates/*/node_modules | |
| key: node-modules-v3-node24-${{ runner.os }}-${{ hashFiles('pnpm-lock.yaml') }} | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile --prefer-offline | |
| - name: Save node_modules | |
| if: steps.modules-cache.outputs.cache-hit != 'true' | |
| uses: actions/cache/save@v6 | |
| with: | |
| path: | | |
| node_modules | |
| apps/*/node_modules | |
| packages/*/node_modules | |
| crates/*/node_modules | |
| key: ${{ steps.modules-cache.outputs.cache-primary-key }} | |
| - name: Restore Playwright browsers | |
| id: playwright-cache | |
| uses: actions/cache/restore@v6 | |
| with: | |
| path: ~/Library/Caches/ms-playwright | |
| key: playwright-${{ runner.os }}-${{ hashFiles('apps/desktop/node_modules/@playwright/test/package.json') }} | |
| - name: Install Playwright browsers | |
| if: steps.playwright-cache.outputs.cache-hit != 'true' | |
| run: pnpm --filter @shift/desktop exec playwright install | |
| - name: Save Playwright browsers | |
| if: steps.playwright-cache.outputs.cache-hit != 'true' | |
| uses: actions/cache/save@v6 | |
| with: | |
| path: ~/Library/Caches/ms-playwright | |
| key: ${{ steps.playwright-cache.outputs.cache-primary-key }} | |
| - name: Restore native module binary | |
| id: native-cache | |
| uses: actions/cache/restore@v6 | |
| with: | |
| path: crates/shift-bridge/*.node | |
| key: native-module-${{ runner.os }}-${{ hashFiles('crates/**', 'Cargo.lock') }} | |
| - name: Build native module | |
| if: steps.native-cache.outputs.cache-hit != 'true' | |
| run: pnpm build:native | |
| - name: Save native module binary | |
| if: steps.native-cache.outputs.cache-hit != 'true' | |
| uses: actions/cache/save@v6 | |
| with: | |
| path: crates/shift-bridge/*.node | |
| key: ${{ steps.native-cache.outputs.cache-primary-key }} | |
| - name: Build E2E app | |
| run: pnpm --filter @shift/desktop build:e2e | |
| - name: Run Playwright perf tests | |
| run: pnpm --filter @shift/desktop exec playwright test --project=perf | |
| - name: Upload Playwright failures | |
| if: failure() | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: playwright-perf-results | |
| path: apps/desktop/e2e/test-results/ | |
| retention-days: 7 | |
| - name: Upload perf results | |
| if: always() | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: perf-results | |
| path: apps/desktop/e2e/perf-results/ | |
| retention-days: 90 |