build(web-ui): fix rollup failing (#4687)

This commit is contained in:
Coia Prant 2026-02-09 04:30:40 +08:00 committed by GitHub
commit 8aed1a82c8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 38 additions and 9 deletions

View file

@ -71,7 +71,6 @@ jobs:
"mingw-w64-${TOOLCHAIN}-graphviz" "mingw-w64-${TOOLCHAIN}-graphviz"
"mingw-w64-${TOOLCHAIN}-miniupnpc" "mingw-w64-${TOOLCHAIN}-miniupnpc"
"mingw-w64-${TOOLCHAIN}-nlohmann-json" "mingw-w64-${TOOLCHAIN}-nlohmann-json"
"mingw-w64-${TOOLCHAIN}-nodejs"
"mingw-w64-${TOOLCHAIN}-onevpl" "mingw-w64-${TOOLCHAIN}-onevpl"
"mingw-w64-${TOOLCHAIN}-openssl" "mingw-w64-${TOOLCHAIN}-openssl"
"mingw-w64-${TOOLCHAIN}-opus" "mingw-w64-${TOOLCHAIN}-opus"
@ -82,6 +81,7 @@ jobs:
dependencies+=( dependencies+=(
"mingw-w64-${TOOLCHAIN}-MinHook" "mingw-w64-${TOOLCHAIN}-MinHook"
"mingw-w64-${TOOLCHAIN}-nsis" "mingw-w64-${TOOLCHAIN}-nsis"
"mingw-w64-${TOOLCHAIN}-nodejs"
) )
fi fi
@ -146,6 +146,28 @@ jobs:
with: with:
dotnet-version: '10.x' dotnet-version: '10.x'
- name: Setup NodeJS
# Clang compiled NodeJS has issues when running rollup webpack
if: matrix.msystem != 'ucrt64'
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
with:
node-version: 'lts/*'
- name: NodeJS Path
if: matrix.msystem != 'ucrt64'
shell: pwsh
run: |
# get NodeJS PATH
$NODEJS_BINARY_PATH = (Get-Command node).Source
$NODEJS_PATH = Split-Path -Path "$NODEJS_BINARY_PATH" -Parent
# setup environment variables
echo "NODEJS_PATH=$NODEJS_PATH" >> $env:GITHUB_ENV
# step output
echo "nodejs-path=$NODEJS_PATH"
echo "nodejs-path=$NODEJS_PATH" >> $env:GITHUB_OUTPUT
- name: Setup python - name: Setup python
id: setup-python id: setup-python
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
@ -166,10 +188,19 @@ jobs:
- name: Build Windows - name: Build Windows
shell: msys2 {0} shell: msys2 {0}
env: env:
# MSYSTEM is a built-in environment variable of MSYS2.
# Do not use this environment variable name.
MATRIX_MSYSTEM: ${{ matrix.msystem }}
BRANCH: ${{ github.head_ref || github.ref_name }} BRANCH: ${{ github.head_ref || github.ref_name }}
BUILD_VERSION: ${{ inputs.release_version }} BUILD_VERSION: ${{ inputs.release_version }}
COMMIT: ${{ inputs.release_commit }} COMMIT: ${{ inputs.release_commit }}
run: | run: |
# setup NodeJS PATH
if [[ "${MATRIX_MSYSTEM}" != "ucrt64" ]]; then
NODEJS_PATH=$(cygpath "$NODEJS_PATH")
export PATH="$PATH:$NODEJS_PATH"
fi
mkdir -p build mkdir -p build
cmake \ cmake \
-B build \ -B build \

View file

@ -161,7 +161,6 @@ dependencies=(
"mingw-w64-${TOOLCHAIN}-doxygen" # Optional, for docs... better to install official Doxygen "mingw-w64-${TOOLCHAIN}-doxygen" # Optional, for docs... better to install official Doxygen
"mingw-w64-${TOOLCHAIN}-graphviz" # Optional, for docs "mingw-w64-${TOOLCHAIN}-graphviz" # Optional, for docs
"mingw-w64-${TOOLCHAIN}-miniupnpc" "mingw-w64-${TOOLCHAIN}-miniupnpc"
"mingw-w64-${TOOLCHAIN}-nodejs"
"mingw-w64-${TOOLCHAIN}-onevpl" "mingw-w64-${TOOLCHAIN}-onevpl"
"mingw-w64-${TOOLCHAIN}-openssl" "mingw-w64-${TOOLCHAIN}-openssl"
"mingw-w64-${TOOLCHAIN}-opus" "mingw-w64-${TOOLCHAIN}-opus"
@ -170,6 +169,7 @@ dependencies=(
if [[ "${MSYSTEM}" == "UCRT64" ]]; then if [[ "${MSYSTEM}" == "UCRT64" ]]; then
dependencies+=( dependencies+=(
"mingw-w64-${TOOLCHAIN}-MinHook" "mingw-w64-${TOOLCHAIN}-MinHook"
"mingw-w64-${TOOLCHAIN}-nodejs"
"mingw-w64-${TOOLCHAIN}-nsis" "mingw-w64-${TOOLCHAIN}-nsis"
) )
fi fi
@ -178,6 +178,8 @@ pacman -S "${dependencies[@]}"
To create a WiX installer, you also need to install [.NET](https://dotnet.microsoft.com/download). To create a WiX installer, you also need to install [.NET](https://dotnet.microsoft.com/download).
For ARM64: To build frontend, you also need to install [Node.JS](https://nodejs.org/en/download)
### Clone ### Clone
Ensure [git](https://git-scm.com) is installed on your system, then clone the repository using the following command: Ensure [git](https://git-scm.com) is installed on your system, then clone the repository using the following command:

View file

@ -22,10 +22,6 @@
"@vitejs/plugin-vue": "6.0.1", "@vitejs/plugin-vue": "6.0.1",
"serve": "14.2.5", "serve": "14.2.5",
"vite": "6.3.6", "vite": "6.3.6",
"vite-plugin-ejs": "1.7.0", "vite-plugin-ejs": "1.7.0"
"@rollup/wasm-node": "4.57.1"
},
"overrides": {
"rollup": "npm:@rollup/wasm-node@4.57.1"
} }
} }

View file

@ -695,7 +695,7 @@ elif grep -q "Debian GNU/Linux 12 (bookworm)" /etc/os-release; then
cuda_version="12.9.1" cuda_version="12.9.1"
cuda_build="575.57.08" cuda_build="575.57.08"
gcc_version="13" gcc_version="13"
nvm_node=1 nvm_node=0
elif grep -q "Debian GNU/Linux 13 (trixie)" /etc/os-release; then elif grep -q "Debian GNU/Linux 13 (trixie)" /etc/os-release; then
distro="debian" distro="debian"
version="13" version="13"
@ -704,7 +704,7 @@ elif grep -q "Debian GNU/Linux 13 (trixie)" /etc/os-release; then
cuda_version="12.9.1" cuda_version="12.9.1"
cuda_build="575.57.08" cuda_build="575.57.08"
gcc_version="14" gcc_version="14"
nvm_node=1 nvm_node=0
elif grep -q "PLATFORM_ID=\"platform:f41\"" /etc/os-release; then elif grep -q "PLATFORM_ID=\"platform:f41\"" /etc/os-release; then
distro="fedora" distro="fedora"
version="41" version="41"