summaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorKevin Newton <kddnewton@gmail.com>2023-10-24 14:23:39 -0400
committergit <svn-admin@ruby-lang.org>2023-10-26 13:33:22 +0000
commitfeb1427ad8f3d6448d9f8d0c7009dfdf711b7f48 (patch)
treeb2a512367cd7346ca08816de4620bced03d16023 /.github
parentbfb9b5e69921c91901cce820f54e79907a5ae829 (diff)
[ruby/prism] Compile with WASI
https://github.com/ruby/prism/commit/73c44b0b9c
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/javascript-bindings.yml48
1 files changed, 48 insertions, 0 deletions
diff --git a/.github/workflows/javascript-bindings.yml b/.github/workflows/javascript-bindings.yml
new file mode 100644
index 0000000000..c381b4d5c6
--- /dev/null
+++ b/.github/workflows/javascript-bindings.yml
@@ -0,0 +1,48 @@
+name: JavaScript Bindings
+
+on:
+ push:
+ paths:
+ - ".github/workflows/javascript-bindings.yml"
+ - "include/"
+ - "src/"
+ - "*akefile*"
+ branches:
+ - main
+ pull_request:
+
+jobs:
+ build:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v3
+
+ - name: Set up Ruby
+ uses: ruby/setup-ruby@v1
+ with:
+ ruby-version: head
+ bundler-cache: true
+
+ - name: rake templates
+ run: bundle exec rake templates
+
+ - name: Set up WASI-SDK
+ run: |
+ wget https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-20/wasi-sdk-20.0-linux.tar.gz
+ tar xvf wasi-sdk-20.0-linux.tar.gz
+
+ - name: Build the project
+ run: make wasm WASI_SDK_PATH=$(pwd)/wasi-sdk-20.0
+
+ - uses: actions/setup-node@v3
+ with:
+ node-version: 20.x
+
+ - name: Run the tests
+ run: npm test
+ working-directory: javascript
+
+ - uses: actions/upload-artifact@v3
+ with:
+ name: prism.wasm
+ path: javascript/src/prism.wasm