Repository navigation
62 lines (59 loc) · 3.12 KB
/
Copy pathscript-runner.yml
File metadata and controls
62 lines (59 loc) · 3.12 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
name: Script runner
on:
push:
branches: [master, "train/**"]
paths: ["clients/script-runner/**", "clients/subc-client/**", "clients/subc-registration-native/**", "crates/subc-os/**", "Cargo.lock", ".github/workflows/script-runner.yml"]
pull_request:
paths: ["clients/script-runner/**", "clients/subc-client/**", "clients/subc-registration-native/**", "crates/subc-os/**", "Cargo.lock", ".github/workflows/script-runner.yml"]
permissions:
contents: read
jobs:
build:
name: Compiled Bun (${{ matrix.platform }}-${{ matrix.arch }})
runs-on: ${{ matrix.os }}
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
include:
- {os: ubuntu-latest, platform: linux, arch: x64, target: x86_64-unknown-linux-gnu, library: libsubc_registration_native.so, bun-target: bun-linux-x64, test: true}
- {os: ubuntu-24.04-arm, platform: linux, arch: arm64, target: aarch64-unknown-linux-gnu, library: libsubc_registration_native.so, bun-target: bun-linux-arm64, test: true}
- {os: macos-15-intel, platform: darwin, arch: x64, target: x86_64-apple-darwin, library: libsubc_registration_native.dylib, bun-target: bun-darwin-x64, test: true}
- {os: macos-latest, platform: darwin, arch: arm64, target: aarch64-apple-darwin, library: libsubc_registration_native.dylib, bun-target: bun-darwin-arm64, test: true}
- {os: windows-latest, platform: win32, arch: x64, target: x86_64-pc-windows-msvc, library: subc_registration_native.dll, bun-target: bun-windows-x64, test: true}
- {os: windows-latest, platform: win32, arch: arm64, target: aarch64-pc-windows-msvc, library: subc_registration_native.dll, bun-target: bun-windows-arm64, test: false}
steps:
- uses: actions/checkout@v5
- uses: oven-sh/setup-bun@v2
with:
bun-version: "1.4.4"
- uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
- name: Build target registration helper
run: cargo build --locked --release -p subc-registration-native --target ${{ matrix.target }}
- name: Stage embedded helper
shell: bash
run: |
mkdir -p clients/subc-client/native
cp "target/${{ matrix.target }}/release/${{ matrix.library }}" "clients/subc-client/native/subc-registration-${{ matrix.platform }}-${{ matrix.arch }}.node"
- name: Install
working-directory: clients/script-runner
run: bun install --frozen-lockfile
- name: Typecheck
working-directory: clients/script-runner
run: bun run typecheck
- name: Compile target runner
working-directory: clients/script-runner
env:
BUN_COMPILE_TARGET: ${{ matrix.bun-target }}
run: bun run build
- name: Test compiled host runner
if: ${{ !cancelled() && matrix.test }}
working-directory: clients/script-runner
run: bun test tests/runner.test.ts
- uses: actions/upload-artifact@v4
with:
name: script-runner-${{ matrix.platform }}-${{ matrix.arch }}
path: clients/script-runner/dist/ck-script-runner-bun*
if-no-files-found: error