feat: adding wasm coverage #9
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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-2024-05-01] | |
package: [cross-contract-calls, fungible-token] | |
steps: | |
- uses: actions/checkout@v3 | |
- 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: Build | |
env: | |
RUSTFLAGS: '-C link-arg=-s ' | |
run: cargo +${{ matrix.toolchain }} wasmcov build -- -Z build-std --all --target wasm32-unknown-unknown --release |