-
Notifications
You must be signed in to change notification settings - Fork 539
66 lines (55 loc) · 1.76 KB
/
weights.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
name: Run benchmarks for weights
on:
workflow_dispatch:
inputs:
extra:
description: Run extra benchmark (commitment / dataroot)
required: false
type: number
default: 0
ourpallets:
description: Benchmark only our pallet
required: false
type: number
default: 0
jobs:
benchmark:
runs-on: [self-hosted, reference]
steps:
- uses: actions/checkout@v2
- name: Install deps
run: |
sudo apt-get update
sudo apt-get install -y build-essential
sudo apt-get install -y git clang curl libssl-dev protobuf-compiler unzip
- name: Install Protoc
uses: arduino/setup-protoc@v1
with:
version: "3.x"
- name: Setup Rust toolchain
run: |
curl https://sh.rustup.rs -sSf | sh -s -- -y
source "$HOME/.cargo/env"
rustup target add wasm32-unknown-unknown
rustup show
- name: Set PATH for cargo
run: echo "$HOME/.cargo/bin" >> $GITHUB_PATH
- name: Build node and run benchmarks
run: |
if [ "${{ github.event.inputs.extra }}" != "0" ]; then
EXTRA="EXTRA=${{ github.event.inputs.extra }}"
else
EXTRA=""
fi
if [ "${{ github.event.inputs.ourpallets }}" != "0" ]; then
OUR_PALLETS="OUR_PALLETS=${{ github.event.inputs.ourpallets }}"
else
OUR_PALLETS=""
fi
echo "Command to be executed: $EXTRA $OUR_PALLETS ./scripts/run_benchmarks.sh"
$EXTRA $OUR_PALLETS ./scripts/run_benchmarks.sh
- name: Upload output as artifact
uses: actions/upload-artifact@v2
with:
name: weights-result
path: ./output/