Files
longbridge__developers/.github/workflows/build.yml
twosugar 482b92a197 ci(build): 用 frozen-lockfile + 依赖缓存,并加 verbose 定位 bun install 卡顿
CI 裸跑 bun install 曾卡 20+ 分钟且日志看不到进度(bun 进度条走 \r 不实时刷新)。
四个 install 步骤改为 bun install --frozen-lockfile --verbose:frozen 确定性安装、
lockfile 不符即快速失败;verbose 非 TTY 逐行输出,便于定位卡住的包。
前置 actions/cache 缓存 ~/.bun/install/cache(按 bun.lock 哈希),命中后基本不走网络。

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-08-28 16:49:14 +08:00

40 lines
861 B
YAML

name: Build
on:
pull_request:
push:
branches:
- "!main"
- "!canary"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
name: Build Test
timeout-minutes: 30
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
- uses: oven-sh/setup-bun@v2
- name: Cache bun dependencies
uses: actions/cache@v4
with:
path: ~/.bun/install/cache
key: bun-${{ runner.os }}-${{ hashFiles('bun.lock') }}
restore-keys: bun-${{ runner.os }}-
- name: Install dependencies
run: bun install --frozen-lockfile --verbose
- name: Build for canary
run: |
bun run build:canary
env:
NODE_OPTIONS: --max-old-space-size=14336 --expose-gc