-
Notifications
You must be signed in to change notification settings - Fork 2
55 lines (47 loc) · 1.44 KB
/
build.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
name: Build
on:
push:
branches:
- main
- release-*
tags:
- v*
pull_request:
branches:
- main
- release-*
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-go@v3
with:
go-version: '1.21'
- uses: acifani/setup-tinygo@v1
with:
tinygo-version: 0.30.0
- name: Install wasm-opt
run: |
wget https://github.com/WebAssembly/binaryen/releases/download/version_110/binaryen-version_110-x86_64-linux.tar.gz
tar -xvzf binaryen-version_110-x86_64-linux.tar.gz
rm -rf binaryen-version_110-x86_64-linux.tar.gz
cp binaryen-version_110/bin/wasm-opt /usr/local/bin
rm -Rf binaryen-version_110
- name: Build WebAssembly parser
run: |
tinygo build -o apex-parser.wasm -scheduler=none -target=wasi -no-debug cmd/apex-api/main.go
wasm-opt -O apex-parser.wasm -o apex-parser.wasm
- name: Build waPC module
run: |
tinygo build -o apex-wapc.wasm -scheduler=none -target=wasi -no-debug cmd/wapc/main.go
wasm-opt -O apex-wapc.wasm -o apex-wapc.wasm
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
apex-parser.wasm
apex-wapc.wasm
model.axdl
LICENSE.txt