Skip to content

Commit c5b8a00

Browse files
authored
Merge pull request #170 from comit-network/add-macos-ci-builds
Add MacOS ci builds for wasm wallet tests.
2 parents 673e3cf + e184245 commit c5b8a00

File tree

1 file changed

+17
-3
lines changed

1 file changed

+17
-3
lines changed

.github/workflows/ci.yml

+17-3
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,15 @@ jobs:
110110
111111
112112
wasm_wallet_test:
113-
runs-on: ubuntu-latest
113+
strategy:
114+
matrix:
115+
target: [ x86_64-unknown-linux-gnu, x86_64-apple-darwin ]
116+
include:
117+
- target: x86_64-unknown-linux-gnu
118+
os: ubuntu-latest
119+
- target: x86_64-apple-darwin
120+
os: macos-latest
121+
runs-on: ${{ matrix.os }}
114122
steps:
115123
- name: Checkout sources
116124
uses: actions/checkout@v2
@@ -123,11 +131,17 @@ jobs:
123131
path: |
124132
~/.cargo/bin
125133
~/.cache/.wasm-pack
126-
key: ubuntu-rust-${{ steps.toolchain.outputs.rustc_hash }}-wasm-wallet-cargo-and-target-directory-${{ hashFiles('Cargo.lock') }}-v1
134+
key: ${{ matrix.os }}-rust-${{ steps.toolchain.outputs.rustc_hash }}-wasm-wallet-cargo-and-target-directory-${{ hashFiles('Cargo.lock') }}-v1
127135

128136
- name: Install wasm-pack
129137
run: which wasm-pack || curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
130138

139+
- name: Set CC and AR vars for MacOs
140+
if: contains(matrix.os, 'macos')
141+
run: |
142+
echo "CC=/usr/local/opt/llvm/bin/clang" >> $GITHUB_ENV
143+
echo "AR=/usr/local/opt/llvm/bin/llvm-ar" >> $GITHUB_ENV
144+
131145
- name: Extension wallet tests
132146
run: |
133147
cd extension/wallet
@@ -137,5 +151,5 @@ jobs:
137151
if: ${{ failure() }}
138152
uses: actions/upload-artifact@v2
139153
with:
140-
name: wasm-wallet-test-binary
154+
name: ${{ matrix.os }}-wasm-wallet-test-binary
141155
path: ./target/wasm32-unknown-unknown/debug/deps/wallet-*.wasm

0 commit comments

Comments
 (0)