forked from egoist/whispo
-
Notifications
You must be signed in to change notification settings - Fork 41
feat: improve Linux support with CI workflow and GPU fixes #639
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
aj47
wants to merge
1
commit into
main
Choose a base branch
from
claude/issue-616-speakmcp-TTriP
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,99 @@ | ||
| name: Build & Release Linux | ||
|
|
||
| on: | ||
| push: | ||
| tags: | ||
| - 'v*' | ||
| workflow_dispatch: | ||
| inputs: | ||
| tag: | ||
| description: 'Tag to build (e.g., v0.3.0)' | ||
| required: false | ||
| type: string | ||
|
|
||
| jobs: | ||
| build-linux: | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| ref: ${{ github.event.inputs.tag || github.ref }} | ||
|
|
||
| - name: Setup Node.js | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: '20' | ||
|
|
||
| - name: Setup pnpm | ||
| uses: pnpm/action-setup@v2 | ||
| with: | ||
| version: 9 | ||
|
|
||
| - name: Install Rust | ||
| uses: dtolnay/rust-action@stable | ||
|
|
||
| - name: Install Linux dependencies | ||
| run: | | ||
| sudo apt-get update | ||
| sudo apt-get install -y \ | ||
| libgtk-3-dev \ | ||
| libnotify-dev \ | ||
| libnss3-dev \ | ||
| libxss-dev \ | ||
| libxtst-dev \ | ||
| libatspi2.0-dev \ | ||
| libasound2-dev \ | ||
| libsecret-1-dev \ | ||
| rpm \ | ||
| libarchive-tools | ||
|
|
||
| - name: Install dependencies | ||
| run: pnpm install | ||
|
|
||
| - name: Build Rust binary for Linux | ||
| working-directory: apps/desktop | ||
| run: | | ||
| cd speakmcp-rs | ||
| cargo build --release | ||
| mkdir -p ../resources/bin | ||
| cp target/release/speakmcp-rs ../resources/bin/ | ||
|
|
||
| - name: Run tests | ||
| working-directory: apps/desktop | ||
| run: pnpm test:run | ||
|
|
||
| - name: Build Electron app | ||
| working-directory: apps/desktop | ||
| run: pnpm electron-vite build | ||
|
|
||
| - name: Build Linux packages | ||
| working-directory: apps/desktop | ||
| run: pnpm electron-builder --linux AppImage deb | ||
| env: | ||
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
|
||
| - name: Upload AppImage | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: linux-appimage | ||
| path: apps/desktop/dist/*.AppImage | ||
| retention-days: 30 | ||
|
|
||
| - name: Upload deb package | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: linux-deb | ||
| path: apps/desktop/dist/*.deb | ||
| retention-days: 30 | ||
|
|
||
| - name: Upload to Release | ||
| if: startsWith(github.ref, 'refs/tags/') | ||
| uses: softprops/action-gh-release@v1 | ||
| with: | ||
| files: | | ||
| apps/desktop/dist/*.AppImage | ||
| apps/desktop/dist/*.deb | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,6 +7,20 @@ import { | |
| makePanelWindowClosable, | ||
| WINDOWS, | ||
| } from "./window" | ||
|
|
||
| // Linux GPU workarounds: Prevent GPU-related errors on various Linux configurations | ||
| // These flags help with systems that have problematic GPU drivers or run in VMs | ||
| if (process.platform === "linux") { | ||
| // Disable GPU sandbox which can cause issues on some Linux systems | ||
| app.commandLine.appendSwitch("disable-gpu-sandbox") | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
🤖 Was this useful? React with 👍 or 👎 |
||
| // Use ANGLE for better compatibility with different GPU drivers | ||
| app.commandLine.appendSwitch("use-angle", "gl") | ||
| // Disable GPU compositing if hardware acceleration causes issues | ||
| // This can be overridden by users who have working GPU acceleration | ||
| if (process.env.SPEAKMCP_DISABLE_GPU === "1") { | ||
| app.commandLine.appendSwitch("disable-gpu") | ||
| } | ||
| } | ||
| import { listenToKeyboardEvents } from "./keyboard" | ||
| import { registerIpcMain } from "@egoist/tipc/main" | ||
| import { router } from "./tipc" | ||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dtolnay/rust-action@stabledoesn’t appear to be a valid Rust setup action (the commonly used one isdtolnay/rust-toolchain), so this step may fail and break the Linux release workflow.🤖 Was this useful? React with 👍 or 👎