mirror of
https://github.com/bytecodealliance/wasm-micro-runtime.git
synced 2025-05-14 05:31:13 +00:00
CI: make macos' build_samples_wasm_c_api similar to ubuntu
This commit is contained in:
parent
0df6dc42af
commit
0860d7fda6
62
.github/workflows/compilation_on_macos.yml
vendored
62
.github/workflows/compilation_on_macos.yml
vendored
|
@ -46,11 +46,14 @@ concurrency:
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
|
||||||
env:
|
env:
|
||||||
AOT_BUILD_OPTIONS: "-DWAMR_BUILD_AOT=1 -DWAMR_BUILD_FAST_INTERP=0 -DWAMR_BUILD_INTERP=0 -DWAMR_BUILD_JIT=0 -DWAMR_BUILD_LAZY_JIT=0"
|
# For BUILD
|
||||||
CLASSIC_INTERP_BUILD_OPTIONS: "-DWAMR_BUILD_AOT=0 -DWAMR_BUILD_FAST_INTERP=0 -DWAMR_BUILD_INTERP=1 -DWAMR_BUILD_JIT=0 -DWAMR_BUILD_LAZY_JIT=0"
|
AOT_BUILD_OPTIONS: " -DWAMR_BUILD_AOT=1 -DWAMR_BUILD_FAST_INTERP=0 -DWAMR_BUILD_INTERP=0 -DWAMR_BUILD_FAST_JIT=0 -DWAMR_BUILD_JIT=0 -DWAMR_BUILD_LAZY_JIT=0"
|
||||||
FAST_INTERP_BUILD_OPTIONS: "-DWAMR_BUILD_AOT=0 -DWAMR_BUILD_FAST_INTERP=1 -DWAMR_BUILD_INTERP=1 -DWAMR_BUILD_JIT=0 -DWAMR_BUILD_LAZY_JIT=0"
|
CLASSIC_INTERP_BUILD_OPTIONS: "-DWAMR_BUILD_AOT=0 -DWAMR_BUILD_FAST_INTERP=0 -DWAMR_BUILD_INTERP=1 -DWAMR_BUILD_FAST_JIT=0 -DWAMR_BUILD_JIT=0 -DWAMR_BUILD_LAZY_JIT=0"
|
||||||
LLVM_LAZY_JIT_BUILD_OPTIONS: "-DWAMR_BUILD_AOT=1 -DWAMR_BUILD_FAST_INTERP=0 -DWAMR_BUILD_INTERP=0 -DWAMR_BUILD_JIT=1 -DWAMR_BUILD_LAZY_JIT=1"
|
FAST_INTERP_BUILD_OPTIONS: " -DWAMR_BUILD_AOT=0 -DWAMR_BUILD_FAST_INTERP=1 -DWAMR_BUILD_INTERP=1 -DWAMR_BUILD_FAST_JIT=0 -DWAMR_BUILD_JIT=0 -DWAMR_BUILD_LAZY_JIT=0"
|
||||||
LLVM_EAGER_JIT_BUILD_OPTIONS: "-DWAMR_BUILD_AOT=1 -DWAMR_BUILD_FAST_INTERP=0 -DWAMR_BUILD_INTERP=0 -DWAMR_BUILD_JIT=1 -DWAMR_BUILD_LAZY_JIT=0"
|
FAST_JIT_BUILD_OPTIONS: " -DWAMR_BUILD_AOT=1 -DWAMR_BUILD_FAST_INTERP=0 -DWAMR_BUILD_INTERP=0 -DWAMR_BUILD_FAST_JIT=1 -DWAMR_BUILD_JIT=0 -DWAMR_BUILD_LAZY_JIT=0"
|
||||||
|
LLVM_LAZY_JIT_BUILD_OPTIONS: " -DWAMR_BUILD_AOT=1 -DWAMR_BUILD_FAST_INTERP=0 -DWAMR_BUILD_INTERP=0 -DWAMR_BUILD_FAST_JIT=0 -DWAMR_BUILD_JIT=1 -DWAMR_BUILD_LAZY_JIT=1"
|
||||||
|
LLVM_EAGER_JIT_BUILD_OPTIONS: "-DWAMR_BUILD_AOT=1 -DWAMR_BUILD_FAST_INTERP=0 -DWAMR_BUILD_INTERP=0 -DWAMR_BUILD_FAST_JIT=0 -DWAMR_BUILD_JIT=1 -DWAMR_BUILD_LAZY_JIT=0"
|
||||||
|
MULTI_TIER_JIT_BUILD_OPTIONS: "-DWAMR_BUILD_AOT=1 -DWAMR_BUILD_FAST_INTERP=0 -DWAMR_BUILD_INTERP=1 -DWAMR_BUILD_FAST_JIT=1 -DWAMR_BUILD_JIT=1 -DWAMR_BUILD_LAZY_JIT=1"
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
|
@ -214,33 +217,68 @@ jobs:
|
||||||
working-directory: product-mini/platforms/${{ matrix.platform }}
|
working-directory: product-mini/platforms/${{ matrix.platform }}
|
||||||
|
|
||||||
build_samples_wasm_c_api:
|
build_samples_wasm_c_api:
|
||||||
needs: [build_iwasm]
|
needs:
|
||||||
|
[
|
||||||
|
build_iwasm,
|
||||||
|
build_llvm_libraries_on_intel_macos,
|
||||||
|
build_wamrc,
|
||||||
|
]
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
make_options: [
|
make_options: [
|
||||||
# Running modes supported
|
$AOT_BUILD_OPTIONS,
|
||||||
$CLASSIC_INTERP_BUILD_OPTIONS,
|
$CLASSIC_INTERP_BUILD_OPTIONS,
|
||||||
$FAST_INTERP_BUILD_OPTIONS,
|
$FAST_INTERP_BUILD_OPTIONS,
|
||||||
# Running modes unsupported
|
$FAST_JIT_BUILD_OPTIONS,
|
||||||
#$LLVM_LAZY_JIT_BUILD_OPTIONS,
|
$LLVM_LAZY_JIT_BUILD_OPTIONS,
|
||||||
#$LLVM_EAGER_JIT_BUILD_OPTIONS,
|
$LLVM_EAGER_JIT_BUILD_OPTIONS,
|
||||||
#$AOT_BUILD_OPTIONS,
|
$MULTI_TIER_JIT_BUILD_OPTIONS,
|
||||||
]
|
]
|
||||||
os: [macos-13]
|
os: [macos-13]
|
||||||
|
include:
|
||||||
|
- os: macos-13
|
||||||
|
llvm_cache_key: ${{ needs.build_llvm_libraries_on_intel_macos.outputs.cache_key }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: checkout
|
- name: checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Get LLVM libraries
|
||||||
|
id: retrieve_llvm_libs
|
||||||
|
if: (!endsWith(matrix.make_options, '_INTERP_BUILD_OPTIONS'))
|
||||||
|
uses: actions/cache@v4
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
./core/deps/llvm/build/bin
|
||||||
|
./core/deps/llvm/build/include
|
||||||
|
./core/deps/llvm/build/lib
|
||||||
|
./core/deps/llvm/build/libexec
|
||||||
|
./core/deps/llvm/build/share
|
||||||
|
key: ${{ matrix.llvm_cache_key }}
|
||||||
|
|
||||||
|
- name: Quit if cache miss
|
||||||
|
if: (!endsWith(matrix.make_options, '_INTERP_BUILD_OPTIONS')) && (steps.retrieve_llvm_libs.outputs.cache-hit != 'true')
|
||||||
|
run: echo "::error::can not get prebuilt llvm libraries" && exit 1
|
||||||
|
|
||||||
- name: install-wasi-sdk-wabt
|
- name: install-wasi-sdk-wabt
|
||||||
uses: ./.github/actions/install-wasi-sdk-wabt
|
uses: ./.github/actions/install-wasi-sdk-wabt
|
||||||
with:
|
with:
|
||||||
os: ${{ matrix.os }}
|
os: ${{ matrix.os }}
|
||||||
|
|
||||||
|
- name: Build wamrc
|
||||||
|
if: (!endsWith(matrix.make_options, '_INTERP_BUILD_OPTIONS'))
|
||||||
|
run: |
|
||||||
|
mkdir build && cd build
|
||||||
|
cmake ..
|
||||||
|
cmake --build . --config Release --parallel 4
|
||||||
|
working-directory: wamr-compiler
|
||||||
|
|
||||||
- name: Build Sample [wasm-c-api]
|
- name: Build Sample [wasm-c-api]
|
||||||
run: |
|
run: |
|
||||||
|
VERBOSE=1
|
||||||
cmake -S . -B build ${{ matrix.make_options }}
|
cmake -S . -B build ${{ matrix.make_options }}
|
||||||
cmake --build build --config Release --parallel 4
|
cmake --build build --config Debug --parallel 4
|
||||||
ctest --test-dir build --output-on-failure
|
ctest --test-dir build --output-on-failure
|
||||||
working-directory: samples/wasm-c-api
|
working-directory: samples/wasm-c-api
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user