Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Github action to build runtime #268

Merged
merged 1 commit into from
Dec 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 52 additions & 0 deletions .github/workflows/build-runtime.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Check and Test Code

on:
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
test-code:
runs-on: public-runners

steps:
- name: Checkout Code
uses: actions/checkout@v3

- name: Install required packages
run: |
sudo apt-get update &&
sudo apt-get install build-essential git clang curl libssl-dev protobuf-compiler wget unzip -y

- name: Get rustc version from file
run: |
echo "rustc_version=$(cat RUSTC_VERSION)" >> $GITHUB_ENV

# Steps taken from https://github.com/actions/cache/blob/master/examples.md#rust---cargo
- name: Cache cargo registry
uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}

- name: Install toolchain
uses: dtolnay/rust-toolchain@nightly
with:
toolchain: ${{ env.rustc_version }}
components: rustfmt
target: wasm32-unknown-unknown

- name: Build runtime
run: scripts/build-runtime.sh

- name: Upload release wasm
uses: actions/upload-artifact@v4
with:
name: subsocial_parachain_runtime.compact.compressed.wasm
path: target/release/wbuild/subsocial-parachain-runtime/subsocial_parachain_runtime.compact.compressed.wasm
6 changes: 3 additions & 3 deletions runtime/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -178,9 +178,9 @@ std = [
"pallet-free-proxy/std",
"pallet-evm-addresses/std",
# #---------------
# "pallet-creator-staking-rpc-runtime-api/std",
# "pallet-domains-rpc-runtime-api/std",
# "pallet-posts-rpc-runtime-api/std",
"pallet-creator-staking-rpc-runtime-api/std",
"pallet-domains-rpc-runtime-api/std",
"pallet-posts-rpc-runtime-api/std",
]

runtime-benchmarks = [
Expand Down
Loading