Files
BYW-VoiceHub/patches/0051-fix-ci-Run-55-Nitro-OOM-10G-minify.patch
T

59 lines
2.5 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 7ee5e8b9e961b66bdd85a878407ac72f6b4ea1c9 Mon Sep 17 00:00:00 2001
From: HenryDu8133 <813367384@qq.com>
Date: Sat, 12 Sep 2026 13:59:14 +0800
Subject: [PATCH 51/58] =?UTF-8?q?fix(ci):=20=E8=A7=A3=E5=86=B3=20Run#55=20?=
=?UTF-8?q?Nitro=20=E5=86=8D=E6=AC=A1=20OOM=EF=BC=9A=E6=8F=90=E5=8D=87?=
=?UTF-8?q?=E5=A0=86=E4=B8=8A=E9=99=90=E5=88=B0=2010G=20=E5=B9=B6=E7=A6=81?=
=?UTF-8?q?=E7=94=A8=E5=8E=8B=E7=BC=A9/minify?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
- NODE_OPTIONS max-old-space-size 8192 → 10240,新增 --gc-interval=100000 主动 GC
- 构建前 drop_caches 清理页面缓存,降低系统级 RSS 压力
- 禁用 NITRO_MINIFY 与 DISABLE_ROLLDOWN,进一步降低峰值内存
- 构建前后打印内存快照,便于后续排障
---
.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 0b24984..793a110 100644
--- a/.gitea/workflows/deploy.yml
+++ b/.gitea/workflows/deploy.yml
@@ -64,8 +64,10 @@ 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"
+ NODE_OPTIONS: "--max-old-space-size=10240 --no-warnings --expose-gc --gc-interval=100000"
NITRO_PRESET: "node-server"
+ DISABLE_ROLLDOWN: "1"
+ NITRO_MINIFY: "false"
steps:
- name: 安装基础运行依赖(git/curl/ca-certificates/tar/xz-utils,Runner 自带)
run: |
@@ -198,13 +200,18 @@ jobs:
set -euxo pipefail
echo "=== 构建前系统内存状态 ==="
free -h || true
+ sync && echo 3 > /proc/sys/vm/drop_caches 2>/dev/null || true
echo "=== 开始执行 nuxt build ==="
- export NODE_OPTIONS="--max-old-space-size=8192 --no-warnings --expose-gc"
+ export NODE_OPTIONS="--max-old-space-size=10240 --no-warnings --expose-gc --gc-interval=100000"
export NITRO_PRESET=node-server
+ export NITRO_MINIFY=false
+ export DISABLE_ROLLDOWN=1
npm run build
echo "=== 构建完成,.output/ 生成结果 ==="
ls -la .output/ 2>/dev/null || true
du -sh .output 2>/dev/null || true
+ echo "=== 构建后内存状态 ==="
+ free -h || true
build-image:
name: 构建并推送容器镜像
--
2.45.1.windows.1