-
Notifications
You must be signed in to change notification settings - Fork 33
84 lines (71 loc) · 2.11 KB
/
Copy pathci.yml
File metadata and controls
84 lines (71 loc) · 2.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
name: CI
on:
pull_request:
push:
branches:
- main
workflow_dispatch:
permissions:
contents: read
concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
BUN_VERSION: 1.3.14
jobs:
package-smoke:
name: Package smoke / ${{ matrix.name }}
runs-on: ${{ matrix.runner }}
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
include:
- name: linux-x64
runner: ubuntu-24.04
target: bun-linux-x64
- name: darwin-arm64
runner: macos-14
target: bun-darwin-arm64
- name: darwin-x64
runner: macos-15-intel
target: bun-darwin-x64
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: ${{ env.BUN_VERSION }}
- name: Cache Bun install cache
uses: actions/cache@v4
with:
path: ~/.bun/install/cache
key: ${{ runner.os }}-${{ runner.arch }}-bun-${{ hashFiles('bun.lock') }}
restore-keys: |
${{ runner.os }}-${{ runner.arch }}-bun-
- name: Cache Cargo dependencies and native targets
uses: actions/cache@v4
with:
path: |
~/.cargo/git
~/.cargo/registry
native/markdown-renderer-napi/target
native/openai-compat-ws-v2-napi/target
key: ${{ runner.os }}-${{ runner.arch }}-cargo-${{ hashFiles('native/**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-${{ runner.arch }}-cargo-
- name: Set up Rust
run: |
rustup toolchain install stable --profile minimal
rustup default stable
- name: Install dependencies
run: bun install --frozen-lockfile
- name: Build and smoke-test package
run: |
OUT_DIR="$RUNNER_TEMP/ncode-package-smoke"
bun build/packageSmoke.mjs \
--build-mode external \
--target "${{ matrix.target }}" \
--out-dir "$OUT_DIR" \
--keep-output