Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
182 changes: 182 additions & 0 deletions .github/workflows/linux-x64-packages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,182 @@
name: Build Linux x64 packages

on:
pull_request:
paths:
- ".github/workflows/linux-x64-packages.yml"
- "apps/desktop/**"
- "packages/**"
- "plugins/official/**"
- "scripts/**"
- "package.json"
- "pnpm-lock.yaml"
- "pnpm-workspace.yaml"
workflow_dispatch:

permissions:
contents: read

jobs:
build-linux-x64:
name: Build and smoke-test Linux x64 packages
runs-on: ubuntu-24.04
timeout-minutes: 90

steps:
- name: Checkout source
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha || github.sha }}
submodules: recursive

- name: Record build provenance
id: provenance
shell: bash
run: |
set -euo pipefail
mkdir -p diagnostics
source_sha="$(git rev-parse HEAD)"
source_short_sha="$(git rev-parse --short=12 HEAD)"
lockfile_sha="$(sha256sum pnpm-lock.yaml | cut -d ' ' -f 1)"
version="$(node -p "require('./apps/desktop/package.json').version")"
{
printf 'Source commit: `%s`\n\n' "$source_sha"
printf 'Lockfile SHA-256: `%s`\n\n' "$lockfile_sha"
printf 'Workflow run: %s\n' "$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID"
} >> "$GITHUB_STEP_SUMMARY"
{
printf 'source_sha=%s\n' "$source_sha"
printf 'source_short_sha=%s\n' "$source_short_sha"
printf 'lockfile_sha=%s\n' "$lockfile_sha"
printf 'version=%s\n' "$version"
} >> "$GITHUB_OUTPUT"
{
printf 'Source SHA: %s\n' "$source_sha"
printf 'Lockfile SHA-256: %s\n' "$lockfile_sha"
printf 'Workflow run: %s\n' "$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID"
printf 'Event: %s\n' "$GITHUB_EVENT_NAME"
printf 'Ref: %s\n' "$GITHUB_REF"
printf 'Version: %s\n' "$version"
} > diagnostics/provenance.txt

- name: Install Linux packaging and smoke-test dependencies
shell: bash
run: |
set -euo pipefail
sudo apt-get update 2>&1 | tee diagnostics/apt-update.log
sudo apt-get install --yes \
rpm cpio squashfs-tools xz-utils xvfb xauth openbox dbus-x11 x11-utils xdotool wmctrl \
libasound2t64 libatk1.0-0t64 libatk-bridge2.0-0t64 libatspi2.0-0t64 \
libc6 libcairo2 libcups2t64 libdbus-1-3 libdrm2 libexpat1 libgbm1 \
libglib2.0-0t64 libgtk-3-0t64 libnotify4 libnspr4 libnss3 libpango-1.0-0 libsecret-1-0 libudev1 \
libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxdamage1 libxext6 \
libxfixes3 libxkbcommon0 libxrandr2 libxrender1 libxtst6 \
2>&1 | tee diagnostics/apt-install.log

- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 11.0.8

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 24
cache: pnpm

- name: Install workspace dependencies
shell: bash
run: |
set -euo pipefail
pnpm install --frozen-lockfile 2>&1 | tee diagnostics/install.log

- name: Check desktop
shell: bash
run: |
set -euo pipefail
pnpm --filter @open-pets/desktop check 2>&1 | tee diagnostics/desktop-check.log

- name: Clean package output
shell: bash
run: |
set -euo pipefail
node apps/desktop/scripts/clean-package-output.cjs 2>&1 | tee diagnostics/clean.log

- name: Build Linux x64 packages
shell: bash
run: |
set -euo pipefail
pnpm --dir apps/desktop exec electron-builder --linux AppImage deb rpm tar.gz --x64 --publish never \
2>&1 | tee diagnostics/package-build.log

- name: Validate Linux x64 packages
shell: bash
run: |
set -euo pipefail
node apps/desktop/scripts/validate-linux-x64-packages.mjs apps/desktop/dist-electron \
2>&1 | tee diagnostics/package-validation.log

- name: Smoke-test Linux x64 DEB
shell: bash
env:
PACKAGE_VERSION: ${{ steps.provenance.outputs.version }}
run: |
set -euo pipefail
deb_path="apps/desktop/dist-electron/OpenPets-${PACKAGE_VERSION}-linux-amd64.deb"
bash apps/desktop/scripts/smoke-linux-x64-deb.sh "$deb_path" \
2>&1 | tee diagnostics/deb-smoke.log

