Skip to content

Commit 070c7dc

Browse files
committed
build: generate agentos actor action types
1 parent 08c3935 commit 070c7dc

70 files changed

Lines changed: 1282 additions & 1929 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:

.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: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
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+
println!("cargo:rerun-if-env-changed=AGENTOS_ACTOR_ACTIONS_GENERATE");
9+
10+
let manifest_dir = PathBuf::from(std::env::var_os("CARGO_MANIFEST_DIR").unwrap());
11+
let generated_path = manifest_dir
12+
.join("../..")
13+
.join(contract_surface::GENERATED_ACTOR_ACTIONS_PATH);
14+
let parent = generated_path
15+
.parent()
16+
.expect("generated actor actions path must have a parent");
17+
18+
std::fs::create_dir_all(parent)
19+
.unwrap_or_else(|error| panic!("create {}: {error}", parent.display()));
20+
std::fs::write(&generated_path, contract_surface::render_actor_actions_ts())
21+
.unwrap_or_else(|error| panic!("write {}: {error}", generated_path.display()));
22+
}

0 commit comments

Comments
 (0)