-
Notifications
You must be signed in to change notification settings - Fork 115
141 lines (133 loc) · 3.83 KB
/
joystream-node.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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
name: joystream-node
on:
pull_request:
push:
jobs:
# test runtime benchmarks code correctness
benchmarking:
name: Benchmarking
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '18.x'
- uses: technote-space/get-diff-action@v3
with:
PREFIX_FILTER: |
bin
runtime
runtime-modules
SUFFIX_FILTER: |
.rs
FILES: |
Cargo.lock
Cargo.toml
# TODO: Look for change in source code but no corresponding version bump of runtime or binaries
# - name: Check version modified correctly
# if: env.GIT_DIFF
- name: Toolchains
run: |
./setup.sh
if: env.GIT_DIFF
- name: Build
env:
WASM_BUILD_TOOLCHAIN: nightly-2022-11-15
run: |
./scripts/cargo-checks-with-benchmarking.sh &&
./scripts/cargo-build-with-benchmarking.sh
if: env.GIT_DIFF
- name: Test Generate Weights
run: |
./scripts/generate-weights.sh 2 1 && git diff
if: env.GIT_DIFF
# Build and test joystream-node with all runtime profiles
runtime_profiles:
name: Runtime Profiles
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '18.x'
- uses: technote-space/get-diff-action@v3
with:
PREFIX_FILTER: |
bin
runtime
runtime-modules
SUFFIX_FILTER: |
.rs
FILES: |
Cargo.lock
Cargo.toml
- name: Toolchains
run: |
./setup.sh
if: env.GIT_DIFF
- name: Production Runtime
run: |
yarn cargo-checks && yarn cargo-build
./target/release/call-sizes
if: env.GIT_DIFF
- name: Staging Runtime
env:
RUNTIME_PROFILE: "STAGING"
run: |
yarn cargo-checks && yarn cargo-build
if: env.GIT_DIFF
- name: Playground Runtime
env:
RUNTIME_PROFILE: "PLAYGROUND"
run: |
yarn cargo-checks && yarn cargo-build
if: env.GIT_DIFF
- name: Testing Runtime
env:
RUNTIME_PROFILE: "TESTING"
run: |
yarn cargo-checks && yarn cargo-build
if: env.GIT_DIFF
- name: Fast Production Runtime
env:
RUNTIME_PROFILE: "FAST-PROD"
run: |
yarn cargo-checks && yarn cargo-build
if: env.GIT_DIFF
# Test runtime upgrade with "try-runtime" feature
runtime_upgrade:
name: Runtime Upgrade
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '18.x'
- uses: technote-space/get-diff-action@v3
with:
PREFIX_FILTER: |
bin
runtime
runtime-modules
SUFFIX_FILTER: |
.rs
FILES: |
Cargo.lock
Cargo.toml
- name: Toolchains
run: |
./setup.sh
if: env.GIT_DIFF
- name: OnRuntimeUpgrade (try-runtime)
run: |
cargo +nightly-2022-11-15 build --release --features try-runtime
RUST_LOG=info,runtime=debug ./target/release/joystream-node try-runtime \
--runtime ./target/release/wbuild/joystream-node-runtime/joystream_node_runtime.compact.compressed.wasm \
on-runtime-upgrade \
live \
--uri wss://rpc.joystream.org:9944/
if: env.GIT_DIFF
- name: run_migrations test
run: |
RUN_MIGRATION_TESTS=true RUST_LOG=info cargo +nightly-2022-11-15 test remote_tests::run_migrations --release --features try-runtime
if: env.GIT_DIFF