Skip to content

Commit 71d169b

Browse files
authored
Add Github action to build runtime (#268)
Fix runtime build
1 parent c94621d commit 71d169b

File tree

2 files changed

+55
-3
lines changed

2 files changed

+55
-3
lines changed
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Check and Test Code
2+
3+
on:
4+
workflow_dispatch:
5+
6+
concurrency:
7+
group: ${{ github.workflow }}-${{ github.ref }}
8+
cancel-in-progress: true
9+
10+
jobs:
11+
test-code:
12+
runs-on: public-runners
13+
14+
steps:
15+
- name: Checkout Code
16+
uses: actions/checkout@v3
17+
18+
- name: Install required packages
19+
run: |
20+
sudo apt-get update &&
21+
sudo apt-get install build-essential git clang curl libssl-dev protobuf-compiler wget unzip -y
22+
23+
- name: Get rustc version from file
24+
run: |
25+
echo "rustc_version=$(cat RUSTC_VERSION)" >> $GITHUB_ENV
26+
27+
# Steps taken from https://github.com/actions/cache/blob/master/examples.md#rust---cargo
28+
- name: Cache cargo registry
29+
uses: actions/cache@v3
30+
with:
31+
path: |
32+
~/.cargo/bin/
33+
~/.cargo/registry/index/
34+
~/.cargo/registry/cache/
35+
~/.cargo/git/db/
36+
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
37+
38+
- name: Install toolchain
39+
uses: dtolnay/rust-toolchain@nightly
40+
with:
41+
toolchain: ${{ env.rustc_version }}
42+
components: rustfmt
43+
target: wasm32-unknown-unknown
44+
45+
- name: Build runtime
46+
run: scripts/build-runtime.sh
47+
48+
- name: Upload release wasm
49+
uses: actions/upload-artifact@v4
50+
with:
51+
name: subsocial_parachain_runtime.compact.compressed.wasm
52+
path: target/release/wbuild/subsocial-parachain-runtime/subsocial_parachain_runtime.compact.compressed.wasm

runtime/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -178,9 +178,9 @@ std = [
178178
"pallet-free-proxy/std",
179179
"pallet-evm-addresses/std",
180180
# #---------------
181-
# "pallet-creator-staking-rpc-runtime-api/std",
182-
# "pallet-domains-rpc-runtime-api/std",
183-
# "pallet-posts-rpc-runtime-api/std",
181+
"pallet-creator-staking-rpc-runtime-api/std",
182+
"pallet-domains-rpc-runtime-api/std",
183+
"pallet-posts-rpc-runtime-api/std",
184184
]
185185

186186
runtime-benchmarks = [

0 commit comments

Comments
 (0)