Skip to content

Commit

Permalink
feat(test-tooling): rust compiler container for wasm builds
Browse files Browse the repository at this point in the history
Uses the stock rust container image from DockerHub
Can do regular cargo builds and wasm-pack as well.

This can be used to author test cases related to the API
server being able to load WASM modules as Cactus
plugins in the near future (this commit is part of the
effort to build out the scaffolding of tests prior to
getting the actual feature implemented)

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
  • Loading branch information
petermetz committed Jun 26, 2021
1 parent d40f68b commit ad7cdc0
Show file tree
Hide file tree
Showing 15 changed files with 979 additions and 307 deletions.
446 changes: 141 additions & 305 deletions packages/cactus-cockpit/package-lock.json

Large diffs are not rendered by default.

124 changes: 123 additions & 1 deletion packages/cactus-test-tooling/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion packages/cactus-test-tooling/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -102,11 +102,15 @@
},
"devDependencies": {
"@types/dockerode": "2.5.28",
"@types/esm": "3.2.0",
"@types/fs-extra": "8.1.0",
"@types/joi": "14.3.4",
"@types/node-ssh": "7.0.0",
"@types/ssh2": "0.5.46",
"@types/ssh2-streams": "0.1.8",
"@types/tar-stream": "2.1.0"
"@types/tar-stream": "2.1.0",
"@types/temp": "0.9.0",
"esm": "3.2.25",
"temp": "0.9.4"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,14 @@ export {
SampleCordappEnum,
} from "./corda/sample-cordapp-enum";

export {
IRustcContainerOptions,
K_DEFAULT_RUSTC_CONTAINER_CMD,
RustcContainer,
} from "./rustc-container/rustc-container";

export { RustcBuildCmd } from "./rustc-container/rustc-build-cmd";

export { Streams } from "./common/streams";

export { isRunningInGithubAction } from "./github-actions/is-running-in-github-action";
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
export const RustcBuildCmd = {
CARGO_BUILD_RELEASE: ["cargo", "build", "--release"],
WASM_PACK_BUILD_BUNDLER: [
"wasm-pack",
"build",
"--release",
"--target=bundler",
],
WASM_PACK_BUILD_NODEJS: [
"wasm-pack",
"build",
"--release",
"--target=nodejs",
],
WASM_PACK_BUILD_WEB: ["wasm-pack", "build", "--release", "--target=web"],
};
Loading

0 comments on commit ad7cdc0

Please sign in to comment.