Fix the CD wine build and add per-part toggles
The Windows NSIS step failed under wine for two reasons: no X display (nodrv_CreateWindow) and missing 32-bit libraries (failed to load syswow64\ntdll.dll). The job now installs xvfb + wine32:i386 and runs the desktop build under xvfb-run, with Gecko/Mono lookups disabled. Also add `images` and `desktop` dispatch inputs so either half of the CD can be skipped (e.g. desktop-only or images-only releases).
This commit is contained in:
+22
-3
@@ -1,6 +1,7 @@
|
|||||||
# J621 CD — manual release workflow (Actions tab -> "Run workflow").
|
# J621 CD — manual release workflow (Actions tab -> "Run workflow").
|
||||||
#
|
#
|
||||||
# One dispatch does everything:
|
# One dispatch does everything; each half can be skipped with the `images`
|
||||||
|
# and `desktop` inputs:
|
||||||
# * builds and pushes the backend + frontend images (multi-arch, :latest
|
# * builds and pushes the backend + frontend images (multi-arch, :latest
|
||||||
# and :<short-sha>, GIT_HASH baked in for the version pill),
|
# and :<short-sha>, GIT_HASH baked in for the version pill),
|
||||||
# * builds the desktop packages and attaches them (plus the update
|
# * builds the desktop packages and attaches them (plus the update
|
||||||
@@ -21,6 +22,14 @@ name: CD
|
|||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
inputs:
|
inputs:
|
||||||
|
images:
|
||||||
|
description: Build and push the Docker images
|
||||||
|
required: false
|
||||||
|
default: "true"
|
||||||
|
desktop:
|
||||||
|
description: Build the desktop release
|
||||||
|
required: false
|
||||||
|
default: "true"
|
||||||
platforms:
|
platforms:
|
||||||
description: Image platforms (comma separated)
|
description: Image platforms (comma separated)
|
||||||
required: false
|
required: false
|
||||||
@@ -37,6 +46,7 @@ concurrency:
|
|||||||
jobs:
|
jobs:
|
||||||
images:
|
images:
|
||||||
name: Build & push images
|
name: Build & push images
|
||||||
|
if: ${{ inputs.images != 'false' }}
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
# The Gitea container registry does not accept the automatic job token
|
# The Gitea container registry does not accept the automatic job token
|
||||||
# (go-gitea/gitea#23642 is still open), so the push uses a repo PAT with
|
# (go-gitea/gitea#23642 is still open), so the push uses a repo PAT with
|
||||||
@@ -73,6 +83,7 @@ jobs:
|
|||||||
|
|
||||||
desktop:
|
desktop:
|
||||||
name: Desktop release
|
name: Desktop release
|
||||||
|
if: ${{ inputs.desktop != 'false' }}
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
# Creating the release and uploading its assets uses the automatic job
|
# Creating the release and uploading its assets uses the automatic job
|
||||||
# token, so it needs write access to the repository's releases.
|
# token, so it needs write access to the repository's releases.
|
||||||
@@ -90,7 +101,12 @@ jobs:
|
|||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
sudo apt-get install -y --no-install-recommends fakeroot libarchive-tools
|
sudo apt-get install -y --no-install-recommends fakeroot libarchive-tools
|
||||||
if [ "${{ inputs.windows }}" = "true" ]; then
|
if [ "${{ inputs.windows }}" = "true" ]; then
|
||||||
sudo apt-get install -y --no-install-recommends wine
|
# electron-builder runs the 32-bit NSIS installer under wine to
|
||||||
|
# build the uninstaller: that needs a virtual display (Xvfb) and
|
||||||
|
# 32-bit wine libraries.
|
||||||
|
sudo dpkg --add-architecture i386
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install -y --no-install-recommends xvfb wine wine32:i386
|
||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Install frontend + desktop dependencies
|
- name: Install frontend + desktop dependencies
|
||||||
@@ -99,9 +115,12 @@ jobs:
|
|||||||
npm --prefix desktop ci --no-audit --no-fund
|
npm --prefix desktop ci --no-audit --no-fund
|
||||||
|
|
||||||
- name: Build desktop packages
|
- name: Build desktop packages
|
||||||
|
env:
|
||||||
|
# Keep wine from trying to fetch Gecko/Mono on first run.
|
||||||
|
WINEDLLOVERRIDES: mscoree,mshtml=
|
||||||
run: |
|
run: |
|
||||||
if [ "${{ inputs.windows }}" = "true" ]; then
|
if [ "${{ inputs.windows }}" = "true" ]; then
|
||||||
./deploy/build_desktop.sh --all
|
xvfb-run -a ./deploy/build_desktop.sh --all
|
||||||
else
|
else
|
||||||
./deploy/build_desktop.sh --linux
|
./deploy/build_desktop.sh --linux
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user