接入 DotCraft Unity 编辑器插件
Project CI / AI game creator shell Rust shard 1/4 (pull_request) Successful in 6m41s
Project CI / AI game creator shell Rust shard 3/4 (pull_request) Successful in 7m8s
Project CI / AI game creator shell Rust shard 2/4 (pull_request) Successful in 7m16s
Project CI / AI game creator shell Rust shard 4/4 (pull_request) Successful in 7m38s
Project CI / AI game creator shell Rust smoke (pull_request) Successful in 2m11s
Project CI / AI game creator shell Rust crates (pull_request) Successful in 3m11s
Project CI / Repository checks (pull_request) Successful in 4m22s
Project CI / Frontend tests (pull_request) Successful in 5m52s
Project CI / Native shell tests (pull_request) Successful in 9m52s
Project CI / Backend tests (pull_request) Successful in 11m3s
Project CI / AI game creator shell web tests (pull_request) Successful in 6m41s
Project CI / AI game creator shell Rust shard 1/4 (pull_request) Successful in 6m41s
Project CI / AI game creator shell Rust shard 3/4 (pull_request) Successful in 7m8s
Project CI / AI game creator shell Rust shard 2/4 (pull_request) Successful in 7m16s
Project CI / AI game creator shell Rust shard 4/4 (pull_request) Successful in 7m38s
Project CI / AI game creator shell Rust smoke (pull_request) Successful in 2m11s
Project CI / AI game creator shell Rust crates (pull_request) Successful in 3m11s
Project CI / Repository checks (pull_request) Successful in 4m22s
Project CI / Frontend tests (pull_request) Successful in 5m52s
Project CI / Native shell tests (pull_request) Successful in 9m52s
Project CI / Backend tests (pull_request) Successful in 11m3s
Project CI / AI game creator shell web tests (pull_request) Successful in 6m41s
新增内置 Unity 插件与自包含 Attach helper,固定上游版本并保留许可证 统一 Runner 执行归属、项目身份校验、回执确认和不确定结果阻断 接入 Unity 工程导入、Agent 工具目录及 Windows 构建分发 补齐插件测试、CI 执行入口和 Windows .NET 10 工具链检查 记录真实 Unity 连接、执行、重载恢复及 Runner 边界验证
This commit is contained in:
@@ -2329,12 +2329,24 @@ const steps = [
|
||||
command: npmCommand,
|
||||
args: ['run', 'ai-game-creator-shell:check:web'],
|
||||
},
|
||||
{
|
||||
group: 'agc-web',
|
||||
label: 'agc-plugin-entry-tests',
|
||||
command: npmCommand,
|
||||
args: ['run', 'agc:plugins:test'],
|
||||
},
|
||||
{
|
||||
group: 'agc-rust-crates',
|
||||
label: 'ai-game-creator-shell-check-rust-crates',
|
||||
command: npmCommand,
|
||||
args: ['run', 'ai-game-creator-shell:check:rust:crates'],
|
||||
},
|
||||
{
|
||||
group: 'agc-rust-crates',
|
||||
label: 'agc-plugin-native-tests',
|
||||
command: npmCommand,
|
||||
args: ['run', 'agc:plugins:native-test'],
|
||||
},
|
||||
{
|
||||
group: 'agc-rust-shard-1',
|
||||
label: 'ai-game-creator-shell-check-rust-shard-1',
|
||||
|
||||
@@ -15,6 +15,7 @@ export const REQUIRED_WORKSPACES = Object.freeze([
|
||||
'packages/agc-plugin-sdk',
|
||||
'packages/shared',
|
||||
'plugins/agc-cocos-editor',
|
||||
'plugins/agc-unity-editor',
|
||||
'tools/spine-json-export-validator',
|
||||
]);
|
||||
|
||||
@@ -29,6 +30,7 @@ const WORKSPACE_NAMES = Object.freeze({
|
||||
'packages/agc-plugin-sdk': '@genarrative/agc-plugin-sdk',
|
||||
'packages/shared': '@genarrative/shared',
|
||||
'plugins/agc-cocos-editor': '@genarrative/agc-plugin-cocos-editor',
|
||||
'plugins/agc-unity-editor': '@genarrative/agc-plugin-unity-editor',
|
||||
'tools/spine-json-export-validator':
|
||||
'@genarrative/spine-json-export-validator',
|
||||
});
|
||||
@@ -50,6 +52,7 @@ const REQUIRED_LOCAL_DEPENDENCIES = Object.freeze({
|
||||
'@genarrative/image-canvas-core',
|
||||
],
|
||||
'plugins/agc-cocos-editor/package.json': ['@genarrative/agc-plugin-sdk'],
|
||||
'plugins/agc-unity-editor/package.json': ['@genarrative/agc-plugin-sdk'],
|
||||
});
|
||||
|
||||
const DEPENDENCY_FIELDS = Object.freeze([
|
||||
|
||||
@@ -23,6 +23,7 @@ const workspaceNames = {
|
||||
'packages/agc-plugin-sdk': '@genarrative/agc-plugin-sdk',
|
||||
'packages/shared': '@genarrative/shared',
|
||||
'plugins/agc-cocos-editor': '@genarrative/agc-plugin-cocos-editor',
|
||||
'plugins/agc-unity-editor': '@genarrative/agc-plugin-unity-editor',
|
||||
'tools/spine-json-export-validator':
|
||||
'@genarrative/spine-json-export-validator',
|
||||
};
|
||||
@@ -37,6 +38,7 @@ const localDependencies = {
|
||||
'apps/mobile-shell': { '@genarrative/shared': '0.1.0' },
|
||||
'packages/image-canvas-react': { '@genarrative/image-canvas-core': '0.1.0' },
|
||||
'plugins/agc-cocos-editor': { '@genarrative/agc-plugin-sdk': '0.1.0' },
|
||||
'plugins/agc-unity-editor': { '@genarrative/agc-plugin-sdk': '0.1.0' },
|
||||
};
|
||||
|
||||
afterEach(() => {
|
||||
|
||||
@@ -6,7 +6,7 @@ const checks = [
|
||||
{
|
||||
file: 'package.json',
|
||||
includes:
|
||||
'"check:rustfmt": "cargo fmt --all --manifest-path server-rs/Cargo.toml -- --check && cargo fmt --all --manifest-path apps/ai-game-creator-shell/src-tauri/Cargo.toml -- --check"',
|
||||
'"check:rustfmt": "cargo fmt --all --manifest-path server-rs/Cargo.toml -- --check && cargo fmt --all --manifest-path apps/ai-game-creator-shell/src-tauri/Cargo.toml -- --check && cargo fmt --all --manifest-path plugins/agc-unity-editor/native/unity-editor-bridge/Cargo.toml -- --check"',
|
||||
reason: '仓库必须保留统一、只读的 Rust workspace 格式检查入口。',
|
||||
},
|
||||
{
|
||||
|
||||
@@ -15,6 +15,11 @@ export const RUSTFMT_WORKSPACES = [
|
||||
prefix: 'apps/ai-game-creator-shell/src-tauri/',
|
||||
manifestPath: 'apps/ai-game-creator-shell/src-tauri/Cargo.toml',
|
||||
},
|
||||
{
|
||||
prefix: 'plugins/agc-unity-editor/native/unity-editor-bridge/',
|
||||
manifestPath:
|
||||
'plugins/agc-unity-editor/native/unity-editor-bridge/Cargo.toml',
|
||||
},
|
||||
];
|
||||
|
||||
/**
|
||||
|
||||
@@ -37,15 +37,17 @@ describe('lint-staged Rust 格式检查的 workspace 选择', () => {
|
||||
).toEqual(['apps/ai-game-creator-shell/src-tauri/Cargo.toml']);
|
||||
});
|
||||
|
||||
test('两个 workspace 都有暂存文件时两个都查', () => {
|
||||
test('多个 workspace 都有暂存文件时分别检查', () => {
|
||||
expect(
|
||||
selectedManifests([
|
||||
'server-rs/crates/api-server/src/editor_project.rs',
|
||||
'apps/ai-game-creator-shell/src-tauri/src/assets.rs',
|
||||
'plugins/agc-unity-editor/native/unity-editor-bridge/src/lib.rs',
|
||||
]),
|
||||
).toEqual([
|
||||
'server-rs/Cargo.toml',
|
||||
'apps/ai-game-creator-shell/src-tauri/Cargo.toml',
|
||||
'plugins/agc-unity-editor/native/unity-editor-bridge/Cargo.toml',
|
||||
]);
|
||||
});
|
||||
|
||||
|
||||
@@ -416,6 +416,12 @@ describe('project CI workflow', () => {
|
||||
const webJob = jobSection('ai-game-creator-shell-web-tests');
|
||||
expect(webJob).toContain('run: npm run check:native-shells:agc-web');
|
||||
expect(webJob).not.toContain('cargo fetch');
|
||||
expect(nativeShellGateScript).toMatch(
|
||||
/group: 'agc-web',[\s\S]*?args: \['run', 'agc:plugins:test'\]/u,
|
||||
);
|
||||
expect(rootPackageJson.scripts?.['agc:plugins:test']).toContain(
|
||||
'plugins/agc-unity-editor/src/entry.test.mjs',
|
||||
);
|
||||
|
||||
// 壳 bin 单测按名单分 4 片,一片一个 job:每个片 job 只跑自己那片,且只预热 AGC 壳
|
||||
// 自己那份锁定依赖(server-rs 那份归 crate 级 job)。
|
||||
@@ -458,6 +464,12 @@ describe('project CI workflow', () => {
|
||||
);
|
||||
expect(cratesJob).toContain('server-rs/Cargo.toml');
|
||||
expect(cratesJob).toContain('cargo fetch --locked');
|
||||
expect(nativeShellGateScript).toMatch(
|
||||
/group: 'agc-rust-crates',[\s\S]*?args: \['run', 'agc:plugins:native-test'\]/u,
|
||||
);
|
||||
expect(rootPackageJson.scripts?.['agc:plugins:native-test']).toContain(
|
||||
'cargo test --locked --manifest-path plugins/agc-unity-editor/native/unity-editor-bridge/Cargo.toml',
|
||||
);
|
||||
|
||||
// 拆开的 web / rust 两段必须还是原 `ai-game-creator-shell:check` 的同一条命令序列,
|
||||
// rust 段再拆成 crate 级与壳分片两段后在聚合脚本里保持同序。
|
||||
@@ -515,13 +527,22 @@ describe('project CI workflow', () => {
|
||||
for (const manifest of [
|
||||
'server-rs/crates/agent-runtime-core/Cargo.toml',
|
||||
'server-rs/crates/agent-runtime-orchestration/Cargo.toml',
|
||||
'plugins/agc-cocos-editor/native/cocos-editor-bridge/Cargo.toml',
|
||||
]) {
|
||||
expect(standaloneStep).toContain(manifest);
|
||||
}
|
||||
// 这两个 crate 没有提交 Cargo.lock,只能用不带 --locked 的 fetch:
|
||||
// 这些 crate 没有提交 Cargo.lock,只能用不带 --locked 的 fetch:
|
||||
// 带 --locked 会因为缺少锁文件直接失败。
|
||||
expect(standaloneStep).toContain('cargo fetch \\');
|
||||
expect(standaloneStep).not.toContain('cargo fetch --locked');
|
||||
const unityStep = stepSection(
|
||||
'ai-game-creator-shell-rust-crates',
|
||||
'Prepare Unity plugin Rust dependencies',
|
||||
);
|
||||
expect(unityStep).toContain('cargo fetch --locked');
|
||||
expect(unityStep).toContain(
|
||||
'plugins/agc-unity-editor/native/unity-editor-bridge/Cargo.toml',
|
||||
);
|
||||
|
||||
const cratesJob = jobSection('ai-game-creator-shell-rust-crates');
|
||||
expect(
|
||||
|
||||
Reference in New Issue
Block a user