-
Notifications
You must be signed in to change notification settings - Fork 100
166 lines (143 loc) · 4.26 KB
/
main.yml
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
name: Node.js examples
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
workflow_dispatch:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-20.04
strategy:
matrix:
node-version: [10.x, 12.x, 14.x]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Install apt-get packages
run: |
sudo ACCEPT_EULA=Y apt-get update
sudo ACCEPT_EULA=Y apt-get upgrade
sudo apt-get install build-essential curl wget git vim libboost-all-dev
sudo apt-get install llvm-dev liblld-10-dev libboost-all-dev
sudo apt-get install libjpeg-dev libpng-dev
- name: Install Tensorflow
run: |
wget https://storage.googleapis.com/tensorflow/libtensorflow/libtensorflow-cpu-linux-x86_64-2.4.0.tar.gz
sudo tar -C /usr/local/ -xzf libtensorflow-cpu-linux-x86_64-2.4.0.tar.gz
wget https://github.com/second-state/ssvm-tensorflow-deps/releases/download/0.1.0/ssvm-tensorflow-deps-lite-0.1.0-linux-x64.tar.gz
sudo tar -C /usr/local/lib -zxvf ssvm-tensorflow-deps-lite-0.1.0-linux-x64.tar.gz libtensorflowlite_c.so
sudo ldconfig
cargo install http_proxy
cargo install mtcnn
cargo install mobilenet_v2
- name: Set Rust to required version
run: rustup override set 1.50.0
- name: Install npm packages and Deno
run: |
npm i ssvm ssvm-extensions sync-request better-sqlite3
npm install -g rustwasmc
npm i -g wasm-pack
curl -fsSL https://deno.land/x/install/install.sh | sh
- name: Functions Interpreter
run: |
rustwasmc build
node node/app.js
rustwasmc clean
working-directory: nodejs/functions
- name: Functions AOT
run: |
rustwasmc build --enable-aot
node node/app.js
rustwasmc clean
working-directory: nodejs/functions
- name: JSON IO Interpreter
run: |
rustwasmc build
node node/app.js
rustwasmc clean
working-directory: nodejs/json_io
- name: JSON IO AOT
run: |
rustwasmc build --enable-aot
node node/app.js
rustwasmc clean
working-directory: nodejs/json_io
- name: RSA AOT
run: |
rustwasmc build --enable-aot
node node/app.js
rustwasmc clean
working-directory: nodejs/rsa_example
- name: WASI
run: |
rustwasmc build
node node/app.js
rustwasmc clean
working-directory: nodejs/wasi
- name: MobileNet Interpreter
run: |
rustwasmc build --enable-ext
cd test/
node test.js
cd ..
rustwasmc clean
working-directory: faas/mobilenet
- name: MobileNet AOT
run: |
rustwasmc build --enable-aot --enable-ext
cd test/
node test.js
cd ..
rustwasmc clean
working-directory: faas/mobilenet
- name: MTCNN Interpreter
run: |
rustwasmc build --enable-ext
cd test/
node test.js
cd ..
rustwasmc clean
working-directory: faas/mtcnn
- name: MTCNN AOT
run: |
rustwasmc build --enable-aot --enable-ext
cd test/
node test.js
cd ..
rustwasmc clean
working-directory: faas/mtcnn
- name: kmeans example AOT
run: |
rustwasmc build --enable-aot
cd node/
node app.js
cd ../
rustwasmc clean
working-directory: nodejs/kmeans
- name: Deno example
run: |
rustwasmc build --target deno
$HOME/.deno/bin/deno run --allow-read --allow-env --unstable deno/test.ts
rustwasmc clean
working-directory: deno/functions
- name: Nodejs API
run: |
wasm-pack build --target nodejs
cd node/
node date.js
node db.js
node http.js
node image.js
node cleanup.js
rm -rf ../target ../pkg
working-directory: nodejs/nodejs_example
- name: WasmEdge rust wasi application example
run: |
rustwasmc build
node app.js
working-directory: ssvm/file-example