mirror of
https://github.com/longbridge/developers.git
synced 2026-09-19 03:34:09 +08:00
482b92a197
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>
40 lines
861 B
YAML
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
|