-
Notifications
You must be signed in to change notification settings - Fork 19
CI build mode for WASM runtime artifact #1561
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
quasiyoke
wants to merge
13
commits into
master
Choose a base branch
from
runtime-artifact
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
6067905
WIP, CI: turn off jobs except new artifact demo
quasiyoke 8ee3a70
CI build mode for WASM runtime artifact
quasiyoke 371fe55
Remove false specificity from the `build` job key
quasiyoke 4c296c8
Make build with `evm-tracing` features marker the only runtime build
quasiyoke c6beae2
Enable building of only runtime's library via `--lib` key
quasiyoke 9759a0b
Systematize the naming of artifact properties
quasiyoke 862833c
Make cache key for runtime artifact more specific
quasiyoke dd1d620
Remove explicit "peer" indication as an artifact selector
quasiyoke b13fa0c
Allow ARTIFACT_NAME without explicit artifact marker
quasiyoke 645733d
Remove excess type strictness from `mode.artifactMarker`
quasiyoke 06391ae
Remove CLI build arguments `--package humanode-runtime --lib`
quasiyoke 39e2fad
`--bin humanode-runtime-build-selector` Cargo target
quasiyoke 992422b
`humanode-runtime-wasm-builder` crate as WASM build selector
quasiyoke File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| #!/usr/bin/env bash | ||
| set -euo pipefail | ||
|
|
||
| if [[ "$ARTIFACT_SELECTOR" == 'runtime' ]]; then | ||
| ARTIFACT_PATH='target/release/wbuild/humanode-runtime/humanode_runtime.compact.compressed.wasm' | ||
| ARTIFACT_NAME='humanode-runtime' | ||
|
|
||
| if [[ -n "$MODE_ARTIFACT_MARKER" ]]; then | ||
| ARTIFACT_NAME+="-$MODE_ARTIFACT_MARKER" | ||
| fi | ||
|
|
||
| ARTIFACT_NAME+='.wasm' | ||
| else | ||
| ARTIFACT_PATH='target/release/humanode-peer' | ||
| ARTIFACT_NAME="humanode-peer-$(rustc -vV | sed -n 's|host: ||p')" | ||
|
|
||
| if [[ "$PLATFORM_ARTIFACT_MARKER" != "" ]]; then | ||
| ARTIFACT_NAME="${ARTIFACT_NAME}-${PLATFORM_ARTIFACT_MARKER}" | ||
| fi | ||
|
|
||
| if [[ "${PATHEXT:-""}" != "" ]]; then | ||
| ARTIFACT_PATH="${ARTIFACT_PATH}.exe" | ||
| fi | ||
| fi | ||
|
|
||
| printf 'artifact-path=%s\n' "$ARTIFACT_PATH" >> "$GITHUB_OUTPUT" | ||
| printf 'artifact-name=%s\n' "$ARTIFACT_NAME" >> "$GITHUB_OUTPUT" | ||
|
|
||
| printf 'Packaged `%s` into `%s`.\n' \ | ||
| "$ARTIFACT_PATH" \ | ||
| "$ARTIFACT_NAME" \ | ||
| >> "$GITHUB_STEP_SUMMARY" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| [package] | ||
| name = "humanode-runtime-wasm-builder" | ||
| version = "0.1.0" | ||
| edition = "2021" | ||
| publish = false | ||
|
|
||
| [dependencies] | ||
| humanode-runtime = { path = "../humanode-runtime" } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| //! Stub binary target used to selectively build the WASM runtime via `build.rs`, | ||
| //! while ensuring consistent and correct feature resolution across the workspace. | ||
| //! | ||
| //! If you need to build only the `humanode-runtime` WASM, it will likely be incorrect to run | ||
| //! `cargo build --package humanode-runtime --lib`. While seemingly precise, `--package` would build | ||
| //! the WASM with the minimally acceptable — and likely untested — set of features. In contrast, | ||
| //! using `cargo build --bin humanode-runtime-wasm-builder` results in Cargo resolving features | ||
| //! at the workspace level. The runtime is compiled with the same feature set that has already been | ||
| //! tested through regular `--workspace` Cargo runs. | ||
|
|
||
| /// Stub binary entrypoint. | ||
| pub fn main() {} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be nice to have the syntax and formatting unified; I recommend using
Bash IDEandshellcheckextensionsThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shellcheck— I had it installed,BashIDE— I installed it, but it didn't offer any formatting corrections…