| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226 |
- # Copyright (C) 2019 Intel Corporation. All rights reserved.
- # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
- name: Linux
- # Controls when the action will run. Triggers the workflow on push or pull request
- # events but only for the main branch
- on:
- # triggers on every branch
- push:
- paths-ignore:
- - 'doc/**'
- # triggers on every PR
- pull_request:
- paths-ignore:
- - 'doc/**'
- jobs:
- build:
- runs-on: ${{ matrix.os }}
- strategy:
- matrix:
- os: [ubuntu-18.04, ubuntu-20.04]
- steps:
- - uses: actions/checkout@v2
- - name: Build iwasm [default]
- run: |
- cd product-mini/platforms/linux
- mkdir build && cd build
- cmake ..
- make -j $(nproc)
- cd .. && rm -rf build
- - name: Build iwasm [classic interp]
- run: |
- cd product-mini/platforms/linux
- mkdir build && cd build
- cmake .. -DWAMR_BUILD_FAST_INTERP=0
- make -j $(nproc)
- cd .. && rm -rf build
- - name: Build iwasm [multi module]
- run: |
- cd product-mini/platforms/linux
- mkdir build && cd build
- cmake .. -DWAMR_BUILD_MULTI_MODULE=1
- make -j $(nproc)
- cd .. && rm -rf build
- - name: Build iwasm [lib-pthread]
- run: |
- cd product-mini/platforms/linux
- mkdir build && cd build
- cmake .. -DWAMR_BUILD_LIB_PTHREAD=1
- make -j $(nproc)
- cd .. && rm -rf build
- - name: Build iwasm [aot only]
- run: |
- cd product-mini/platforms/linux
- mkdir build && cd build
- cmake .. -DWAMR_BUILD_AOT=1 -DWAMR_BUILD_INTERP=0
- make -j $(nproc)
- cd .. && rm -rf build
- - name: Build iwasm [interp only]
- run: |
- cd product-mini/platforms/linux
- mkdir build && cd build
- cmake .. -DWAMR_BUILD_AOT=0
- make -j $(nproc)
- cd .. && rm -rf build
- - name: Build iwasm [memory profiling]
- run: |
- cd product-mini/platforms/linux
- mkdir build && cd build
- cmake .. -DWAMR_BUILD_MEMORY_PROFILING=1
- make -j $(nproc)
- cd .. && rm -rf build
- - name: Build iwasm [tail call]
- run: |
- cd product-mini/platforms/linux
- mkdir build && cd build
- cmake .. -DWAMR_BUILD_TAIL_CALL=1
- make -j $(nproc)
- cd .. && rm -rf build
- - name: Build iwasm [custom name section]
- run: |
- cd product-mini/platforms/linux
- mkdir build && cd build
- cmake .. -DWAMR_BUILD_CUSTOM_NAME_SECTION=1
- make -j $(nproc)
- cd .. && rm -rf build
- - name: Build iwasm [disable hardware boundary check]
- run: |
- cd product-mini/platforms/linux
- mkdir build && cd build
- cmake .. -DWAMR_DISABLE_HW_BOUND_CHECK=1
- make -j $(nproc)
- cd .. && rm -rf build
- - name: Build iwasm [reference types]
- run: |
- cd product-mini/platforms/linux
- mkdir build && cd build
- cmake .. -DWAMR_BUILD_REF_TYPES=1
- make -j $(nproc)
- cd .. && rm -rf build
- - name: Build iwasm [128-bit SIMD]
- run: |
- cd product-mini/platforms/linux
- mkdir build && cd build
- cmake .. -DWAMR_BUILD_SIMD=1
- make -j $(nproc)
- cd .. && rm -rf build
- - name: Cache LLVM libraries
- uses: actions/cache@v2
- id: cache_llvm
- env:
- cache-name: llvm_libraries
- with:
- path: ./core/deps/llvm
- key: ${{ runner.os }}-build-${{env.cache-name}}
- restore-keys: ${{ runner.os }}-build-${{env.cache-name}}
- - name: Build llvm and clang from source
- if: steps.cache_llvm.outputs.cache-hit != 'true'
- run: |
- cd wamr-compiler
- ./build_llvm.sh
- - name: Build wamrc
- run: |
- cd wamr-compiler
- mkdir build && cd build
- cmake ..
- make -j $(nproc)
- cd ..
- - name: download and install wasi-sdk
- run: |
- cd /opt
- wget https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-12/wasi-sdk-12.0-linux.tar.gz
- tar -xzf wasi-sdk-12.0-linux.tar.gz
- mv wasi-sdk-12.0 wasi-sdk
- rm wasi-sdk-12.0-linux.tar.gz
- - name: download and install wabt
- run: |
- cd /opt
- wget https://github.com/WebAssembly/wabt/releases/download/1.0.23/wabt-1.0.23-ubuntu.tar.gz
- tar -xzf wabt-1.0.23-ubuntu.tar.gz
- mv wabt-1.0.23 wabt
- rm wabt-1.0.23-ubuntu.tar.gz
- - name: Build Sample [wasm-c-api]
- run: |
- cd samples/wasm-c-api
- mkdir build && cd build
- cmake ..
- make -j $(nproc)
- ./callback
- ./callback_chain
- ./global
- ./hello
- ./hostref
- ./memory
- ./reflect
- ./table
- ./trap
- cd .. && rm -r build
- - name: Build Sample [wasm-c-api] [Jit]
- run: |
- cd samples/wasm-c-api
- mkdir build && cd build
- cmake -DWAMR_BUILD_INTERP=0 -DWAMR_BUILD_JIT=1 -DWAMR_BUILD_AOT=1 ..
- make -j $(nproc)
- ./callback
- ./callback_chain
- ./global
- ./hello
- ./hostref
- ./memory
- ./reflect
- ./table
- ./trap
- cd .. && rm -r build
- - name: Build Sample [wasm-c-api] [Aot]
- run: |
- cd samples/wasm-c-api
- mkdir build && cd build
- cmake -DWAMR_BUILD_INTERP=0 -DWAMR_BUILD_JIT=0 -DWAMR_BUILD_AOT=1 ..
- make -j $(nproc)
- ./callback
- ./callback_chain
- ./global
- ./hello
- ./hostref
- ./memory
- ./reflect
- ./table
- ./trap
- cd .. && rm -r build
- - name: Build Sample [basic]
- run: |
- cd samples/basic
- ./build.sh
- ./run.sh
- - name: Build Sample [multi-thread]
- run: |
- cd samples/multi-thread
- mkdir build && cd build
- cmake ..
- make -j $(nproc)
- ./iwasm wasm-apps/test.wasm
- - name: Build Sample [multi-module]
- run: |
- cd samples/multi-module
- mkdir build && cd build
- cmake ..
- make -j $(nproc)
- ./multi_module
- - name: Build Sample [spawn-thread]
- run: |
- cd samples/spawn-thread
- mkdir build && cd build
- cmake ..
- make -j $(nproc)
- ./spawn_thread
- - name: Build Sample [ref-types]
- run: |
- cd samples/ref-types
- mkdir build && cd build
- cmake ..
- make -j $(nproc)
- ./hello
|