forked from Cardinal-Cryptography/aleph-node
-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (35 loc) · 1.26 KB
/
_check-runtime-determimism.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
---
# This workflow checks runtime determinism, ie it downloads production runtime from artifacts
# and compiles again production runtime from sources, and compares both files checksums
name: Build test node image and e2e client image
on:
workflow_call:
jobs:
main:
name: Check runtime build determinism
runs-on: self-hosted
env:
RUST_BACKTRACE: full
RUSTC_WRAPPER: sccache
steps:
- name: Checkout aleph-node source code
uses: actions/checkout@v3
- name: Install Rust toolchain
uses: Cardinal-Cryptography/github-actions/install-rust-toolchain@v1
with:
targets: wasm32-unknown-unknown
- name: Download production runtime from artifacts
uses: actions/download-artifact@v3
with:
name: aleph-release-runtime
- name: Build runtime 2nd time and compare checksum with previous build
env:
ARTIFACT: aleph_runtime.compact.wasm
TARGET_DIR: target/production/wbuild/aleph-runtime
run: |
mkdir -p "$TARGET_DIR"
mv "$ARTIFACT" "$TARGET_DIR"
sha256sum "$TARGET_DIR/$ARTIFACT" > checksum.sha256
cargo clean
cargo build --profile production -p aleph-runtime
sha256sum -c checksum.sha256