-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtravis.sh
executable file
·48 lines (40 loc) · 1.2 KB
/
travis.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
#!/bin/bash
# use -j2 as travis VM's have 2 cores https://docs.travis-ci.com/user/reference/overview/
set -ev
# prevent timeouts
# this is not ideal... but we have looooong compile times.
# and travis_wait doesnt work in bash
(
while :
do
sleep 5m
echo "☃"
done
) &
# setup blender
wget https://ftp.nluug.nl/pub/graphics/blender/release/Blender2.83/blender-2.83.0-linux64.tar.xz
tar -xvf blender-2.83.0-linux64.tar.xz
PATH="$PWD/blender-2.83.0-linux64:$PATH"
# export .blend to .glb
cd assets_raw/models
python3 export_all_assets.py
cd ../..
# test and build
rustup update
cargo test --release -v --all
cd canon_collision
cargo build --release --no-default-features
cd ..
cargo build --release --all
if [ "${TRAVIS_PULL_REQUEST}" = "false" ]; then
# package
mkdir cc
mv target/release/canon_collision cc/
mv target/release/cc_cli cc/
mv target/release/cc_map_controllers cc/
mv package cc/
mv assets cc/
tar -cvzf canoncollision-${TRAVIS_COMMIT:0:15}-linux.tar.gz cc
# upload
echo "put canoncollision-${TRAVIS_COMMIT:0:15}-linux.tar.gz /home/ubuntu/CanonCollisionWebsite/builds/" | sftp [email protected]
fi