-
Notifications
You must be signed in to change notification settings - Fork 120
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
Use binaryen-rs as dep instead of requiring manual wasm-opt installation #95
Conversation
The build fails currently in CI while building Edit: Found it. |
962183c
to
f618a90
Compare
34d9b64
to
7eee232
Compare
.gitlab-ci.yml
Outdated
@@ -17,6 +17,9 @@ variables: | |||
CARGO_TARGET_DIR: "/ci-cache/${CI_PROJECT_NAME}/targets/${CI_COMMIT_REF_NAME}/${CI_JOB_NAME}" | |||
RUST_LIB_BACKTRACE: "0" | |||
|
|||
# Necessary for building binaryen-sys, which is part of the binaryen dependency | |||
CXX: "/usr/bin/clang++-8" |
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.
are you sure you want to put it on the top level? Means everything will be linked anew now. Similarly, we could put it in the CI image.
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.
I'm not sure about possible side-effects it would have other projects using this image? Which projects use this base image? Just ink! and cargo-contract
?
Regarding top-level: It's needed for all the stages in the file (test
, build
, fmt
), so yeah linking anew is needed for all of them.
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.
It's just ink that uses ink-ci-linux
image currently. So yeah, if yoou need it everywhere, and if you'd use the CI image as a build local env (as it's possible with vscode), and maybe if someone compiles ink! externally, that'd make sense to introduce this variable to an image.
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.
Good point, I created paritytech/scripts#235.
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.
❤️ this
.arg("-o") | ||
.arg(optimized.as_os_str()) | ||
.output()?; | ||
let codegen_config = binaryen::CodegenConfig { |
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.
Job for a follow up, would be good to be able to configure these
@ascjones don't you need the same change in your CI env? |
@TriplEight I just updated the |
cargo-contract is installed fine to the CI image, it's this what needs to be fixed: paritytech/canvas#21 |
Closes #91.