Skip to content

Commit

Permalink
Build and test wasm on MacOS in CI
Browse files Browse the repository at this point in the history
See rust-bitcoin/rust-secp256k1#254 for more
details
  • Loading branch information
rishflab committed Jul 15, 2021
1 parent 5e21a5f commit b92d457
Showing 1 changed file with 14 additions and 7 deletions.
21 changes: 14 additions & 7 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,28 +29,35 @@ jobs:
DO_BENCH: true
run: ./contrib/test.sh

wasm_pack:
wasm:
name: Stable - Docs / WebAssembly Build
runs-on: ubuntu-latest
strategy:
matrix:
rust:
- stable
target: [ x86_64-unknown-linux-gnu, x86_64-apple-darwin ]
include:
- target: x86_64-unknown-linux-gnu
os: ubuntu-latest
- target: x86_64-apple-darwin
os: macos-latest
runs-on: ${{ matrix.os }}
steps:
- name: Checkout Crate
uses: actions/checkout@v2
- name: Checkout Toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust }}
toolchain: stable
override: true
- name: Set CC and AR vars for MacOS
if: contains(matrix.os, 'macos')
run: |
echo "CC=/usr/local/opt/llvm/bin/clang" >> $GITHUB_ENV
echo "AR=/usr/local/opt/llvm/bin/llvm-ar" >> $GITHUB_ENV
- name: Building docs
env:
DO_DOCS: true
run: ./contrib/test.sh
- name: Install wasm-pack
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
- name: Running WASM build
env:
DO_WASM: true
Expand Down

0 comments on commit b92d457

Please sign in to comment.