mirror of
https://github.com/ChaiScript/ChaiScript.git
synced 2026-07-31 16:56:32 +08:00
Port Rob Loach's ChaiScript.js work (https://github.com/RobLoach/ChaiScript.js) into the main repository as an Emscripten build target. Adds a GitHub Actions workflow that builds ChaiScript to WebAssembly and publishes artifacts (JS, WASM, HTML) for embedding in the official ChaiScript.com website. Includes an HTML interactive playground frontend and a native test validating the eval API surface. Co-Authored-By: Rob Loach <robloach@gmail.com> Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
43 lines
1.0 KiB
YAML
43 lines
1.0 KiB
YAML
name: Emscripten
|
|
|
|
on:
|
|
push:
|
|
branches: [develop, main]
|
|
pull_request:
|
|
branches: [develop, main]
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
emscripten:
|
|
name: Emscripten WebAssembly Build
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Setup Emscripten
|
|
uses: mymindstorm/setup-emsdk@v14
|
|
|
|
- name: Configure
|
|
run: emcmake cmake -B build-em -S emscripten -DCMAKE_BUILD_TYPE=Release
|
|
|
|
- name: Build
|
|
run: cmake --build build-em -j
|
|
|
|
- name: Verify artifacts
|
|
run: |
|
|
test -f build-em/chaiscript.js
|
|
test -f build-em/chaiscript.wasm
|
|
test -f build-em/chaiscript.html
|
|
echo "All expected artifacts present"
|
|
ls -lh build-em/chaiscript.*
|
|
|
|
- name: Upload artifacts
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: chaiscript-web
|
|
path: |
|
|
build-em/chaiscript.js
|
|
build-em/chaiscript.wasm
|
|
build-em/chaiscript.html
|
|
retention-days: 90
|