Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Require --locked on CI for WASM runtime locks #285

Merged
merged 3 commits into from
Jun 11, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ test-linux-stable: &test
variables:
- $DEPLOY_TAG
script:
- ./scripts/build.sh
- ./scripts/build.sh --locked
- time cargo test --all --release --verbose --locked
- sccache -s

Expand All @@ -107,7 +107,7 @@ build-linux-release: &build
tags:
- linux-docker
script:
- ./scripts/build.sh
- ./scripts/build.sh --locked
- time cargo build --release --verbose
- mkdir -p ./artifacts
- mv ./target/release/polkadot ./artifacts/.
Expand Down
4 changes: 2 additions & 2 deletions ci/script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ case $TARGET in
sudo apt-get -y update
sudo apt-get install -y cmake pkg-config libssl-dev

cargo test --all --locked
cargo test --all --locked "$@"
;;

"wasm")
# Install prerequisites and build all wasm projects
./scripts/init.sh
./scripts/build.sh
./scripts/build.sh --locked "$@"
;;
esac
1 change: 1 addition & 0 deletions runtime/wasm/Cargo.lock

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

2 changes: 1 addition & 1 deletion runtime/wasm/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ if cargo --version | grep -q "nightly"; then
else
CARGO_CMD="cargo +nightly"
fi
RUSTFLAGS="-C link-arg=--export-table" $CARGO_CMD build --target=wasm32-unknown-unknown --release
RUSTFLAGS="-C link-arg=--export-table" $CARGO_CMD build --target=wasm32-unknown-unknown --release $@
for i in polkadot_runtime
do
wasm-gc target/wasm32-unknown-unknown/release/$i.wasm target/wasm32-unknown-unknown/release/$i.compact.wasm
Expand Down
2 changes: 1 addition & 1 deletion scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ do
echo "*** Building wasm binaries in $SRC"
cd "$PROJECT_ROOT/$SRC"

./build.sh
./build.sh "$@"

cd - >> /dev/null
done
Expand Down
2 changes: 1 addition & 1 deletion test-parachains/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export RUSTFLAGS="-C link-arg=--import-memory -C link-arg=--export-table -C pani
for i in adder
do
cd $i/wasm
cargo +nightly build --target=wasm32-unknown-unknown --release --no-default-features --target-dir target
cargo +nightly build --target=wasm32-unknown-unknown --release --no-default-features --target-dir target "$@"
wasm-gc target/wasm32-unknown-unknown/release/$i'_'wasm.wasm target/wasm32-unknown-unknown/release/$i.wasm
cp target/wasm32-unknown-unknown/release/$i.wasm ../../../parachain/tests/res/
rm -rf target
Expand Down