From 9c293b97311a3f08844cfd504a994879f45aca9a Mon Sep 17 00:00:00 2001 From: Jannis Braun <151788261+TheZwiss@users.noreply.github.com> Date: Fri, 3 Jul 2026 13:47:29 +0200 Subject: [PATCH] ci(release): fix native uiohook-napi build on Windows + Linux MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit First real CI run failed on 3 of 4 platforms in postinstall (electron-rebuild of uiohook-napi): - Linux (x64+arm64): missing X11 dev headers — 'Xrandr.h: No such file'. Add the full libuiohook header set (libxrandr-dev, libxinerama-dev, libx11-xcb-dev, libxkbfile-dev, libxkbcommon-x11-dev) derived from its #include list. - Windows: node-gyp on the windows-latest image can't detect VS 18 ('unknown version undefined'). Pin to windows-2022 (VS 2022 / v17). macOS built cleanly and is unaffected. --- .github/workflows/release.yml | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b27361a9..5756faa7 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -17,8 +17,12 @@ jobs: # macOS — universal build (arm64 + x64) on Apple Silicon runner - os: macos-latest args: --mac --arm64 --x64 - # Windows — x64 + arm64 on x64 runner - - os: windows-latest + # Windows — x64 + arm64 on x64 runner. + # Pinned to windows-2022 (VS 2022 / v17): the windows-latest image + # ships VS "18", which the node-gyp bundled with electron-rebuild + # cannot detect ("unknown version undefined") when compiling + # uiohook-napi in postinstall. + - os: windows-2022 args: --win --x64 --arm64 # Linux — x64 on x64 runner - os: ubuntu-latest @@ -35,9 +39,19 @@ jobs: - name: Install Linux build dependencies if: runner.os == 'Linux' + # Full X11 dev header set required to compile libuiohook (uiohook-napi) + # from source in postinstall. Derived from the headers its sources + # include: Xlib/XKB (libx11-dev), XTest+record (libxtst-dev), Intrinsic + # (libxt-dev), Xrandr (libxrandr-dev), Xinerama (libxinerama-dev), + # Xlib-xcb (libx11-xcb-dev), XKBrules (libxkbfile-dev), xkbcommon + # (libxkbcommon-dev, libxkbcommon-x11-dev). Missing libxrandr-dev was + # the original build failure (Xrandr.h: No such file or directory). run: | sudo apt-get update - sudo apt-get install -y libx11-dev libxtst-dev libxt-dev libxkbcommon-dev + sudo apt-get install -y \ + libx11-dev libxtst-dev libxt-dev \ + libxkbcommon-dev libxkbcommon-x11-dev libxkbfile-dev \ + libxrandr-dev libxinerama-dev libx11-xcb-dev - name: Setup pnpm uses: pnpm/action-setup@v4