-
Notifications
You must be signed in to change notification settings - Fork 172
131 lines (127 loc) · 4.82 KB
/
Copy pathci.yml
File metadata and controls
131 lines (127 loc) · 4.82 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
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
checks:
name: Checks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version: 22
cache: pnpm
cache-dependency-path: pnpm-lock.yaml
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt
- run: |
rm -rf /tmp/docs-theme
git clone https://github.com/rivet-dev/docs-theme.git /tmp/docs-theme
git -C /tmp/docs-theme checkout 450c498555135098c6a927adfdf13458be9be22a
rm -rf website/vendor/theme && mkdir -p website/vendor
cp -r /tmp/docs-theme/packages/theme website/vendor/theme
- run: pnpm install --frozen-lockfile
- run: |
if grep -qE '^[[:space:]]*-[[:space:]]*website[[:space:]]*$' pnpm-workspace.yaml; then
npx turbo build --filter='!@agentos/website'
else
npx turbo build
fi
- run: pnpm --dir scripts/publish run check-types
- run: pnpm --dir scripts/publish test
- run: node --test scripts/check-rust-package-metadata.test.mjs
- run: node scripts/check-rust-package-metadata.mjs
- run: node --test scripts/check-agentos-client-protocol-compat.test.mjs
- run: node scripts/check-agentos-client-protocol-compat.mjs
- run: node --test scripts/verify-fixed-versions.test.mjs
- run: node scripts/verify-fixed-versions.mjs
- run: cargo fmt --check
- run: pnpm check-types
- run: pnpm lint
continue-on-error: true
wasm-commands:
name: WASM Commands
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version: 22
cache: pnpm
cache-dependency-path: pnpm-lock.yaml
- uses: dtolnay/rust-toolchain@nightly
with:
targets: wasm32-wasip1
- uses: Swatinem/rust-cache@v2
with:
workspaces: registry/native -> target
cache-workspace-crates: true
key: wasm-commands-${{ hashFiles('registry/native/Cargo.lock') }}
- run: pnpm install --frozen-lockfile --filter '@rivet-dev/agentos-runtime-core...'
- run: make -C registry/native commands
- run: node packages/runtime-core/scripts/copy-wasm-commands.mjs --require
- uses: actions/upload-artifact@v4
with:
name: wasm-commands
path: packages/runtime-core/commands
if-no-files-found: error
rust:
name: Rust
needs: [wasm-commands]
runs-on: [self-hosted, agentos-builder]
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version: 22
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- name: Install wasm-pack
run: |
rustup target add wasm32-unknown-unknown
curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
- run: |
rm -rf /tmp/docs-theme
git clone https://github.com/rivet-dev/docs-theme.git /tmp/docs-theme
git -C /tmp/docs-theme checkout 450c498555135098c6a927adfdf13458be9be22a
rm -rf website/vendor/theme && mkdir -p website/vendor
cp -r /tmp/docs-theme/packages/theme website/vendor/theme
- run: pnpm install --frozen-lockfile
- name: Install Playwright Chromium
run: pnpm --dir packages/browser exec playwright install --with-deps chromium
- uses: actions/download-artifact@v4
with:
name: wasm-commands
path: packages/runtime-core/commands
- run: node packages/runtime-core/scripts/copy-wasm-commands.mjs --require
- run: |
if grep -qE '^[[:space:]]*-[[:space:]]*website[[:space:]]*$' pnpm-workspace.yaml; then
npx turbo build --filter='!@agentos/website'
else
npx turbo build
fi
- run: cargo clippy --workspace --all-targets -- -D warnings
- run: cargo test -p agentos-protocol -- --test-threads=1
- run: cargo test -p agentos-sidecar -- --test-threads=1
- run: cargo test -p agentos-client -- --test-threads=1
env:
AGENT_OS_CLIENT_ALLOW_E2E_SKIPS: '1'
- name: Reclaim Cargo target space before package tests
run: |
df -h .
cargo clean
df -h .
- if: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository }}
run: pnpm test
env:
AGENTOS_E2E_NETWORK: '1'
- if: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository }}
run: pnpm test