-
Notifications
You must be signed in to change notification settings - Fork 16
192 lines (190 loc) · 6.13 KB
/
main.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
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
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
# CI workflow
name: sledge
on: [push, pull_request]
env:
LLVM_VERSION: 13
WASI_SDK_VERSION: 12
WASI_SDK_PATH: /opt/wasi-sdk
LANG: C.UTF-8
LANGUAGE: C.UTF-8
LC_ALL: C.UTF-8
# job control
jobs:
format:
runs-on: ubuntu-20.04
steps:
- name: Apt Update
run: sudo apt-get update
- uses: actions/checkout@v2
- name: Install Clang Format
run: |
sudo ./install_llvm.sh $LLVM_VERSION
- name: Run Clang Format
run: ./format.sh -d
test:
runs-on: ubuntu-20.04
steps:
- name: Apt Update
run: sudo apt-get update
- uses: actions/checkout@v2
- name: Init Submodules
run: git submodule update --init --recursive
- name: Install General GCC C/C++ Build toolchain
run: |
sudo apt-get install -y --no-install-recommends \
automake \
build-essential \
binutils-dev \
cmake \
git \
libtinfo5 \
libtool \
pkg-config
- name: Install curl / wget tools
run: |
sudo apt-get install -y --no-install-recommends \
curl \
ca-certificates \
libssl-dev \
lsb-release \
gpg-agent \
software-properties-common \
wget
- name: Install LLVM
run: |
sudo ./install_llvm.sh $LLVM_VERSION
- name: Install Rust
run: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | \
sh -s -- --default-toolchain stable --component rustfmt --target wasm32-wasi -y
echo "/root/.cargo/bin:$PATH" >> $GITHUB_PATH
- name: Get wasi-sdk
run: |
WASI_SDK_URL=https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-$WASI_SDK_VERSION/wasi-sdk-$WASI_SDK_VERSION.0-linux.tar.gz
wget $WASI_SDK_URL -O wasi-sdk.tar.gz
mkdir -p $WASI_SDK_PATH
tar xvfz wasi-sdk.tar.gz --strip-components=1 -C $WASI_SDK_PATH
- name: Install Test Script Utilities
run: |
sudo apt-get install -y --no-install-recommends \
fonts-dejavu \
fonts-cascadia-code \
fonts-roboto \
gnuplot \
httpie \
imagemagick \
netpbm \
pango1.0-tools \
wamerican
- name: Cache Cargo
uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
./awsm/target
key: ${{ runner.os }}-cargo-${{ hashFiles('./awsm/Cargo.lock') }}
- name: Compile aWsm
run: |
make awsm
- name: Compile libsledge
run: |
make libsledge
- name: Compile SLEdge
run: |
make runtime
- name: Install wasm_apps link
run: |
make wasm_apps
# TODO:Cache assets before being copied to ./runtime/bin
- name: Cache gocr
uses: actions/cache@v2
with:
path: ./runtime/bin/gocr.wasm.so
key: ${{ runner.os }}-gocr2-${{ hashFiles('./applications/Makefile', './applications/wasm_apps/gocr/**', './libsledge/Makefile' , './libsledge/src/**', './libsledge/include/**') }}
if: success() || failure()
- name: Hyde
run: |
echo $WASI_SDK_PATH
ls $WASI_SDK_PATH
make -f test.mk gocr__hyde
if: success() || failure()
- name: Upload Hyde Logs on Failure
uses: actions/upload-artifact@v2
if: failure()
with:
name: hyde-logs
path: ./tests/gocr/hyde/res/**/
- name: Handwriting
run: |
make -f test.mk gocr__handwriting
if: success() || failure()
- name: Five by Eight
run: |
make -f test.mk gocr__fivebyeight
if: success() || failure()
# - name: OCR by Word
# run: |
# make -f test.mk gocr__by_word
# if: success() || failure()
# - name: OCR by Font
# run: |
# make -f test.mk gocr__by_font
# if: success() || failure()
# - name: OCR by DPI
# run: |
# make -f test.mk gocr__by_dpi
# if: success() || failure()
# TODO:Cache assets before being copied to ./runtime/bin
- name: Cache EKF
uses: actions/cache@v2
with:
path: ./runtime/bin/gps_ekf.wasm.so
key: ${{ runner.os }}-gocr2-${{ hashFiles('./applications/Makefile', './applications/wasm_apps/TinyEKF/**', './libsledge/Makefile' , './libsledge/src/**', './libsledge/include/**') }}
if: success() || failure()
- name: EKF one iteration
run: |
make -f test.mk ekf__one_iteration
if: success() || failure()
# - name: EKF by Iteration
# run: |
# make -f test.mk ekf__by_iteration
# if: success() || failure()
# TODO:Cache assets before being copied to ./runtime/bin
- name: Image Classification
run: |
make -f test.mk cifar10__image_classification
if: success() || failure()
# TODO:Cache assets before being copied to ./runtime/bin
- name: Image Resize
run: |
make -f test.mk sod__image_resize__test
if: success() || failure()
# - name: Image Resize by Resolution
# run: |
# make -f test.mk sod__image_resize__by_resolution
# if: success() || failure()
# - name: License Plate Detection by Plate Count
# run: |
# make -f test.mk sod__lpd_by_plate_count
# if: success() || failure()
# - name: Bimodal
# run: |
# make -f test.mk fibonacci__bimodal
# if: success() || failure()
# - name: Concurrency
# run: |
# make -f test.mk empty__concurrency
# if: success() || failure()
# - name: Payload
# run: |
# make -f test.mk TODO
# if: success() || failure()
- name: Wasm Trap Divide by Zero
run: |
make -f test.mk trap_divzero
if: success() || failure()
- name: Wasm Trap Stack Overflow
run: |
make -f test.mk stack_overflow
if: success() || failure()