update new #121
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
- name: Install Choco Dependency | |
uses: crazy-max/ghaction-chocolatey@v2 | |
with: | |
args: install wget msys2 | |
- name: Install Dependency | |
run: | | |
cd D: | |
git clone https://github.com/microsoft/vcpkg | |
cd vcpkg | |
./bootstrap-vcpkg.bat | |
./vcpkg install fmt:x64-windows cxxopts: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-20/wasi-sdk-20.0.m-mingw.tar.gz -O D:/wasi-sdk-20.0.m-mingw.tar.gz | |
tar -xzf wasi-sdk-20.0.m-mingw.tar.gz | |
mv wasi-sdk-20.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 https://asplos.dev/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: | | |
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: build | |
working-directory: ${{runner.workspace}}/build | |
run: | | |
cmake --build . --config ${{matrix.build}} | |
- name: test | |
working-directory: ${{runner.workspace}}/build | |
run: ctest -V -C ${{matrix.build}} |