-
Notifications
You must be signed in to change notification settings - Fork 3
/
.travis.yml
44 lines (44 loc) · 1.61 KB
/
.travis.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
language: cpp
sudo: required
dist: bionic
matrix:
include:
- os: linux
compiler: gcc
addons:
apt:
update: true
sources:
- sourceline: 'ppa:ubuntu-toolchain-r/test'
packages:
- gcc-9
- g++-9
- cmake
- binutils
- libgoogle-glog-dev
- libdouble-conversion-dev
env:
- MAKEFLAGS=-j2
- MATRIX_EVAL="CC=gcc-9 && CXX=g++-9"
before_script:
- eval "${MATRIX_EVAL}"
# - cd assets
# - npm run build:all
# - cd -
script:
- ./compile_external_release.sh
- cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_CXX_FLAGS="-DEXCLUDE_PSQL_TESTS" .
- make
- echo '{ "USE_SSL":false, "ADDRESS":"localhost", "PORT":8080, "DEBUG_LEVEL":"trace", "CONNECTION_STRING":"postgres://@localhost/", "TICK_LENGTH":100, "LOG_TICK_TIMES":true }' &> bin/config.json
- bin/lotr_test
after_script:
- eval "$(ssh-agent -s)"
- echo "$SSH_KEY" | base64 -d > test.zip
- unzip test.zip
- export TEMPFILE=$(mktemp)
- echo "$SSH_KNOWN_HOSTS" > $TEMPFILE
- ssh -o "UserKnownHostsFile $TEMPFILE" -i deploy_rsa lotr@${DEPLOY_SERVER} 'killall -s SIGINT lotr_back'
- sleep 1
- scp -o "UserKnownHostsFile $TEMPFILE" -i deploy_rsa bin/lotr_backend lotr@${DEPLOY_SERVER}:/home/lotr/lotr_backend
- ssh -o "UserKnownHostsFile $TEMPFILE" -i deploy_rsa lotr@${DEPLOY_SERVER} 'cp lotr_backend builds/${TRAVIS_COMMIT}'
- ssh -o "UserKnownHostsFile $TEMPFILE" -i deploy_rsa lotr@${DEPLOY_SERVER} 'tmux new-session -d -s "lotr_session" /home/lotr/restart_lotr.sh'