Skip to content

build(deps)!: update tooling for Node.js 18 #120

build(deps)!: update tooling for Node.js 18

build(deps)!: update tooling for Node.js 18 #120

Workflow file for this run

name: Test
on:
push:
branches: main
pull_request:
branches: main
env:
WABT_VERSION: "1.0.24"
EMCC_VERSION: "1.40.1-fastcomp"
jobs:
build:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v7
- name: Set up Node.js
uses: actions/setup-node@v7
with:
node-version: 18.x
- name: Prepare
id: preparation
run: |
echo "PROJ_ROOT=$GITHUB_WORKSPACE" >> "$GITHUB_OUTPUT"
- name: Set up Docker
uses: docker/setup-buildx-action@c47758b77c9736f4b2ef4073d4d51994fabfe349 # v3.7.1
- name: Install
run: npm ci
- name: Install wabt
env:
PROJ_ROOT: ${{ steps.preparation.outputs.PROJ_ROOT }}
run: |
cd "$PROJ_ROOT";
cd ../;
if [[ "$RUNNER_OS" == "Linux" ]]; then
export WABT_OS="ubuntu";
fi
if [[ "$RUNNER_OS" == "macOS" ]]; then
export WABT_OS="macos";
fi
if [[ "$RUNNER_OS" == "Windows" ]]; then
export WABT_OS="windows";
fi
curl -fsSL "https://github.com/WebAssembly/wabt/releases/download/${WABT_VERSION}/wabt-${WABT_VERSION}-${WABT_OS}.tar.gz" -O
# check if package downloaded
ls -la
tar xvf "wabt-${WABT_VERSION}-${WABT_OS}.tar.gz"
# check if wabt binaries installed
ls -la "./wabt-${WABT_VERSION}/bin/"
- name: Compile to Wasm & Test Wasm
env:
PROJ_ROOT: ${{ steps.preparation.outputs.PROJ_ROOT }}
run: |
cd "$PROJ_ROOT";
rm lib/lexer.wasm;
npm run build-wasm;
npm run build;
# test
npm run test;
- name: Benchmark Wasm
env:
PROJ_ROOT: ${{ steps.preparation.outputs.PROJ_ROOT }}
run: |
cd "$PROJ_ROOT";
npm run bench;