Skip to content

Commit 4e73913

Browse files
committed
build: generate agentos actor action types
1 parent 08c3935 commit 4e73913

78 files changed

Lines changed: 1362 additions & 1949 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/bench.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,13 @@ jobs:
2525
- uses: dtolnay/rust-toolchain@nightly
2626
with:
2727
targets: wasm32-wasip1
28-
- run: pnpm install --frozen-lockfile --filter '@rivet-dev/agentos-runtime-benchmarks...'
28+
- run: pnpm install --frozen-lockfile --filter '@rivet-dev/agentos-runtime-benchmarks...' --filter '@rivet-dev/agentos-runtime-core...' --filter '@rivet-dev/agentos-build-tools'
2929
- run: cargo build --release -p agentos-native-sidecar
3030
- run: cargo build --release -p agentos-native-baseline
3131
- run: cargo build --release --target wasm32-wasip1 -p agentos-native-baseline
3232
- run: make -C registry/native commands
3333
- run: node packages/runtime-core/scripts/copy-wasm-commands.mjs --require
34+
- run: pnpm --dir packages/runtime-core build
3435
- run: pnpm --dir packages/runtime-benchmarks bench:check
3536
- run: pnpm --dir packages/runtime-benchmarks bench:gate
3637
env:

.github/workflows/ci.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,13 +87,19 @@ jobs:
8787
- uses: dtolnay/rust-toolchain@stable
8888
with:
8989
components: rustfmt, clippy
90+
- name: Install wasm-pack
91+
run: |
92+
rustup target add wasm32-unknown-unknown
93+
curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
9094
- run: |
9195
rm -rf /tmp/docs-theme
9296
git clone https://github.com/rivet-dev/docs-theme.git /tmp/docs-theme
9397
git -C /tmp/docs-theme checkout 450c498555135098c6a927adfdf13458be9be22a
9498
rm -rf website/vendor/theme && mkdir -p website/vendor
9599
cp -r /tmp/docs-theme/packages/theme website/vendor/theme
96100
- run: pnpm install --frozen-lockfile
101+
- name: Install Playwright Chromium
102+
run: pnpm --dir packages/browser exec playwright install --with-deps chromium
97103
- uses: actions/download-artifact@v4
98104
with:
99105
name: wasm-commands

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ target/
1515
# TypeScript
1616
*.tsbuildinfo
1717
dist/
18+
packages/agentos/src/generated/
1819

1920
# IDE
2021
.vscode/
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
use std::path::PathBuf;
2+
3+
#[path = "src/actions/contract_surface.rs"]
4+
mod contract_surface;
5+
6+
fn main() {
7+
println!("cargo:rerun-if-changed=src/actions/contract_surface.rs");
8+
9+
let manifest_dir = PathBuf::from(std::env::var_os("CARGO_MANIFEST_DIR").unwrap());
10+
let generated_path = manifest_dir
11+
.join("../..")
12+
.join(contract_surface::GENERATED_ACTOR_ACTIONS_PATH);
13+
let parent = generated_path
14+
.parent()
15+
.expect("generated actor actions path must have a parent");
16+
17+
std::fs::create_dir_all(parent)
18+
.unwrap_or_else(|error| panic!("create {}: {error}", parent.display()));
19+
std::fs::write(&generated_path, contract_surface::render_actor_actions_ts())
20+
.unwrap_or_else(|error| panic!("write {}: {error}", generated_path.display()));
21+
}

0 commit comments

Comments
 (0)