pkg/client-sdk/wasm: build wasm (#238)

Signed-off-by: tiero <3596602+tiero@users.noreply.github.com>
This commit is contained in:
Marco Argentieri
2024-08-12 16:40:27 +02:00
committed by GitHub
parent 72a7f29bab
commit c559b91fec
17 changed files with 273 additions and 44 deletions

55
.github/workflows/ark.artifacts.yaml vendored Normal file
View File

@@ -0,0 +1,55 @@
name: Build and Upload Binaries and WASM
on:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.21.0
- name: Build binaries
run: make build-all
- name: Build WASM SDK
run: |
cd pkg/client-sdk
make build-wasm
- name: Upload server binaries
uses: actions/upload-artifact@v4
with:
name: server-binaries
path: ./server/build
if-no-files-found: error
retention-days: 5
compression-level: 6
overwrite: true
- name: Upload client binaries
uses: actions/upload-artifact@v4
with:
name: client-binaries
path: ./client/build
if-no-files-found: error
retention-days: 5
compression-level: 6
overwrite: true
- name: Upload WASM SDK
uses: actions/upload-artifact@v4
with:
name: wasm-sdk
path: pkg/client-sdk/build
if-no-files-found: error
retention-days: 5
compression-level: 0
overwrite: true

View File

@@ -25,6 +25,7 @@ jobs:
- name: Build binaries
run: make build-all
# Server
- name: Upload server binary (Linux, AMD64)
uses: actions/upload-release-asset@v1
env:
@@ -106,6 +107,16 @@ jobs:
asset_name: ark-darwin-arm64
asset_content_type: application/octet-stream
# WASM SDK
- name: Upload WASM SDK
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: pkg/client-sdk/build/client-sdk.wasm
asset_name: client-sdk.wasm
asset_content_type: application/wasm
# Docker

View File

@@ -4,12 +4,14 @@ on:
push:
paths:
- "server/**"
- "pkg/client-sdk/**"
branches: [master]
pull_request:
branches:
branches:
- master
paths:
- "server/**"
- "pkg/client-sdk/**"
jobs:
test-server:
@@ -38,6 +40,7 @@ jobs:
- run: go get -v -t -d ./...
- name: unit testing
run: make test
test-sdk:
name: sdk unit tests
runs-on: ubuntu-latest
@@ -60,4 +63,4 @@ jobs:
args: '-severity high -quiet ./...'
- run: go get -v -t -d ./...
- name: unit testing
run: make test
run: make test