Skip to content

Commit

Permalink
fix: build script uploads hash (#74)
Browse files Browse the repository at this point in the history
* chore: only upload necessary

* chore: allow build on dispatch

* chore: upload timings report
  • Loading branch information
saiintbrisson authored Jul 25, 2024
1 parent 324ee6c commit e3f3176
Showing 1 changed file with 18 additions and 7 deletions.
25 changes: 18 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name: Build and publish
on:
push:
tags: 'v*'
workflow_dispatch:

jobs:
check:
Expand All @@ -25,16 +26,26 @@ jobs:
version: 3.20.1
repo-token: ${{ secrets.GITHUB_TOKEN }}

- name: Build node
- name: Build runtime
run: |
cargo build --release --package node-subspace-runtime
export SHA256SUM=$(sha256sum target/release/wbuild/node-subspace-runtime/node_subspace_runtime.compact.compressed.wasm)
echo $SHA256SUM
touch $SHA256SUM
cargo build --release --timings --package node-subspace-runtime
export SHA256SUM=$(sha256sum target/release/wbuild/node-subspace-runtime/node_subspace_runtime.compact.compressed.wasm | cut -d ' ' -f1)
echo Hash of compact and compressed WASM: $SHA256SUM
mkdir out
mv target/release/wbuild/node-subspace-runtime/node_subspace_runtime.compact.compressed.wasm out/
touch out/$SHA256SUM
- uses: actions/upload-artifact@v4
with:
name:
path: target/release/wbuild/node-subspace-runtime/
name: node_subspace_runtime.compact.compressed
path: out/
if-no-files-found: error
overwrite: true

- uses: actions/upload-artifact@v4
with:
name: node-subspace-runtime-timings
path: target/cargo-timings/cargo-timing.html
overwrite: true

0 comments on commit e3f3176

Please sign in to comment.