aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/.github/workflows
diff options
context:
space:
mode:
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/release.yml94
-rw-r--r--.github/workflows/test.yml35
2 files changed, 122 insertions, 7 deletions
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 23d4181..487ddee 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -38,6 +38,8 @@ jobs:
token: ${{ github.token }}
tag: ${{ github.event_name == 'workflow_dispatch' && inputs.tag_name || github.ref_name }}
changelogFilePath: CHANGELOG.md
+ includeInvalidCommits: true
+ useGitmojis: false
- name: Create Release
id: create_release
@@ -66,6 +68,12 @@ jobs:
name: "Linux ARM64"
target: "aarch64-unknown-linux-gnu"
args: "--target aarch64-unknown-linux-gnu"
+ - platform: "ubuntu-22.04"
+ name: "Linux x86_64 (Arch/Wayland)"
+ target: "x86_64-unknown-linux-gnu"
+ args: "--target x86_64-unknown-linux-gnu"
+ container: "archlinux:latest"
+ wayland: true
- platform: "macos-latest"
name: "macOS ARM64"
target: "aarch64-apple-darwin"
@@ -80,20 +88,44 @@ jobs:
args: "--target aarch64-pc-windows-msvc"
runs-on: ${{ matrix.platform }}
+ container:
+ image: ${{ matrix.container }}
+ options: --user root
steps:
- uses: actions/checkout@v4
- name: Install Dependencies (Linux x86_64)
- if: matrix.platform == 'ubuntu-22.04'
+ if: matrix.platform == 'ubuntu-22.04' && !matrix.wayland
run: |
sudo apt-get update
- sudo apt-get install -y libwebkit2gtk-4.1-dev build-essential curl wget file libssl-dev libgtk-3-dev libayatana-appindicator3-dev librsvg2-dev
+ sudo apt-get install -y libwebkit2gtk-4.1-dev build-essential curl wget file libssl-dev libgtk-3-dev libayatana-appindicator3-dev librsvg2-dev libfuse2
- name: Install Dependencies (Linux ARM64)
if: matrix.platform == 'ubuntu-24.04-arm'
run: |
sudo apt-get update
- sudo apt-get install -y libwebkit2gtk-4.1-dev build-essential curl wget file libssl-dev libgtk-3-dev libayatana-appindicator3-dev librsvg2-dev
+ sudo apt-get install -y libwebkit2gtk-4.1-dev build-essential curl wget file libssl-dev libgtk-3-dev libayatana-appindicator3-dev librsvg2-dev libfuse2
+
+ - name: Install Dependencies (Arch Linux)
+ if: matrix.wayland
+ run: |
+ pacman -Syu --noconfirm
+ pacman -S --noconfirm webkit2gtk-4.1 base-devel curl wget file openssl gtk3 appindicator-gtk3 librsvg fuse2
+
+ - name: Setup Wayland Environment (Arch)
+ if: matrix.wayland
+ run: |
+ pacman -S --noconfirm cage wayland protocols weston
+
+ echo "WAYLAND_DISPLAY=wayland-1" >> $GITHUB_ENV
+ echo "GDK_BACKEND=wayland" >> $GITHUB_ENV
+ echo "XDG_SESSION_TYPE=wayland" >> $GITHUB_ENV
+ echo "XDG_RUNTIME_DIR=/tmp/runtime-wayland" >> $GITHUB_ENV
+
+ mkdir -p /tmp/runtime-wayland
+ chmod 0700 /tmp/runtime-wayland
+
+ echo "Wayland environment configured for testing"
- name: Install pnpm
uses: pnpm/action-setup@v4
@@ -122,6 +154,18 @@ jobs:
workspaces: "./src-tauri -> target"
shared-key: ${{ matrix.target }}
+ - name: Setup appimagetool (Linux)
+ if: (startsWith(matrix.platform, 'ubuntu') || matrix.wayland) && !startsWith(matrix.platform, 'macos') && !startsWith(matrix.platform, 'windows')
+ run: |
+ ARCH=$(uname -m)
+ wget -q "https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-${ARCH}.AppImage"
+ chmod +x "appimagetool-${ARCH}.AppImage"
+ if command -v sudo >/dev/null 2>&1; then
+ sudo mv "appimagetool-${ARCH}.AppImage" /usr/local/bin/appimagetool
+ else
+ mv "appimagetool-${ARCH}.AppImage" /usr/local/bin/appimagetool
+ fi
+
- name: Build Tauri App
uses: tauri-apps/tauri-action@v0
env:
@@ -129,3 +173,47 @@ jobs:
with:
releaseId: ${{ needs.promote-release.outputs.release_id }}
args: ${{ matrix.args }}
+
+ - name: Fix AppImage for Wayland (Linux)
+ if: (startsWith(matrix.platform, 'ubuntu') || matrix.wayland) && !startsWith(matrix.platform, 'macos') && !startsWith(matrix.platform, 'windows')
+ run: |
+ # Locate the generated AppImage
+ APPIMAGE=$(find bundle -name "*.AppImage" -type f | head -1)
+ echo "Found AppImage: $APPIMAGE"
+
+ if [ -n "$APPIMAGE" ]; then
+ # backup original AppImage
+ cp "$APPIMAGE" "${APPIMAGE}.backup"
+
+ # extract AppImage
+ "$APPIMAGE" --appimage-extract
+
+ # Fix GTK hook, remove forced X11
+ if [ -f squashfs-root/apprun-hooks/linuxdeploy-plugin-gtk.sh ]; then
+ sed -i 's/^export GDK_BACKEND=x11.*$/# export GDK_BACKEND=x11 # Disabled for Wayland compatibility/' squashfs-root/apprun-hooks/linuxdeploy-plugin-gtk.sh
+ echo "Successfully patched GTK hook for Wayland compatibility"
+ fi
+
+ # Repack AppImage
+ appimagetool squashfs-root "$APPIMAGE"
+ rm -rf squashfs-root
+ fi
+ working-directory: src-tauri/target/release
+
+ - name: Test AppImage on Wayland (Arch)
+ if: matrix.wayland
+ run: |
+ # Test that the AppImage can run in Wayland environment
+ APPIMAGE=$(find bundle -name "*.AppImage" -type f | head -1)
+ echo "Testing AppImage: $APPIMAGE"
+ echo "Wayland display: $WAYLAND_DISPLAY"
+ echo "GDK backend: $GDK_BACKEND"
+
+ # Quick startup test (timeout after 5 seconds)
+ timeout 5 "$APPIMAGE" --version 2>&1 || {
+ echo "AppImage test failed with exit code: $?"
+ exit 1
+ }
+
+ echo "AppImage Wayland compatibility test passed!"
+ working-directory: src-tauri/target/release
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index b5311c9..8ca056e 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -15,23 +15,50 @@ env:
jobs:
test:
- name: Test on ${{ matrix.platform }}
+ name: Test on ${{ matrix.name }}
runs-on: ${{ matrix.platform }}
+ container:
+ image: ${{ matrix.container }}
+ options: --user root
strategy:
fail-fast: false
matrix:
# On Push: Linux only. On PR: All platforms.
- platform: ${{ (github.event_name == 'pull_request') && fromJson('["ubuntu-22.04", "windows-latest", "macos-14"]') || fromJson('["ubuntu-22.04"]') }}
+ include:
+ - platform: "ubuntu-22.04"
+ name: "Ubuntu 22.04"
+ - platform: "ubuntu-22.04"
+ name: "Arch Linux (Wayland)"
+ container: "archlinux:latest"
+ wayland: true
+ - platform: "windows-latest"
+ name: "Windows"
+ - platform: "macos-14"
+ name: "macOS"
steps:
- uses: actions/checkout@v4
- - name: Install Dependencies (Linux)
- if: runner.os == 'Linux'
+ - name: Install Dependencies (Ubuntu)
+ if: runner.os == 'Linux' && !matrix.wayland
run: |
sudo apt-get update
sudo apt-get install -y libwebkit2gtk-4.1-dev build-essential curl wget file libssl-dev libgtk-3-dev libayatana-appindicator3-dev librsvg2-dev
+ - name: Install Dependencies (Arch Linux)
+ if: matrix.wayland
+ run: |
+ pacman -Syu --noconfirm
+ pacman -S --noconfirm webkit2gtk-4.1 base-devel curl wget file openssl gtk3
+
+ - name: Setup Wayland Environment (Arch)
+ if: matrix.wayland
+ run: |
+ echo "WAYLAND_DISPLAY=wayland-1" >> $GITHUB_ENV
+ echo "GDK_BACKEND=wayland" >> $GITHUB_ENV
+ echo "XDG_SESSION_TYPE=wayland" >> $GITHUB_ENV
+ echo "Wayland test environment configured"
+
- name: Install Rust
uses: dtolnay/rust-toolchain@stable