Added WebAssembly build status badge on README. #4
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 CI [WebAssembly] | |
on: | |
push: | |
paths: | |
- .github/workflows/** | |
- include/** | |
- src/** | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Install Emscripten | |
uses: mymindstorm/setup-emsdk@v14 | |
- name: Verify Emscripten | |
run: em++ -v | |
- name: Build WASM | |
run: | | |
mkdir dist | |
em++ --bind -Wno-header-guard -Iinclude -pipe -O3 -ffast-math -std=c++17 -funroll-loops $(find src -type f -name "*.cpp") -sEXPORTED_FUNCTIONS=_executeSource -sEXPORTED_RUNTIME_METHODS=ccall,cwrap -o dist/n8.js | |
ls -ral dist | |
- name: Upload dist folder | |
uses: actions/upload-artifact@v4 | |
with: | |
name: n8-wasm | |
path: dist/ |