Skip to content

fix: handle regexp as default export (#167) #163

fix: handle regexp as default export (#167)

fix: handle regexp as default export (#167) #163

Workflow file for this run

name: Build & Test
on:
push:
branches: main
pull_request:
branches: main
env:
WASI_VERSION: 12
WASI_VERSION_FULL: "12.0"
EMCC_VERSION: "1.40.1-fastcomp"
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check out Git repository
uses: actions/checkout@v2
- name: Install wasi-sdk
shell: bash
run: |
if [[ "$RUNNER_OS" == "Linux" ]]; then
export WASI_OS="linux";
fi
if [[ "$RUNNER_OS" == "macOS" ]]; then
export WASI_OS="macos";
fi
if [[ "$RUNNER_OS" == "Windows" ]]; then
export WASI_OS="mingw";
fi
curl -sL https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-${WASI_VERSION}/wasi-sdk-${WASI_VERSION_FULL}-${WASI_OS}.tar.gz -O
# check if package downloaded
ls -la
tar xvf wasi-sdk-${WASI_VERSION_FULL}-${WASI_OS}.tar.gz
# print clang version
./wasi-sdk-${WASI_VERSION_FULL}/bin/clang --version
- name: Install Emscripten
run: |
git clone https://github.com/emscripten-core/emsdk.git --branch 3.1.29
cd ./emsdk
./emsdk install ${{ env.EMCC_VERSION }}
./emsdk activate ${{ env.EMCC_VERSION }}
./fastcomp/emscripten/emcc -v
- name: npm Install
run: npm install
- name: Setup Chomp
uses: guybedford/chomp-action@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Compile to Wasm & Test Wasm
env:
WASI_PATH: './wasi-sdk-${{ env.WASI_VERSION_FULL }}'
EMSDK_PATH: './emsdk'
EMSCRIPTEN_BIN: './emsdk/fastcomp/emscripten/emcc'
run: chomp test
- name: Footprint
run: chomp footprint
- name: Benchmark Wasm
run: chomp bench