Skip to content

feat: adding wasm coverage #19

feat: adding wasm coverage

feat: adding wasm coverage #19

Workflow file for this run

name: Coverage
on:
push:
branches:
- master
pull_request:
env:
RUSTFLAGS: -D warnings
jobs:
coverage:
runs-on: ${{ matrix.platform }}
name: "${{ matrix.example }} - ${{ matrix.platform }}"
strategy:
matrix:
platform: [macos-latest]
toolchain: [nightly-aarch64-apple-darwin]
package: [cross-contract-calls, fungible-token]
features: ['', '--features unstable,legacy,__abi-generate']
steps:
- uses: actions/checkout@v3
- name: Install Homebrew
run: |
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
- name: Install LLVM
run: brew install llvm
- name: Add LLVM to PATH
run: echo "/opt/homebrew/opt/llvm/bin" >> $GITHUB_PATH
- name: Llvm version
run: llvm-config --version
- name: Clang version
run: clang --version
- name: "${{ matrix.toolchain }} with rustfmt, and wasm32"
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.toolchain }}
target: wasm32-unknown-unknown
- name: Rust version
run: rustc --version --verbose
- name: Install wasmcov
run: cargo +${{ matrix.toolchain }} install wasmcov
- name: Add rust-src component
run: rustup component add rust-src --toolchain ${{ matrix.toolchain }}
- name: Run script
env:
RUSTFLAGS: '-C link-arg=-s'
run: bash ./examples/build_wasm_test_all.sh