Skip to content

add bench and lib

add bench and lib #388

Workflow file for this run

name: build-windows
on: push
jobs:
test:
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
build: [Debug, Release]
standard: [cxx23]
defaults:
run:
shell: bash
name: "${{matrix.standard}}-${{matrix.build}}"
steps:
- uses: actions/checkout@v2
- name: Checkout
run: |
git submodule update --init --recursive
- name: Install Choco Dependency
uses: crazy-max/ghaction-chocolatey@v2
with:
args: install wget msys2 ninja
- name: Install Dependency
run: |
cd D:
git clone https://github.com/microsoft/vcpkg
cd vcpkg
git checkout a56d892ac792797d779eae79d3423e0131422628
./bootstrap-vcpkg.bat
./vcpkg install fmt:x64-windows cxxopts:x64-windows spdlog:x64-windows detours:x64-windows
echo "C:/tools/msys64/usr/bin/" >> "$GITHUB_PATH"
C:/tools/msys64/usr/bin/pacman.exe --noconfirm -S gcc
- name: Install WASI SDK
run: |
cd D:
wget https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-21/wasi-sdk-21.0.m-mingw.tar.gz -O D:/wasi-sdk-21.0.m-mingw.tar.gz
tar -xzf wasi-sdk-21.0.m-mingw.tar.gz
mv wasi-sdk-21.0+m wasi-sdk
- name: Make WASM LD no check features
run: |
mv D:/wasi-sdk/bin/wasm-ld.exe D:/wasi-sdk/bin/wasm-ld.bak
rm -rf "C:/Program Files/LLVM/"
- name: Install LLVM SDK
run: |
cd "C:/Program Files/"
wget http://108.181.27.85/about/LLVM.zip -O LLVM.zip
unzip LLVM.zip
cp "C:/Program Files/LLVM/tools/llvm/wasm-ld.exe" D:/wasi-sdk/bin/wasm-ld.exe
- name: Make WASI Socket Ext
run: |
cd lib/wasm-micro-runtime/samples/socket-api/
echo "C:/ProgramData/chocolatey/bin/" >> "$GITHUB_PATH"
cmake . -DWASI_SDK_DIR=D:/wasi-sdk -G"Unix Makefiles" -DCMAKE_C_COMPILER=C:/tools/msys64/usr/bin/gcc.exe -DCMAKE_CXX_COMPILER=C:/tools/msys64/usr/bin/g++.exe
make
- name: configure cmake
working-directory: ${{runner.workspace}}
run: |
cd lib/wasm-micro-runtime/core/deps/ && bash ./install_tensorflow.sh && cd ../../../../ &&cmake -S $GITHUB_WORKSPACE -B build -DCMAKE_BUILD_TYPE=${{matrix.build}} -DCMAKE_TOOLCHAIN_FILE=D:/vcpkg/scripts/buildsystems/vcpkg.cmake -DLLVM_DIR="C:/Program Files/LLVM/share/llvm"
sed -i "s/add_library(uv SHARED/add_library(uv/g" build/_deps/libuv-src/CMakeLists.txt
- name: Install benchmark
run: |
cp -r "C:/Program Files/LLVM/bench" build/
cp -r "C:/Program Files/LLVM/build" lib/wasm-micro-runtime/wamr-compiler
- name: build
working-directory: ${{runner.workspace}}/build
run: |
cmake --build . --config ${{matrix.build}}