ci: upload pre-built artifacts#3213
Conversation
Co-authored-by: Tomas Fabrizio Orsi <tomas.orsi@lambdaclass.com>
|
Actually, I think this can be improved to avoid having to add the |
Agreed. The main question is probably whether we want the package to contain debug info or not, and this will depend on how the package is built before it is added to the cache. I guess the typical approach would be not to include debug info ("release mode"), but it might also be quite helpful to have a package with debug info available, so maybe it should be both? |
bitwalker
left a comment
There was a problem hiding this comment.
Just one issue that I think can be resolved by moving responsibility for this into the respective build scripts, otherwise 👍
| - name: Prepare artifacts | ||
| run: | | ||
| set -euo pipefail | ||
| cp "$(find target/release/build -path '*/out/assets/miden-protocol.masp')" protocol.masp |
There was a problem hiding this comment.
I'm concerned this could pick up previous build artifacts from the cache. Why not have the build script of the protocol/standards crates write the package output to $CARGO_MANIFEST_DIR/../target/$PROFILE/<package>.masp (you may need to adjust the the number of ../ segments based on the folder hierarchy of each crate).
Then you will always know that after building those crates, the .masp files under target/$PROFILE/ will be the exact ones you requested
Packages should always include debug info when published - it can be stripped as-needed (though we aren't publishing packages on-chain, so it isn't clear to me that packages even need to be stripped, but AIUI the client does strip debug info from the MAST in versions of MAST that store debug info as part of the MAST - no longer the case starting in v0.25). |
|
Btw. do we also plan to migrate |
Closes 0xMiden/midenup#200
Superseeds #2859.
This PR adds:
generate-packagesbinary that extracts the pre-built protocol and standards packages fromProtocolLib/StandardsLiband writes them totarget/packages. This was changed from thecargo -Zscriptapproach so the dependencies are resolved from the lockfile. The crate is excluded from the no-std build and clippy targets since it requires std.protocol.maspandstandards.maspto the GitHub release page so midenup can use them.