- name: Write release-candidate build metadata
id: build-metadata
shell: bash
env:
PACKAGE_VERSION: ${{ steps.provenance.outputs.version }}
run: |
set -euo pipefail
metadata_path="apps/desktop/dist-electron/BUILD-METADATA.txt"
workflow_url="$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID"
submodule_revisions="$(git submodule status --recursive)"
{
printf 'OpenPets Linux x64 release-candidate build metadata\n'
printf 'Desktop version: %s\n' "$PACKAGE_VERSION"
printf 'Source SHA: %s\n' "$(git rev-parse HEAD)"
printf 'Workflow SHA: %s\n' "$GITHUB_WORKFLOW_SHA"
printf 'Workflow ref: %s\n' "$GITHUB_REF"
printf 'Workflow run: %s\n' "$workflow_url"
printf 'Workflow run attempt: %s\n' "$GITHUB_RUN_ATTEMPT"
printf 'Lockfile SHA-256: %s\n' "$(sha256sum pnpm-lock.yaml | cut -d ' ' -f 1)"
printf 'Node.js version: %s\n' "$(node --version)"
printf 'pnpm version: %s\n' "$(pnpm --version)"
printf 'Runner OS: %s\n' "$RUNNER_OS"
printf 'Runner architecture: %s\n' "$RUNNER_ARCH"
printf 'Runner image: %s %s\n' "${ImageOS:-unknown}" "${ImageVersion:-unknown}"
printf '\nSubmodule revisions (recursive):\n%s\n' "${submodule_revisions:-none}"
printf '\nValidation result: all four Linux x64 payloads validated and SHA256SUMS generated.\n'
printf 'Smoke result: Linux x64 DEB smoke test passed.\n'
} > "$metadata_path"
cat "$metadata_path" >> "$GITHUB_STEP_SUMMARY"
printf '\n' >> "$GITHUB_STEP_SUMMARY"

- name: Upload verified Linux x64 packages
if: success()
uses: actions/upload-artifact@v4
with:
name: openpets-linux-x64-packages-${{ steps.provenance.outputs.version }}-${{ steps.provenance.outputs.source_short_sha }}-run-${{ github.run_attempt }}
path: |
apps/desktop/dist-electron/OpenPets-${{ steps.provenance.outputs.version }}-linux-x86_64.AppImage
apps/desktop/dist-electron/OpenPets-${{ steps.provenance.outputs.version }}-linux-amd64.deb
apps/desktop/dist-electron/OpenPets-${{ steps.provenance.outputs.version }}-linux-x86_64.rpm
apps/desktop/dist-electron/OpenPets-${{ steps.provenance.outputs.version }}-linux-x64.tar.gz
apps/desktop/dist-electron/SHA256SUMS
apps/desktop/dist-electron/BUILD-METADATA.txt
if-no-files-found: error
retention-days: 7

- name: Upload failure diagnostics
if: failure()
uses: actions/upload-artifact@v4
with:
name: openpets-linux-x64-failure-diagnostics-${{ github.run_id }}
path: diagnostics/
if-no-files-found: warn
retention-days: 7
50 changes: 45 additions & 5 deletions .slim/clonedeps.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"version": "1.0.0",
"updatedAt": "2026-08-25T00:00:00.000Z",
"updatedAt": "2026-09-24T00:00:00.000Z",
"dependencies": [
{
"name": "electron",
Expand All @@ -10,17 +10,37 @@
"commit": "51db52e1b56e0739944dfbc679a86f2c69a26e5f",
"path": ".slim/clonedeps/repos/electron__electron",
"packagePath": null,
"reason": "Inspect Electron BrowserWindow, Linux, and Wayland window geometry behavior used by OpenPets drag handling."
"reason": "Inspect Electron BrowserWindow behavior, including Linux window hints that affect taskbar, switcher, and focus visibility, alongside general Linux and Wayland geometry behavior."
},
{
"name": "kwin",
"resolvedVersion": null,
"repoUrl": "https://github.com/KDE/kwin",
"ref": "master",
"commit": "10273ea5f8c43f9a17825e9560f9616b23cef1ba",
"ref": "v5.27.11",
"commit": "c328a2fd746a8c838b3d6d3c47475d8191d05b7f",
"path": ".slim/clonedeps/repos/KDE__kwin",
"packagePath": null,
"reason": "Inspect KDE Wayland compositor handling of xdg toplevel movement, activation, and window geometry constraints."
"reason": "Inspect KDE Wayland handling of taskbar, switcher, and focus roles for xdg toplevels, alongside movement, activation, and window geometry constraints."
},
{
"name": "mutter",
"resolvedVersion": "46.0",
"repoUrl": "https://github.com/GNOME/mutter",
"ref": "46.0",
"commit": "c4753689e3413cd9332d885dd0297b3b7d9ba9ca",
"path": ".slim/clonedeps/repos/GNOME__mutter",
"packagePath": null,
"reason": "Inspect GNOME Wayland handling of taskbar, switcher, and focus roles, alongside window movement, activation, and geometry constraints."
},
{
"name": "gnome-shell",
"resolvedVersion": "46.0",
"repoUrl": "https://github.com/GNOME/gnome-shell",
"ref": "46.0",
"commit": "0463511457612ca87f7426b3b01356d1d85bee9b",
"path": ".slim/clonedeps/repos/GNOME__gnome-shell",
"packagePath": null,
"reason": "Inspect GNOME Shell taskbar, switcher, and focus behavior and its interaction with Mutter, alongside Linux desktop window movement and activation."
},
{
"name": "openclaw",
Expand All @@ -31,6 +51,26 @@
"path": ".slim/clonedeps/repos/openclaw__openclaw",
"packagePath": null,
"reason": "Inspect the source-supported extension, lifecycle hook, and configuration contracts for the OpenPets OpenClaw integration."
},
{
"name": "node-x11",
"resolvedVersion": "4.2.1",
"repoUrl": "https://github.com/sidorares/node-x11",
"ref": "v4.2.1",
"commit": "12bb53b3d78f592f05762784ec3be68cb011b8b8",
"path": ".slim/clonedeps/repos/sidorares__node-x11",
"packagePath": null,
"reason": "Inspect the Node.js X11 client and its support for setting or querying X11 window properties relevant to taskbar, switcher, and focus behavior."
},
{
"name": "xserver",
"resolvedVersion": "xwayland-23.2.6",
"repoUrl": "https://gitlab.freedesktop.org/xorg/xserver.git",
"ref": "xwayland-23.2.6",
"commit": "db9cde0328aa1bd21210cf5472ca7901697b3713",
"path": ".slim/clonedeps/repos/xorg__xserver",
"packagePath": null,
"reason": "Inspect Xwayland and X server handling of X11 window properties relevant to Linux taskbar, switcher, and focus behavior."
}
]
}
11 changes: 8 additions & 3 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,11 @@ FYI: third-parties/ folder contains other repos related to openpets, putting her
Read-only dependency source repositories are available under
`.slim/clonedeps/repos/` for inspection. Do not edit these clones.

