Files
pezkuwi-subxt/.github/workflows/build-nodes.yml
T
Alexander Samusev e783d9f883 [ci] Run cronjob with app secrets (#1420)
* [ci] Run cronjob with app secrets

* rm github url

* move token creation closer to pr creation

* return checkout

* check that credentials work

* test gha

* add more test

* create test file

* rm tests

* add compression+decompression to avoid >100MB

* add shell field to action

* move zipped file to correct location

* strip binaries

---------

Co-authored-by: Tadeo hepperle <tadeo@do-mix.de>
2024-02-14 11:33:38 +01:00

72 lines
2.1 KiB
YAML

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: ubuntu-latest-16-cores
steps:
- name: checkout polkadot-sdk
uses: actions/checkout@v4
with:
repository: paritytech/polkadot-sdk
- name: Install dependencies
run: sudo apt-get install -y protobuf-compiler
- name: Install WASM toolchain
run: rustup target add wasm32-unknown-unknown
- name: Install WASM toolchain
run: rustup component add rust-src
- name: Rust Cache
uses: Swatinem/rust-cache@23bce251a8cd2ffc3c1075eaa2367cf899916d84 # v2.7.3
- 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@v3
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@v3
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