-
Notifications
You must be signed in to change notification settings - Fork 3
executable file
·61 lines (49 loc) · 1.71 KB
/
build-runtime.yml
File metadata and controls
executable file
·61 lines (49 loc) · 1.71 KB
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
name: Build Torus runtime
on:
workflow_dispatch:
push:
branches:
- "github-ci-test"
- "build-runtime*"
- "testnet"
tags:
- "runtime/*"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: ubicloud-standard-16
steps:
- uses: actions/checkout@v4
- name: Setup Rust cache
uses: Swatinem/rust-cache@v2
- name: Install Rust toolchain
run: |
rustup set profile minimal
rustup show
- name: Install Protoc
uses: arduino/setup-protoc@v1
with:
version: 3.20.1
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Build runtime
run: |
echo "Building ${{ startsWith(github.ref, 'refs/tags/runtime/testnet') && 'with testnet feature flag' || 'without testnet feature flag' }}"
cargo build --release --timings --package torus-runtime ${{ startsWith(github.ref, 'refs/tags/runtime/testnet') && '--features testnet' || '' }}
export SHA256SUM=$(sha256sum target/release/wbuild/torus-runtime/torus_runtime.compact.compressed.wasm | cut -d ' ' -f1)
echo Hash of compact and compressed WASM: $SHA256SUM
mkdir out
mv target/release/wbuild/torus-runtime/torus_runtime.compact.compressed.wasm out/
touch out/$SHA256SUM
- uses: actions/upload-artifact@v4
with:
name: torus_runtime.compact.compressed
path: out/
if-no-files-found: error
overwrite: true
- uses: actions/upload-artifact@v4
with:
name: torus-runtime-timings
path: target/cargo-timings/cargo-timing.html
overwrite: true