-
Notifications
You must be signed in to change notification settings - Fork 674
/
run.sh
34 lines (30 loc) · 1.68 KB
/
run.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
#docker-clean && digitalocean-clean && rm -fr .neph && mkdir -p .neph/{c,clojure,cpp,crystal,csharp,dart,elixir,fsharp,go,haskell,java,javascript,julia,kotlin,nim,pony,python,ruby,rust,scala,swift} && dropdb -U postgres benchmark && createdb -U postgres benchmark && psql -U postgres benchmark < .ci/dump.sql && PROVIDER=digitalocean rake config && bin/neph --seq
#. .env/default
#. .env/development
#
#doctl compute droplet create sieger --region ${DO_REGION} --image ${DO_IMAGE} --size ${DO_SIZE} --wait --ssh-keys ${DO_FINGERPRINT} --enable-private-networking
#sleep 30
#IP=$(doctl compute droplet list sieger --format PublicIPv4 --no-header)
#rsync -avz -e "ssh -i ${DO_KEY} -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null" --progress * root@${IP}:/root
#scp -i ${DO_KEY} -r .ci root@${IP}:/root/
#scp -i ${DO_KEY} -r .env root@${IP}:/root/.env
#scp -i ${DO_KEY} ${DO_KEY} root@${IP}:${DO_KEY}
#doctl compute ssh --ssh-key-path ${DO_KEY} sieger
# Clean database
dropdb -U postgres benchmark
createdb -U postgres benchmark
psql -U postgres -d benchmark < dump.sql
find . -mindepth 3 -type f -name config.yaml > /tmp/list.txt
while read line ; do
echo "*********** ${line} *************"
LANGUAGE=`echo $line | awk -F '/' '{print $(NF-2)}'`
FRAMEWORK=`echo $line | awk -F '/' '{print $(NF-1)}'`
make -f ~/web-frameworks/${LANGUAGE}/${FRAMEWORK}/.Makefile build
sleep 30
make -f ~/web-frameworks/${LANGUAGE}/${FRAMEWORK}/.Makefile collect
make -f ~/web-frameworks/${LANGUAGE}/${FRAMEWORK}/.Makefile clean
docker ps -aq | xargs --no-run-if-empty docker rm -f;
docker images -aq | xargs --no-run-if-empty docker rmi -f;
sudo docker system prune -a -f
sleep 1
done < /tmp/list.txt