From 2246686200a87872e096a8e722e6f92bf78f16ff Mon Sep 17 00:00:00 2001 From: HsiangNianian Date: Wed, 14 Jan 2026 19:42:48 +0800 Subject: feat: add Arch Linux support for build and test workflows --- .github/workflows/release.yml | 52 +++++++++++++++++++++++++++++++++++++++++++ .github/workflows/test.yml | 29 ++++++++++++++++++++++++ 2 files changed, 81 insertions(+) (limited to '.github/workflows') diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 774e547..5bf8caa 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -131,3 +131,55 @@ jobs: with: releaseId: ${{ needs.promote-release.outputs.release_id }} args: ${{ matrix.args }} + + build-tauri-arch: + name: Build & Upload (Arch Linux) + needs: promote-release + permissions: + contents: write + runs-on: ubuntu-latest + container: + image: archlinux:latest + steps: + - name: Install Dependencies + run: | + pacman -Syu --noconfirm + pacman -S --noconfirm webkit2gtk base-devel curl wget file openssl appmenu-gtk-module libappindicator-gtk3 librsvg git + # Fix makepkg running as root + sed -i 's/E_ROOT=1/E_ROOT=0/' /usr/bin/makepkg || true + + - uses: actions/checkout@v4 + + - name: Install pnpm + uses: pnpm/action-setup@v4 + with: + version: 9 + + - name: Install Node.js + uses: actions/setup-node@v4 + with: + node-version: 22 + cache: "pnpm" + cache-dependency-path: "ui/pnpm-lock.yaml" + + - name: Install Frontend Dependencies + run: pnpm install + working-directory: ui + + - name: Install Rust + uses: dtolnay/rust-toolchain@stable + with: + targets: "x86_64-unknown-linux-gnu" + + - name: Rust Cache + uses: swatinem/rust-cache@v2 + with: + workspaces: "./src-tauri -> target" + + - name: Build Tauri App + uses: tauri-apps/tauri-action@v0 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + releaseId: ${{ needs.promote-release.outputs.release_id }} + args: "--target x86_64-unknown-linux-gnu" \ No newline at end of file diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b5311c9..e123e95 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -47,3 +47,32 @@ jobs: - name: Build (Dev) working-directory: ./src-tauri run: cargo build --verbose + + test-arch: + name: Test on Arch Linux + runs-on: ubuntu-latest + container: + image: archlinux:latest + steps: + - name: Install Dependencies + run: | + pacman -Syu --noconfirm + pacman -S --noconfirm webkit2gtk base-devel curl wget file openssl appmenu-gtk-module libappindicator-gtk3 librsvg git + + - uses: actions/checkout@v4 + + - name: Install Rust + uses: dtolnay/rust-toolchain@stable + + - name: Rust Cache + uses: swatinem/rust-cache@v2 + with: + workspaces: ./src-tauri + + - name: Run Tests + working-directory: ./src-tauri + run: cargo test --verbose + + - name: Build (Dev) + working-directory: ./src-tauri + run: cargo build --verbose -- cgit v1.2.3-70-g09d2 From 1893aae5ba5c92eee519176b651b1b4247a3ae80 Mon Sep 17 00:00:00 2001 From: HsiangNianian Date: Wed, 14 Jan 2026 19:45:52 +0800 Subject: fix: update webkit2gtk package version in workflows for Arch Linux --- .github/workflows/release.yml | 2 +- .github/workflows/test.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5bf8caa..07aeec7 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -144,7 +144,7 @@ jobs: - name: Install Dependencies run: | pacman -Syu --noconfirm - pacman -S --noconfirm webkit2gtk base-devel curl wget file openssl appmenu-gtk-module libappindicator-gtk3 librsvg git + pacman -S --noconfirm webkit2gtk-4.1 base-devel curl wget file openssl appmenu-gtk-module libappindicator-gtk3 librsvg git # Fix makepkg running as root sed -i 's/E_ROOT=1/E_ROOT=0/' /usr/bin/makepkg || true diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e123e95..0c0b0c0 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -57,7 +57,7 @@ jobs: - name: Install Dependencies run: | pacman -Syu --noconfirm - pacman -S --noconfirm webkit2gtk base-devel curl wget file openssl appmenu-gtk-module libappindicator-gtk3 librsvg git + pacman -S --noconfirm webkit2gtk-4.1 base-devel curl wget file openssl appmenu-gtk-module libappindicator-gtk3 librsvg git - uses: actions/checkout@v4 -- cgit v1.2.3-70-g09d2 From a3da667bf3ee467136d7d5f218acabb8e23b390e Mon Sep 17 00:00:00 2001 From: HsiangNianian Date: Wed, 14 Jan 2026 19:53:54 +0800 Subject: fix: add missing dependencies for Arch Linux in workflows --- .github/workflows/release.yml | 2 +- .github/workflows/test.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 07aeec7..e14de5c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -144,7 +144,7 @@ jobs: - name: Install Dependencies run: | pacman -Syu --noconfirm - pacman -S --noconfirm webkit2gtk-4.1 base-devel curl wget file openssl appmenu-gtk-module libappindicator-gtk3 librsvg git + pacman -S --noconfirm webkit2gtk-4.1 base-devel curl wget file openssl appmenu-gtk-module libappindicator-gtk3 librsvg git fuse2 linuxdeploy # Fix makepkg running as root sed -i 's/E_ROOT=1/E_ROOT=0/' /usr/bin/makepkg || true diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 0c0b0c0..0d50313 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -57,7 +57,7 @@ jobs: - name: Install Dependencies run: | pacman -Syu --noconfirm - pacman -S --noconfirm webkit2gtk-4.1 base-devel curl wget file openssl appmenu-gtk-module libappindicator-gtk3 librsvg git + pacman -S --noconfirm webkit2gtk-4.1 base-devel curl wget file openssl appmenu-gtk-module libappindicator-gtk3 librsvg git fuse2 linuxdeploy - uses: actions/checkout@v4 -- cgit v1.2.3-70-g09d2 From a9f7a45a9537f3bfd0216ee47c9391ec9fd67587 Mon Sep 17 00:00:00 2001 From: HsiangNianian Date: Wed, 14 Jan 2026 19:55:47 +0800 Subject: fix: remove unnecessary 'linuxdeploy' package from Arch Linux dependencies --- .github/workflows/release.yml | 2 +- .github/workflows/test.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e14de5c..6121efc 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -144,7 +144,7 @@ jobs: - name: Install Dependencies run: | pacman -Syu --noconfirm - pacman -S --noconfirm webkit2gtk-4.1 base-devel curl wget file openssl appmenu-gtk-module libappindicator-gtk3 librsvg git fuse2 linuxdeploy + pacman -S --noconfirm webkit2gtk-4.1 base-devel curl wget file openssl appmenu-gtk-module libappindicator-gtk3 librsvg git fuse2 # Fix makepkg running as root sed -i 's/E_ROOT=1/E_ROOT=0/' /usr/bin/makepkg || true diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 0d50313..6cb5753 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -57,7 +57,7 @@ jobs: - name: Install Dependencies run: | pacman -Syu --noconfirm - pacman -S --noconfirm webkit2gtk-4.1 base-devel curl wget file openssl appmenu-gtk-module libappindicator-gtk3 librsvg git fuse2 linuxdeploy + pacman -S --noconfirm webkit2gtk-4.1 base-devel curl wget file openssl appmenu-gtk-module libappindicator-gtk3 librsvg git fuse2 - uses: actions/checkout@v4 -- cgit v1.2.3-70-g09d2 From cf634adbcb72afc067c09020f097433c9c8109b3 Mon Sep 17 00:00:00 2001 From: HsiangNianian Date: Wed, 14 Jan 2026 20:04:03 +0800 Subject: fix: remove Arch Linux build and test workflows; add libfuse2 dependency for Ubuntu --- .github/workflows/release.yml | 56 ++----------------------------------------- .github/workflows/test.yml | 29 ---------------------- 2 files changed, 2 insertions(+), 83 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6121efc..2c73602 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -89,13 +89,13 @@ jobs: if: matrix.platform == 'ubuntu-22.04' 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 pnpm uses: pnpm/action-setup@v4 @@ -131,55 +131,3 @@ jobs: with: releaseId: ${{ needs.promote-release.outputs.release_id }} args: ${{ matrix.args }} - - build-tauri-arch: - name: Build & Upload (Arch Linux) - needs: promote-release - permissions: - contents: write - runs-on: ubuntu-latest - container: - image: archlinux:latest - steps: - - name: Install Dependencies - run: | - pacman -Syu --noconfirm - pacman -S --noconfirm webkit2gtk-4.1 base-devel curl wget file openssl appmenu-gtk-module libappindicator-gtk3 librsvg git fuse2 - # Fix makepkg running as root - sed -i 's/E_ROOT=1/E_ROOT=0/' /usr/bin/makepkg || true - - - uses: actions/checkout@v4 - - - name: Install pnpm - uses: pnpm/action-setup@v4 - with: - version: 9 - - - name: Install Node.js - uses: actions/setup-node@v4 - with: - node-version: 22 - cache: "pnpm" - cache-dependency-path: "ui/pnpm-lock.yaml" - - - name: Install Frontend Dependencies - run: pnpm install - working-directory: ui - - - name: Install Rust - uses: dtolnay/rust-toolchain@stable - with: - targets: "x86_64-unknown-linux-gnu" - - - name: Rust Cache - uses: swatinem/rust-cache@v2 - with: - workspaces: "./src-tauri -> target" - - - name: Build Tauri App - uses: tauri-apps/tauri-action@v0 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - releaseId: ${{ needs.promote-release.outputs.release_id }} - args: "--target x86_64-unknown-linux-gnu" \ No newline at end of file diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6cb5753..b5311c9 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -47,32 +47,3 @@ jobs: - name: Build (Dev) working-directory: ./src-tauri run: cargo build --verbose - - test-arch: - name: Test on Arch Linux - runs-on: ubuntu-latest - container: - image: archlinux:latest - steps: - - name: Install Dependencies - run: | - pacman -Syu --noconfirm - pacman -S --noconfirm webkit2gtk-4.1 base-devel curl wget file openssl appmenu-gtk-module libappindicator-gtk3 librsvg git fuse2 - - - uses: actions/checkout@v4 - - - name: Install Rust - uses: dtolnay/rust-toolchain@stable - - - name: Rust Cache - uses: swatinem/rust-cache@v2 - with: - workspaces: ./src-tauri - - - name: Run Tests - working-directory: ./src-tauri - run: cargo test --verbose - - - name: Build (Dev) - working-directory: ./src-tauri - run: cargo build --verbose -- cgit v1.2.3-70-g09d2 From 44a5f42d901abbb282210419529d0e01302b1bed Mon Sep 17 00:00:00 2001 From: HsiangNianian Date: Wed, 14 Jan 2026 20:40:02 +0800 Subject: feat: add Wayland compatibility fixes for AppImage and setup appimagetool for Ubuntu --- .github/workflows/release.yml | 34 ++++++++++++++++++++++++++++++++++ src-tauri/scripts/fix-appimage.sh | 32 ++++++++++++++++++++++++++++++++ src-tauri/tauri.conf.json | 7 ++++++- 3 files changed, 72 insertions(+), 1 deletion(-) create mode 100755 src-tauri/scripts/fix-appimage.sh (limited to '.github/workflows') diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2c73602..f043155 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -124,6 +124,14 @@ jobs: workspaces: "./src-tauri -> target" shared-key: ${{ matrix.target }} + - name: Setup appimagetool (Linux) + if: startsWith(matrix.platform, 'ubuntu') + run: | + ARCH=$(uname -m) + wget -q "https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-${ARCH}.AppImage" + chmod +x "appimagetool-${ARCH}.AppImage" + sudo mv "appimagetool-${ARCH}.AppImage" /usr/local/bin/appimagetool + - name: Build Tauri App uses: tauri-apps/tauri-action@v0 env: @@ -131,3 +139,29 @@ jobs: with: releaseId: ${{ needs.promote-release.outputs.release_id }} args: ${{ matrix.args }} + + - name: Fix AppImage for Wayland (Linux) + if: startsWith(matrix.platform, 'ubuntu') + 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 diff --git a/src-tauri/scripts/fix-appimage.sh b/src-tauri/scripts/fix-appimage.sh new file mode 100755 index 0000000..6bb375b --- /dev/null +++ b/src-tauri/scripts/fix-appimage.sh @@ -0,0 +1,32 @@ +#!/bin/bash +# fix AppImage for Wayland compatibility +# This script modifies the AppImage bundle created by Tauri to ensure compatibility with Wayland +# It specifically targets the GTK backend settings to avoid forcing X11 + +set -e + +echo "Fixing AppImage for Wayland compatibility..." + +# Tauri sets the APPIMAGE_BUNDLE_PATH environment variable during the build process +APPDIR_PATH="${APPIMAGE_BUNDLE_PATH:-}" + +if [ -z "$APPDIR_PATH" ]; then + echo "No AppImage bundle path found, skipping fix" + exit 0 +fi + +# Check for the presence of the GTK hook file +if [ -d "$APPDIR_PATH/apprun-hooks" ]; then + HOOK_FILE="$APPDIR_PATH/apprun-hooks/linuxdeploy-plugin-gtk.sh" + + if [ -f "$HOOK_FILE" ]; then + echo "Found GTK hook file, patching..." + + # Comment out the line that forces GDK_BACKEND to x11 + sed -i 's/^export GDK_BACKEND=x11.*$/# export GDK_BACKEND=x11 # Disabled for Wayland compatibility/' "$HOOK_FILE" + + echo "Successfully patched $HOOK_FILE" + fi +fi + +echo "AppImage Wayland fix completed!" diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index 8706614..beba8d3 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -33,6 +33,11 @@ "icons/128x128@2x.png", "icons/icon.icns", "icons/icon.ico" - ] + ], + "linux": { + "appimage": { + "bundleMediaFramework": false + } + } } } \ No newline at end of file -- cgit v1.2.3-70-g09d2 From dba27a4bf32d5de7ef42c2e65c5b407b7e12c39d Mon Sep 17 00:00:00 2001 From: HsiangNianian Date: Wed, 14 Jan 2026 20:55:20 +0800 Subject: feat: add Wayland support for Arch Linux in release workflow --- .github/workflows/release.yml | 60 ++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 56 insertions(+), 4 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f043155..24a8e46 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -68,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" @@ -82,11 +88,14 @@ 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 libfuse2 @@ -97,6 +106,27 @@ jobs: 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 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 with: @@ -125,12 +155,16 @@ jobs: shared-key: ${{ matrix.target }} - name: Setup appimagetool (Linux) - if: startsWith(matrix.platform, 'ubuntu') + 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" - sudo mv "appimagetool-${ARCH}.AppImage" /usr/local/bin/appimagetool + 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 @@ -141,7 +175,7 @@ jobs: args: ${{ matrix.args }} - name: Fix AppImage for Wayland (Linux) - if: startsWith(matrix.platform, 'ubuntu') + if: startsWith(matrix.platform, 'ubuntu') || matrix.platform == 'archlinux-latest' run: | # Locate the generated AppImage APPIMAGE=$(find bundle -name "*.AppImage" -type f | head -1) @@ -165,3 +199,21 @@ jobs: rm -rf squashfs-root fi working-directory: src-tauri/target/release + + - name: Test AppImage on Wayland (Arch) + if: matrix.platform == 'archlinux-latest' && 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 -- cgit v1.2.3-70-g09d2 From ec09a0bc05ebc2bf23155a79690e51ef977db9dc Mon Sep 17 00:00:00 2001 From: HsiangNianian Date: Wed, 14 Jan 2026 20:55:36 +0800 Subject: fix: refine AppImage handling for Wayland on Linux platforms --- .github/workflows/release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 24a8e46..487ddee 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -175,7 +175,7 @@ jobs: args: ${{ matrix.args }} - name: Fix AppImage for Wayland (Linux) - if: startsWith(matrix.platform, 'ubuntu') || matrix.platform == 'archlinux-latest' + 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) @@ -201,7 +201,7 @@ jobs: working-directory: src-tauri/target/release - name: Test AppImage on Wayland (Arch) - if: matrix.platform == 'archlinux-latest' && matrix.wayland + if: matrix.wayland run: | # Test that the AppImage can run in Wayland environment APPIMAGE=$(find bundle -name "*.AppImage" -type f | head -1) -- cgit v1.2.3-70-g09d2 From 18c123fcd0ed42bcd6e9ac68204106d31efd041d Mon Sep 17 00:00:00 2001 From: HsiangNianian Date: Wed, 14 Jan 2026 20:58:31 +0800 Subject: feat: enhance testing workflow with Arch Linux Wayland support and improved environment setup --- .github/workflows/test.yml | 39 +++++++++++++++++++++++++++++++++++---- 1 file changed, 35 insertions(+), 4 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b5311c9..e7868f5 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -15,23 +15,54 @@ 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" + pr_only: true + - platform: "macos-14" + name: "macOS" + pr_only: true + # Exclude PR-only platforms on push events + if: (!matrix.pr_only || github.event_name == 'pull_request') 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 -- cgit v1.2.3-70-g09d2 From 18111ef323a81e399e3b907c9046170afcb8e0eb Mon Sep 17 00:00:00 2001 From: HsiangNianian Date: Wed, 14 Jan 2026 20:58:58 +0800 Subject: fix: remove PR-only restrictions for Windows and macOS platforms in CI workflow --- .github/workflows/test.yml | 4 ---- 1 file changed, 4 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e7868f5..8ca056e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -33,12 +33,8 @@ jobs: wayland: true - platform: "windows-latest" name: "Windows" - pr_only: true - platform: "macos-14" name: "macOS" - pr_only: true - # Exclude PR-only platforms on push events - if: (!matrix.pr_only || github.event_name == 'pull_request') steps: - uses: actions/checkout@v4 -- cgit v1.2.3-70-g09d2 From e2d4e73457294c8539d97a2de1835179114276b7 Mon Sep 17 00:00:00 2001 From: NtskwK Date: Thu, 15 Jan 2026 09:56:10 +0800 Subject: ci(ui): add UI checker workflow --- .github/workflows/ui_check.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .github/workflows/ui_check.yml (limited to '.github/workflows') diff --git a/.github/workflows/ui_check.yml b/.github/workflows/ui_check.yml new file mode 100644 index 0000000..d851518 --- /dev/null +++ b/.github/workflows/ui_check.yml @@ -0,0 +1,22 @@ +name: UI Checker + +on: + push: + paths: + - "ui/**" + - ".github/workflows/ui_check.yml" + pull_request: + branches: ["main"] + workflow_dispatch: + +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + run_install: true + cache: true + + - run: pnpm check + working-directory: ui -- cgit v1.2.3-70-g09d2 From b2e40b16bf7b4e57a83c6d69fe5745920591b6b9 Mon Sep 17 00:00:00 2001 From: 简律纯 Date: Thu, 15 Jan 2026 11:58:06 +0800 Subject: fix: Update branches and install steps in UI check workflow --- .github/workflows/ui_check.yml | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/ui_check.yml b/.github/workflows/ui_check.yml index d851518..f34345b 100644 --- a/.github/workflows/ui_check.yml +++ b/.github/workflows/ui_check.yml @@ -6,7 +6,7 @@ on: - "ui/**" - ".github/workflows/ui_check.yml" pull_request: - branches: ["main"] + branches: ["main", "master", "dev"] workflow_dispatch: jobs: @@ -14,9 +14,18 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + + - name: Install pnpm + uses: pnpm/action-setup@v4 with: - run_install: true - cache: true + version: 9 + + - name: Install Node.js + uses: actions/setup-node@v4 + with: + node-version: 22 + cache: "pnpm" + cache-dependency-path: "ui/pnpm-lock.yaml" - run: pnpm check working-directory: ui -- cgit v1.2.3-70-g09d2 From c32a65e835d27689a45dbbfc770665bc9596acdd Mon Sep 17 00:00:00 2001 From: 简律纯 Date: Thu, 15 Jan 2026 11:59:51 +0800 Subject: fix: Add pnpm install step in UI check workflow --- .github/workflows/ui_check.yml | 3 +++ 1 file changed, 3 insertions(+) (limited to '.github/workflows') diff --git a/.github/workflows/ui_check.yml b/.github/workflows/ui_check.yml index f34345b..e023e81 100644 --- a/.github/workflows/ui_check.yml +++ b/.github/workflows/ui_check.yml @@ -27,5 +27,8 @@ jobs: cache: "pnpm" cache-dependency-path: "ui/pnpm-lock.yaml" + - run: pnpm install + working-directory: ui + - run: pnpm check working-directory: ui -- cgit v1.2.3-70-g09d2 From b5f1e670d04801216f85bedf095b693f9beb20e8 Mon Sep 17 00:00:00 2001 From: 简律纯 Date: Thu, 15 Jan 2026 12:02:25 +0800 Subject: fix: Rename test job to check-ui in workflow --- .github/workflows/ui_check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/ui_check.yml b/.github/workflows/ui_check.yml index e023e81..e05f54b 100644 --- a/.github/workflows/ui_check.yml +++ b/.github/workflows/ui_check.yml @@ -10,7 +10,7 @@ on: workflow_dispatch: jobs: - test: + check-ui: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 -- cgit v1.2.3-70-g09d2 From d4d37b4d418ab2a517ce6ce2b8272cf084fdc724 Mon Sep 17 00:00:00 2001 From: HsiangNianian Date: Thu, 15 Jan 2026 12:50:31 +0800 Subject: fix: Migrate UI checker workflow from ui_check.yml to check.yml --- .github/workflows/check.yml | 34 ++++++++++++++++++++++++++++++++++ .github/workflows/ui_check.yml | 34 ---------------------------------- 2 files changed, 34 insertions(+), 34 deletions(-) create mode 100644 .github/workflows/check.yml delete mode 100644 .github/workflows/ui_check.yml (limited to '.github/workflows') diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml new file mode 100644 index 0000000..0cbcf35 --- /dev/null +++ b/.github/workflows/check.yml @@ -0,0 +1,34 @@ +name: UI Checker + +on: + push: + paths: + - "ui/**" + - ".github/workflows/ui_check.yml" + pull_request: + branches: ["main", "master", "dev"] + workflow_dispatch: + +jobs: + check: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Install pnpm + uses: pnpm/action-setup@v4 + with: + version: 9 + + - name: Install Node.js + uses: actions/setup-node@v4 + with: + node-version: 22 + cache: "pnpm" + cache-dependency-path: "ui/pnpm-lock.yaml" + + - run: pnpm install + working-directory: ui + + - run: pnpm check + working-directory: ui diff --git a/.github/workflows/ui_check.yml b/.github/workflows/ui_check.yml deleted file mode 100644 index e05f54b..0000000 --- a/.github/workflows/ui_check.yml +++ /dev/null @@ -1,34 +0,0 @@ -name: UI Checker - -on: - push: - paths: - - "ui/**" - - ".github/workflows/ui_check.yml" - pull_request: - branches: ["main", "master", "dev"] - workflow_dispatch: - -jobs: - check-ui: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - - name: Install pnpm - uses: pnpm/action-setup@v4 - with: - version: 9 - - - name: Install Node.js - uses: actions/setup-node@v4 - with: - node-version: 22 - cache: "pnpm" - cache-dependency-path: "ui/pnpm-lock.yaml" - - - run: pnpm install - working-directory: ui - - - run: pnpm check - working-directory: ui -- cgit v1.2.3-70-g09d2 From a520e405dda8fc7c7c587e37862d14ce3e7011ce Mon Sep 17 00:00:00 2001 From: HsiangNianian Date: Thu, 15 Jan 2026 13:50:08 +0800 Subject: fix: Correct package name for appindicator in release workflow --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 487ddee..9167dcc 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -110,7 +110,7 @@ jobs: if: matrix.wayland run: | pacman -Syu --noconfirm - pacman -S --noconfirm webkit2gtk-4.1 base-devel curl wget file openssl gtk3 appindicator-gtk3 librsvg fuse2 + pacman -S --noconfirm webkit2gtk-4.1 base-devel curl wget file openssl gtk3 libappindicator-gtk3 librsvg fuse2 - name: Setup Wayland Environment (Arch) if: matrix.wayland -- cgit v1.2.3-70-g09d2 From e22a67185623cf7c1fcbf610b7612c90f96ee742 Mon Sep 17 00:00:00 2001 From: HsiangNianian Date: Thu, 15 Jan 2026 13:58:13 +0800 Subject: fix: Update package name for webkit2gtk in release workflow --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9167dcc..86170e9 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -110,7 +110,7 @@ jobs: if: matrix.wayland run: | pacman -Syu --noconfirm - pacman -S --noconfirm webkit2gtk-4.1 base-devel curl wget file openssl gtk3 libappindicator-gtk3 librsvg fuse2 + pacman -S --noconfirm webkit2gtk base-devel curl wget file openssl gtk3 libappindicator-gtk3 librsvg fuse2 - name: Setup Wayland Environment (Arch) if: matrix.wayland -- cgit v1.2.3-70-g09d2 From 41482c9fb94238d51d51b433358a961e39ff5867 Mon Sep 17 00:00:00 2001 From: HsiangNianian Date: Thu, 15 Jan 2026 13:59:53 +0800 Subject: fix: Remove unnecessary package from Wayland setup in release workflow --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 86170e9..9b0432a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -115,7 +115,7 @@ jobs: - name: Setup Wayland Environment (Arch) if: matrix.wayland run: | - pacman -S --noconfirm cage wayland protocols weston + pacman -S --noconfirm cage wayland weston echo "WAYLAND_DISPLAY=wayland-1" >> $GITHUB_ENV echo "GDK_BACKEND=wayland" >> $GITHUB_ENV -- cgit v1.2.3-70-g09d2 From 716d18b9099e2663bee2dff4bde5bd24dc202c91 Mon Sep 17 00:00:00 2001 From: HsiangNianian Date: Thu, 15 Jan 2026 14:04:01 +0800 Subject: fix: Add missing packages for Wayland setup in release workflow --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9b0432a..0897da7 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -110,7 +110,7 @@ jobs: if: matrix.wayland run: | pacman -Syu --noconfirm - pacman -S --noconfirm webkit2gtk base-devel curl wget file openssl gtk3 libappindicator-gtk3 librsvg fuse2 + pacman -S --noconfirm webkit2gtk base-devel curl wget file openssl gtk3 libappindicator-gtk3 librsvg fuse2 pkgconf glib2-devel libsoup3 - name: Setup Wayland Environment (Arch) if: matrix.wayland -- cgit v1.2.3-70-g09d2 From 5b0df127806cb271d73ab08d04361c15d63714f2 Mon Sep 17 00:00:00 2001 From: HsiangNianian Date: Thu, 15 Jan 2026 14:09:50 +0800 Subject: refactor: Simplify release workflow by removing Wayland-specific jobs and dependencies --- .github/workflows/release.yml | 53 ++++--------------------------------------- 1 file changed, 4 insertions(+), 49 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0897da7..82399e5 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -68,12 +68,6 @@ 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" @@ -95,7 +89,7 @@ jobs: - uses: actions/checkout@v4 - name: Install Dependencies (Linux x86_64) - if: matrix.platform == 'ubuntu-22.04' && !matrix.wayland + if: matrix.platform == 'ubuntu-22.04' 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 libfuse2 @@ -106,27 +100,6 @@ jobs: 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 libfuse2 - - name: Install Dependencies (Arch Linux) - if: matrix.wayland - run: | - pacman -Syu --noconfirm - pacman -S --noconfirm webkit2gtk base-devel curl wget file openssl gtk3 libappindicator-gtk3 librsvg fuse2 pkgconf glib2-devel libsoup3 - - - name: Setup Wayland Environment (Arch) - if: matrix.wayland - run: | - pacman -S --noconfirm cage wayland 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 with: @@ -153,9 +126,9 @@ jobs: with: 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') + if: startsWith(matrix.platform, 'ubuntu') && !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" @@ -175,7 +148,7 @@ jobs: args: ${{ matrix.args }} - name: Fix AppImage for Wayland (Linux) - if: (startsWith(matrix.platform, 'ubuntu') || matrix.wayland) && !startsWith(matrix.platform, 'macos') && !startsWith(matrix.platform, 'windows') + if: startsWith(matrix.platform, 'ubuntu') && !startsWith(matrix.platform, 'macos') && !startsWith(matrix.platform, 'windows') run: | # Locate the generated AppImage APPIMAGE=$(find bundle -name "*.AppImage" -type f | head -1) @@ -199,21 +172,3 @@ jobs: 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 -- cgit v1.2.3-70-g09d2 From c6edd73c17c9d5be6b1fe8b0bfa3eb91f4e9d886 Mon Sep 17 00:00:00 2001 From: 简律纯 Date: Thu, 15 Jan 2026 16:35:29 +0800 Subject: feat: Add CodeQL analysis workflow configuration --- .github/workflows/codeql.yml | 103 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 103 insertions(+) create mode 100644 .github/workflows/codeql.yml (limited to '.github/workflows') diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml new file mode 100644 index 0000000..734c4c5 --- /dev/null +++ b/.github/workflows/codeql.yml @@ -0,0 +1,103 @@ +# For most projects, this workflow file will not need changing; you simply need +# to commit it to your repository. +# +# You may wish to alter this file to override the set of languages analyzed, +# or to provide custom queries or build logic. +# +# ******** NOTE ******** +# We have attempted to detect the languages in your repository. Please check +# the `language` matrix defined below to confirm you have the correct set of +# supported CodeQL languages. +# +name: "CodeQL Advanced" + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + schedule: + - cron: '25 0 * * 3' + +jobs: + analyze: + name: Analyze (${{ matrix.language }}) + # Runner size impacts CodeQL analysis time. To learn more, please see: + # - https://gh.io/recommended-hardware-resources-for-running-codeql + # - https://gh.io/supported-runners-and-hardware-resources + # - https://gh.io/using-larger-runners (GitHub.com only) + # Consider using larger runners or machines with greater resources for possible analysis time improvements. + runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }} + permissions: + # required for all workflows + security-events: write + + # required to fetch internal or private CodeQL packs + packages: read + + # only required for workflows in private repositories + actions: read + contents: read + + strategy: + fail-fast: false + matrix: + include: + - language: actions + build-mode: none + - language: javascript-typescript + build-mode: none + - language: rust + build-mode: none + # CodeQL supports the following values keywords for 'language': 'actions', 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'rust', 'swift' + # Use `c-cpp` to analyze code written in C, C++ or both + # Use 'java-kotlin' to analyze code written in Java, Kotlin or both + # Use 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both + # To learn more about changing the languages that are analyzed or customizing the build mode for your analysis, + # see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning. + # If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how + # your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + # Add any setup steps before running the `github/codeql-action/init` action. + # This includes steps like installing compilers or runtimes (`actions/setup-node` + # or others). This is typically only required for manual builds. + # - name: Setup runtime (example) + # uses: actions/setup-example@v1 + + # Initializes the CodeQL tools for scanning. + - name: Initialize CodeQL + uses: github/codeql-action/init@v4 + with: + languages: ${{ matrix.language }} + build-mode: ${{ matrix.build-mode }} + # If you wish to specify custom queries, you can do so here or in a config file. + # By default, queries listed here will override any specified in a config file. + # Prefix the list here with "+" to use these queries and those in the config file. + + # For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs + # queries: security-extended,security-and-quality + + # If the analyze step fails for one of the languages you are analyzing with + # "We were unable to automatically build your code", modify the matrix above + # to set the build mode to "manual" for that language. Then modify this step + # to build your code. + # ℹ️ Command-line programs to run using the OS shell. + # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun + - name: Run manual build steps + if: matrix.build-mode == 'manual' + shell: bash + run: | + echo 'If you are using a "manual" build mode for one or more of the' \ + 'languages you are analyzing, replace this with the commands to build' \ + 'your code, for example:' + echo ' make bootstrap' + echo ' make release' + exit 1 + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v4 + with: + category: "/language:${{matrix.language}}" -- cgit v1.2.3-70-g09d2