2020-09-23 03:50:37 +00:00
|
|
|
# Copyright (C) 2019 Intel Corporation. All rights reserved.
|
|
|
|
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
|
|
|
2020-09-20 05:16:13 +00:00
|
|
|
name: Mac
|
|
|
|
|
|
|
|
# Controls when the action will run. Triggers the workflow on push or pull request
|
2020-09-23 03:50:37 +00:00
|
|
|
# events but only for the main branch
|
2020-09-20 05:16:13 +00:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: [ main ]
|
|
|
|
pull_request:
|
|
|
|
branches: [ main ]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
|
|
|
|
build:
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
os: [macos-latest]
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
|
|
|
|
- name: Build iwasm [default]
|
|
|
|
run: |
|
|
|
|
cd product-mini/platforms/darwin
|
|
|
|
mkdir build && cd build
|
|
|
|
cmake ..
|
|
|
|
make
|
|
|
|
cd .. && rm -rf build
|
|
|
|
- name: Build iwasm [Classic interp]
|
|
|
|
run: |
|
|
|
|
cd product-mini/platforms/darwin
|
|
|
|
mkdir build && cd build
|
|
|
|
cmake .. -DWAMR_BUILD_FAST_INTERP=0
|
|
|
|
make
|
|
|
|
cd .. && rm -rf build
|
|
|
|
- name: Build iwasm [Multi module]
|
|
|
|
run: |
|
|
|
|
cd product-mini/platforms/darwin
|
|
|
|
mkdir build && cd build
|
|
|
|
cmake .. -DWAMR_BUILD_MULTI_MODULE=1
|
|
|
|
make
|
|
|
|
cd .. && rm -rf build
|
|
|
|
- name: Build iwasm [lib-pthread]
|
|
|
|
run: |
|
|
|
|
cd product-mini/platforms/darwin
|
|
|
|
mkdir build && cd build
|
|
|
|
cmake .. -DWAMR_BUILD_LIB_PTHREAD=1
|
|
|
|
make
|
|
|
|
cd .. && rm -rf build
|
|
|
|
- name: Build iwasm [aot only]
|
|
|
|
run: |
|
|
|
|
cd product-mini/platforms/darwin
|
|
|
|
mkdir build && cd build
|
|
|
|
cmake .. -DWAMR_BUILD_AOT=1 -DWAMR_BUILD_INTERP=0
|
|
|
|
make
|
|
|
|
cd .. && rm -rf build
|
|
|
|
- name: Build iwasm [interp only]
|
|
|
|
run: |
|
|
|
|
cd product-mini/platforms/darwin
|
|
|
|
mkdir build && cd build
|
|
|
|
cmake .. -DWAMR_BUILD_AOT=0
|
|
|
|
make
|
|
|
|
cd .. && rm -rf build
|
|
|
|
- name: Build iwasm [memory profiling]
|
|
|
|
run: |
|
|
|
|
cd product-mini/platforms/darwin
|
|
|
|
mkdir build && cd build
|
|
|
|
cmake .. -DWAMR_BUILD_MEMORY_PROFILING=1
|
|
|
|
make
|
|
|
|
cd .. && rm -rf build
|
2020-09-24 04:38:54 +00:00
|
|
|
- name: Build iwasm [tail call]
|
|
|
|
run: |
|
|
|
|
cd product-mini/platforms/darwin
|
|
|
|
mkdir build && cd build
|
|
|
|
cmake .. -DWAMR_BUILD_TAIL_CALL=1
|
|
|
|
make
|
|
|
|
cd .. && rm -rf build
|
|
|
|
- name: Build iwasm [custom name section]
|
|
|
|
run: |
|
|
|
|
cd product-mini/platforms/darwin
|
|
|
|
mkdir build && cd build
|
|
|
|
cmake .. -DWAMR_BUILD_CUSTOM_NAME_SECTION=1
|
|
|
|
make
|
|
|
|
cd .. && rm -rf build
|
2020-09-20 05:16:13 +00:00
|
|
|
- name: Build Sample [wasm-c-api]
|
|
|
|
run: |
|
|
|
|
cd samples/wasm-c-api
|
|
|
|
mkdir build && cd build
|
|
|
|
cmake ..
|
|
|
|
make
|
|
|
|
./hello
|
|
|
|
./global
|
|
|
|
./callback
|