Skip to content
This repository has been archived by the owner on May 2, 2024. It is now read-only.

Use input to override diff check in build_wasm workflow #46

Use input to override diff check in build_wasm workflow

Use input to override diff check in build_wasm workflow #46

Workflow file for this run

name: build wasm package
on:
workflow_call:
inputs:
# Allows other workflows to explicitly control whether this workflow runs
build:
required: true
description: 'Whether to build the package'
type: boolean
default: false
push:
branches:
- main
pull_request:
branches:
- main
jobs:
detect-changes:
uses: ./.github/workflows/check_diff.yml
with:
pattern: ^crates/hyperwasm/
build:
needs: detect-changes
# Run if changes are detected OR if explicitly requested by another workflow
if: needs.detect-changes.outputs.changed == 'true' || inputs.build
name: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
token: ${{github.token}}
- name: setup rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: Install wasm-pack
run: cargo install wasm-pack
- name: Setup Node.js environment
uses: actions/setup-node@v3
with:
node-version: 16
- name: setup foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly
- name: check out hyperdrive
uses: actions/checkout@master
with:
repository: delvtech/hyperdrive
ref: 'v0.2.0'
path: './hyperdrive'
ssh-key: ${{ secrets.HYPERDRIVE_ACCESS_KEY }}
- name: build wasm package
working-directory: crates/hyperwasm
run: sh build.sh