- `.slim/clonedeps/repos/electron__electron/` — `electron/electron` at `v42.0.0`; inspect Electron BrowserWindow, Linux, and Wayland geometry behavior used by OpenPets drag handling.
- `.slim/clonedeps/repos/KDE__kwin/` — `KDE/kwin` at `master` (`10273ea5f8c43f9a17825e9560f9616b23cef1ba`); inspect KDE Wayland compositor handling of xdg toplevel movement, activation, and geometry constraints.
- `.slim/clonedeps/repos/openclaw__openclaw/` — `openclaw/openclaw` at `v2026.7.1-2` (`0790d9f593ad30c940ed93b5872a8cf6d6f3cf8c`); inspect the source-supported extension, lifecycle hook, and configuration contracts for the OpenPets OpenClaw integration.
- `.slim/clonedeps/repos/electron__electron/` — `electron/electron` at `v42.0.0`; inspect Electron BrowserWindow behavior, including Linux window hints that affect taskbar, switcher, and focus visibility, alongside general Linux and Wayland geometry behavior.
- `.slim/clonedeps/repos/KDE__kwin/` — `KDE/kwin` at `v5.27.11` (`c328a2fd746a8c838b3d6d3c47475d8191d05b7f`); inspect KDE Wayland handling of taskbar, switcher, and focus roles for xdg toplevels, alongside movement, activation, and window geometry constraints.
- `.slim/clonedeps/repos/GNOME__mutter/` — `GNOME/mutter` at `46.0` (`c4753689e3413cd9332d885dd0297b3b7d9ba9ca`); inspect GNOME Wayland handling of taskbar, switcher, and focus roles, alongside window movement, activation, and geometry constraints.
- `.slim/clonedeps/repos/GNOME__gnome-shell/` — `GNOME/gnome-shell` at `46.0` (`0463511457612ca87f7426b3b01356d1d85bee9b`); inspect GNOME Shell taskbar, switcher, and focus behavior and its interaction with Mutter, alongside Linux desktop window movement and activation.
- `.slim/clonedeps/repos/sidorares__node-x11/` — `sidorares/node-x11` at `v4.2.1` (`12bb53b3d78f592f05762784ec3be68cb011b8b8`); inspect the Node.js X11 client and its support for setting or querying X11 window properties relevant to taskbar, switcher, and focus behavior.
- `.slim/clonedeps/repos/xorg__xserver/` — `xorg/xserver` at `xwayland-23.2.6` (`db9cde0328aa1bd21210cf5472ca7901697b3713`); inspect Xwayland and X server handling of X11 window properties relevant to Linux taskbar, switcher, and focus behavior.

The OpenClaw source clone recorded in `.slim/clonedeps.json` is not currently present under `.slim/clonedeps/repos/`.
3 changes: 2 additions & 1 deletion apps/desktop/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
},
"author": "OpenPets",
"type": "module",
"main": "dist/main.js",
"main": "dist/bootstrap.js",
"scripts": {
"dev": "pnpm build && electron .",
"dev:electron": "pnpm build:main && electron .",
Expand Down Expand Up @@ -67,6 +67,7 @@
"react-dom": "^19.2.6",
"sharp": "^0.34.5",
"undici": "^7.29.0",
"x11": "4.2.1",
"yauzl": "3.3.0"
}
}
Loading
Loading