-
Notifications
You must be signed in to change notification settings - Fork 254
73 lines (62 loc) · 2.2 KB
/
build-nodes.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
name: Build Substrate and Polkadot Binaries
on:
# Allow it to be manually ran to rebuild binary when needed:
workflow_dispatch: {}
# Run at 2am every day for nightly builds.
schedule:
- cron: "0 2 * * *"
jobs:
tests:
name: Build Substrate and Polkadot Binaries
runs-on: parity-large
steps:
- name: checkout polkadot-sdk
uses: actions/checkout@v4
with:
repository: paritytech/polkadot-sdk
- name: Install dependencies
run: sudo apt-get update && sudo apt-get install -y protobuf-compiler curl gcc make clang cmake
- name: Install Rust stable toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
components: rust-src
target: wasm32-unknown-unknown
- name: Rust Cache
uses: Swatinem/rust-cache@82a92a6e8fbeee089604da2575dc567ae9ddeaab # v2.7.5
- name: build substrate binary
uses: actions-rs/cargo@v1
with:
command: build
args: --release --manifest-path substrate/bin/node/cli/Cargo.toml
- name: build polkadot binary
uses: actions-rs/cargo@v1
with:
command: build
args: --release --manifest-path polkadot/Cargo.toml
- name: Strip binaries
run: |
cargo install cargo-strip
cargo strip
- name: upload substrate binary
uses: actions/upload-artifact@v4
with:
name: nightly-substrate-binary
path: target/release/substrate-node
retention-days: 2
if-no-files-found: error
# Note: Uncompressed polkadot binary is ~124MB -> too large for git (max 100MB) without git lfs. Compressed it is only ~45MB
- name: compress polkadot binary
run: |
tar -zcvf target/release/polkadot.tar.gz target/release/polkadot
- name: upload polkadot binary
uses: actions/upload-artifact@v4
with:
name: nightly-polkadot-binary
path: |
target/release/polkadot.tar.gz
target/release/polkadot-execute-worker
target/release/polkadot-prepare-worker
retention-days: 2
if-no-files-found: error