-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Require --locked when building runtime #2813
Conversation
The drawback of this (that I didn't think about) is that people who do a change that requires modifying the |
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 needs to be configurable. You could add some env variable.
Otherwise the people will complain that they can not build the wasm files locally and need to switch to the directory to run cargo update
.
@TriplEight What can I do here? Is there an environment variable that tells us whether we are in the CI? |
there is also |
Actually I wanted to refactor all this process of building the wasm binaries, and I think I'll need @gabreal help. |
core/executor/wasm/build.sh
Outdated
@@ -6,7 +6,7 @@ if cargo --version | grep -q "nightly"; then | |||
else | |||
CARGO_CMD="cargo +nightly" | |||
fi | |||
CARGO_INCREMENTAL=0 RUSTFLAGS="-C link-arg=--export-table" $CARGO_CMD build --target=wasm32-unknown-unknown --release | |||
CARGO_INCREMENTAL=0 RUSTFLAGS="-C link-arg=--export-table" $CARGO_CMD build --target=wasm32-unknown-unknown --release $CARGO_BUILD_EXTRA_OPTIONS |
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.
haven't tested but wouldn't you need to append $@
instead of $CARGO_BUILD_EXTRA_OPTIONS
when you write further down in ./scripts/build.sh
:
./build.sh $CARGO_BUILD_EXTRA_OPTIONS
otherwise ^^ one is unneded if the env variable should be taken directly from the .gitlab-ci.yml
.
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.
Well, it's working, so I don't know.
scripts/build.sh
Outdated
@@ -19,7 +19,7 @@ do | |||
echo "*** Building wasm binaries in $SRC" | |||
cd "$PROJECT_ROOT/$SRC" | |||
|
|||
./build.sh | |||
./build.sh $CARGO_BUILD_EXTRA_OPTIONS |
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 is not required.
pass on arguments in build.sh scripts
Seems to work as well after @gabreal's changes. |
* Require --locked when building runtime * Update locks * Do it in a different way * Accidentally reverted Cargo.lock * pass on arguments in build.sh scripts
The CI runs the various
build.sh
files that are touched here.If someone performs changes that require an update of the
Cargo.lock
, this PR will force them to commit it.