-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.sh
49 lines (28 loc) · 1.06 KB
/
build.sh
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
#https://misc.flogisoft.com/bash/tip_colors_and_formatting
#!/bin/bash
###################################################
# Install all dependencies #
###################################################
echo -e "\e[43mFetching dependencies ...\e[49m"
go get ./...
echo -e "\e[42mBuilding addons process started\e[49m"
###################################################
# Build dll/so for PQC schemes #
###################################################
go build -buildmode=c-shared -o dilithium.so dilithium.go
go build -buildmode=c-shared -o csidh.so csidh.go
go build -buildmode=c-shared -o kyber.so kyber.go
go build -buildmode=c-shared -o bliss.so bliss.go
go build --buildmode c-shared -o sike.so sike.go
go build --buildmode=c-shared -o sidh.so sidh.go
go build --buildmode c-shared -o kyber_pke.so kyber_pke.go
#################################
# Build addons via node-gyp #
#################################
node-gyp configure build
if [ $? -eq 0 ]; then
cat success.txt
else
cat fail.txt
fi
cd ..