From 603cad154d296375c284fc1627c5093bf499a092 Mon Sep 17 00:00:00 2001 From: Benjamin Kampmann Date: Tue, 7 Jul 2020 16:06:41 +0200 Subject: [PATCH 1/3] Regression test to ensure we don't break deterministic builds in wasm again --- .gitlab-ci.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d3a7f36980063..86b04f3b2e60b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -193,6 +193,27 @@ cargo-check-subkey: - BUILD_DUMMY_WASM_BINARY=1 time cargo check --release - sccache -s +test-deterministic-wasm: &test-linux + 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 + + test-linux-stable: &test-linux stage: test <<: *docker-env From de649c78626c1259f9163b5766b0c637ce8f9717 Mon Sep 17 00:00:00 2001 From: Benjamin Kampmann Date: Wed, 8 Jul 2020 11:15:50 +0200 Subject: [PATCH 2/3] Apply suggestions from code review Co-authored-by: s3krit --- .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 86b04f3b2e60b..90297b69834a6 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -193,7 +193,7 @@ cargo-check-subkey: - BUILD_DUMMY_WASM_BINARY=1 time cargo check --release - sccache -s -test-deterministic-wasm: &test-linux +test-deterministic-wasm: stage: test <<: *docker-env variables: @@ -212,7 +212,7 @@ test-deterministic-wasm: &test-linux - 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 From d75da50a66391467d63b8866e788e39a0aa83fe8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bastian=20K=C3=B6cher?= Date: Wed, 8 Jul 2020 14:41:03 +0200 Subject: [PATCH 3/3] Update .gitlab-ci.yml Co-authored-by: s3krit --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 90297b69834a6..4ce48bb0b5256 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -212,7 +212,7 @@ test-deterministic-wasm: - WASM_BUILD_NO_COLOR=1 cargo build --verbose --release -p node-runtime # confirm checksum - sha256sum -c checksum.sha256 - - sccache -s + - sccache -s test-linux-stable: &test-linux stage: test