Skip to content

Commit

Permalink
added wasm release action
Browse files Browse the repository at this point in the history
  • Loading branch information
RicBent committed Jun 14, 2024
1 parent 01eafe7 commit 6563d01
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -326,3 +326,37 @@ jobs:
asset_path: artifacts/kiwi-java.jar
asset_name: kiwi-java-${{ steps.get_release.outputs.tag_name }}-lnx-${{ matrix.arch }}.jar
asset_content_type: application/octet-stream

build-emscripten:
name: Emscripten
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: true
lfs: true
- uses: mymindstorm/setup-emsdk@v14
- name: Get release
id: get_release
uses: bruceadams/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
- name: Configure Build
run: mkdir build && cd build && emcmake cmake -DCMAKE_BUILD_TYPE=Release -DKIWI_USE_CPUINFO=OFF -DKIWI_BUILD_TEST=OFF -DKIWI_USE_MIMALLOC=OFF -DKIWI_BUILD_CLI=OFF -DKIWI_BUILD_EVALUATOR=OFF -DKIWI_BUILD_MODEL_BUILDER=OFF ..
- name: Build
run: cd build && make -j2
- run: |
mkdir result
cd result
mv ../build/bindings/wasm/kiwi-wasm.js
mv ../build/bindings/wasm/kiwi-wasm.wasm
tar -zcvf ../asset.tgz kiwi-wasm.js kiwi-wasm.wasm
- name: Upload release binary
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
with:
upload_url: ${{ steps.get_release.outputs.upload_url }}
asset_path: asset.tgz
asset_name: kiwi_wasm_${{ steps.get_release.outputs.tag_name }}.tgz
asset_content_type: application/octet-stream

0 comments on commit 6563d01

Please sign in to comment.