Skip to content

fix: compilation issues due to rust-nightly #158

fix: compilation issues due to rust-nightly

fix: compilation issues due to rust-nightly #158

Workflow file for this run

name: wasm-miniscript
on:
push:
branches:
- master
pull_request:
branches:
- master
- rel/**
workflow_dispatch:
jobs:
setup-rust:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Cache Rust
uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-rust-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-rust-
- name: Install Rust
uses: dtolnay/rust-toolchain@v1
with:
toolchain: nightly
- name: Install wasm tools
run: |
rustup component add rustfmt
cargo install wasm-pack --version 0.13.1
cargo install wasm-opt --version 0.116.1
unit-test:
needs: setup-rust
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node-version: [18.x, 20.x]
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Setup node ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Build Info
run: |
echo "node $(node --version)"
echo "npm $(npm --version)"
echo "rustc $(rustc --version)"
echo "wasm-pack $(wasm-pack --version)"
echo "wasm-opt $(wasm-opt --version)"
git --version
echo "base ref $GITHUB_BASE_REF"
echo "head ref $GITHUB_HEAD_REF"
- name: Fetch Base Ref
run: |
git fetch origin $GITHUB_BASE_REF
- name: Cache npm packages
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install Packages
run: npm ci --workspaces --include-workspace-root
- name: test
run: npx --version
- name: build packages
run: npm --workspaces run build
- name: Check Source Code Formatting
run: npm run check-fmt
- name: Unit Test
run: npm --workspaces test