-
Notifications
You must be signed in to change notification settings - Fork 115
98 lines (91 loc) · 2.55 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
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-05-11
run: |
cargo +nightly-2022-05-11 clippy --release --features runtime-benchmarks &&
cargo +nightly-2022-05-11 test --release --features runtime-benchmarks &&
cargo +nightly-2022-05-11 build --release --features runtime-benchmarks
if: env.GIT_DIFF
- name: Test Generate Weights
run: |
./scripts/generate-weights.sh 1 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