-
Notifications
You must be signed in to change notification settings - Fork 6
133 lines (113 loc) · 4.31 KB
/
Copy pathci.yml
File metadata and controls
133 lines (113 loc) · 4.31 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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
workflow_call:
inputs:
ref:
description: Exact commit to validate before publishing
required: true
type: string
permissions:
contents: read
concurrency:
group: "ci-${{ github.workflow }}-${{ inputs.ref || github.ref }}"
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
build:
name: Build
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
with:
ref: ${{ inputs.ref || github.sha }}
- name: Use Node.js
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020
with:
node-version: "lts/*"
cache: "npm"
- name: Install dependencies
run: npm ci
- name: Check formatting
run: npm run format:check
- name: Run linter
run: npm run lint
- name: Build
run: npm run build
- name: Run deterministic contract tests
run: npm run test:unit
- name: Packed install smoke
run: npm run test:pack-smoke
muse-loopback:
name: Muse loopback integration
# Muse 1.1.1's bwrap cannot create its loopback namespace under Ubuntu
# 24.04's default AppArmor policy. Keep sandboxed execution enabled on 22.04.
runs-on: ubuntu-22.04
timeout-minutes: 25
needs: build
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
with:
ref: ${{ inputs.ref || github.sha }}
- name: Use Node.js
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020
with:
node-version: "lts/*"
cache: "npm"
- name: Install dependencies
run: npm ci
- name: Build
run: npm run build
# Pinned public artifact and SHA-256 from Meta's 1.1.1-R2514.1 manifest.
- name: Install verified Muse Code CLI
run: |
set -euo pipefail
mkdir -p "$RUNNER_TEMP/muse-code"
curl --fail --location --silent --show-error --retry 3 \
'https://lookaside.facebook.com/lookaside/muse/download/?channel=muse&version=1.1.1-R2514.1&file=muse-x86-linux' \
--output "$RUNNER_TEMP/muse-code/muse"
echo "47908f2e5b0ac5b0c0ba147a48b30a9e48c0aebea3c5cc891ad34d95425a4993 $RUNNER_TEMP/muse-code/muse" | sha256sum --check
chmod +x "$RUNNER_TEMP/muse-code/muse"
echo "$RUNNER_TEMP/muse-code" >> "$GITHUB_PATH"
echo "MUSE_CODE_EXECUTABLE=$RUNNER_TEMP/muse-code/muse" >> "$GITHUB_ENV"
"$RUNNER_TEMP/muse-code/muse" --version
"$RUNNER_TEMP/muse-code/muse" serve --help >/dev/null
- name: Run required real-host loopback suites
run: npm run test:muse-loopback
env:
MUSE_CODE_ACP_REQUIRE_MUSE: "1"
standalone:
name: Standalone macOS ARM64
runs-on: macos-15
timeout-minutes: 15
needs: build
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
with:
ref: ${{ inputs.ref || github.sha }}
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020
with:
node-version: "26.8.2"
cache: "npm"
- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6
with:
bun-version: "1.3.3"
- run: npm ci
- run: npm run build
- run: npm run build:standalone
- name: Install verified external Muse host
run: |
set -euo pipefail
mkdir -p "$RUNNER_TEMP/muse-code"
curl --fail --location --silent --show-error --retry 3 \
'https://lookaside.facebook.com/lookaside/muse/download/?channel=muse&version=1.1.1-R2514.1&file=muse-aarch64-macos' \
--output "$RUNNER_TEMP/muse-code/muse"
echo "7dfd75e1e2dd7c763e60b7e379f4146b8b2b10478a2830c8cdbb35ae9961881e $RUNNER_TEMP/muse-code/muse" | shasum -a 256 --check
chmod +x "$RUNNER_TEMP/muse-code/muse"
echo "MUSE_CODE_EXECUTABLE=$RUNNER_TEMP/muse-code/muse" >> "$GITHUB_ENV"
- name: Standalone real-host smoke without Node on PATH
run: npm run test:standalone -- "$PWD/artifacts/standalone/muse-code-acp-v$(node -p 'require("./package.json").version')-darwin-arm64/muse-code-acp"