Files
BYW-VoiceHub/patches/0049-fix-ci-Run-53-Preflight-Nitro-OOM-exit-137.patch
T

50 lines
1.9 KiB
Diff
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
From 80b7c256b5c9a39fee3b0bbc95e7f380342dc2b2 Mon Sep 17 00:00:00 2001
From: HenryDu8133 <813367384@qq.com>
Date: Sat, 12 Sep 2026 12:57:32 +0800
Subject: [PATCH 49/58] =?UTF-8?q?fix(ci):=20=E4=BF=AE=E5=A4=8D=20Run#53=20?=
=?UTF-8?q?Preflight=20=E6=9E=84=E5=BB=BA=20Nitro=20=E6=97=B6=20OOM=20exit?=
=?UTF-8?q?=20137?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
- 将 NODE_OPTIONS max-old-space-size 从 4096 提升至 8192,并加入 preflight job 全局 env
- 构建前打印系统内存状态,便于排障
- 显式声明 NITRO_PRESET=node-server,避免构建阶段默认解析不确定性
---
.gitea/workflows/deploy.yml | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml
index 4b4df13..0b24984 100644
--- a/.gitea/workflows/deploy.yml
+++ b/.gitea/workflows/deploy.yml
@@ -64,6 +64,8 @@ jobs:
NODE_MAJOR: "22"
NODE_VERSION_FALLBACK: "22.13.0"
NODE_MIRROR_PRIMARY: "https://registry.npmmirror.com/-/binary/node"
+ NODE_OPTIONS: "--max-old-space-size=8192 --no-warnings --expose-gc"
+ NITRO_PRESET: "node-server"
steps:
- name: 安装基础运行依赖(git/curl/ca-certificates/tar/xz-utils,Runner 自带)
run: |
@@ -194,8 +196,13 @@ jobs:
- name: 执行 nuxt build
run: |
set -euxo pipefail
- NODE_OPTIONS="--max-old-space-size=4096" npm run build
- echo ".output/ 生成结果:"
+ echo "=== 构建前系统内存状态 ==="
+ free -h || true
+ echo "=== 开始执行 nuxt build ==="
+ export NODE_OPTIONS="--max-old-space-size=8192 --no-warnings --expose-gc"
+ export NITRO_PRESET=node-server
+ npm run build
+ echo "=== 构建完成,.output/ 生成结果 ==="
ls -la .output/ 2>/dev/null || true
du -sh .output 2>/dev/null || true
--
2.45.1.windows.1