From 1628f537eb9c68c2085dd3f7df44de7e5b747f00 Mon Sep 17 00:00:00 2001 From: Benjamin Kampmann Date: Thu, 16 Jul 2020 13:54:50 +0200 Subject: [PATCH] Regression test to ensure we don't break deterministic builds in wasm (#6597) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Regression test to ensure we don't break deterministic builds in wasm again * Apply suggestions from code review Co-authored-by: s3krit * Update .gitlab-ci.yml Co-authored-by: s3krit Co-authored-by: s3krit Co-authored-by: Bastian Köcher --- substrate/.gitlab-ci.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/substrate/.gitlab-ci.yml b/substrate/.gitlab-ci.yml index 80b96b752a..b8e66d9eb7 100644 --- a/substrate/.gitlab-ci.yml +++ b/substrate/.gitlab-ci.yml @@ -193,6 +193,27 @@ cargo-check-subkey: - BUILD_DUMMY_WASM_BINARY=1 time cargo check --release - sccache -s +test-deterministic-wasm: + stage: test + <<: *docker-env + variables: + <<: *default-vars + except: + variables: + - $DEPLOY_TAG + script: + # build runtime + - WASM_BUILD_NO_COLOR=1 cargo build --verbose --release -p node-runtime + # make checksum + - sha256sum target/release/wbuild/target/wasm32-unknown-unknown/release/node_runtime.wasm > checksum.sha256 + # clean up – FIXME: can we reuse some of the artifacts? + - cargo clean + # build again + - WASM_BUILD_NO_COLOR=1 cargo build --verbose --release -p node-runtime + # confirm checksum + - sha256sum -c checksum.sha256 + - sccache -s + test-linux-stable: &test-linux stage: test <<: *docker-env