forked from vanessa-opensource/add
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
141 lines (126 loc) · 9.43 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
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
sudo: required
services:
- docker
git:
depth: 5
env:
global:
- ONECVERSION=8.3.10.2639
addons:
apt:
packages:
# 7z is used for packaging (see before_deploy)
- p7zip-full
cache:
directories:
- '$HOME/.m2/repository'
- '$HOME/.sonar/cache'
- '$HOME/docker'
- '$TRAVIS_BUILD_DIR/build'
- '$TRAVIS_BUILD_DIR/.forbuild'
before_install:
- sudo ./tools/linux/dockerdownload.sh
- docker images | grep onec
before_cache:
- sudo chown $USER -R $TRAVIS_BUILD_DIR/build
- rm -rf $TRAVIS_BUILD_DIR/build/ib
- rm -rf $TRAVIS_BUILD_DIR/build/ibservice
- rm -rf $TRAVIS_BUILD_DIR/build/ibxdd
- rm -f $TRAVIS_BUILD_DIR/build/ib
- rm -rf $TRAVIS_BUILD_DIR/build/ib
- rm -rf $TRAVIS_BUILD_DIR/build/ibservicexdd
- rm -rf $TRAVIS_BUILD_DIR/build/ServiceBases
#install:
# - docker pull evilbeaver/onescript:1.0.19
jobs:
include:
- stage: compile
script:
- sudo docker run --detach -e XVFB_RESOLUTION=1920x1080x24 --volume="${PWD}":/home/ubuntu/code onec32/client:${ONECVERSION} client > /tmp/container_id
- sudo docker ps && sleep 5
- sudo docker exec -u ubuntu "$(cat /tmp/container_id)" /bin/bash -c "cd /home/ubuntu/code; DISPLAY=:1.0 wget -q --continue -O /tmp/oscript.deb https://oscript.io/downloads/latest/x64/onescript-engine_1.3.0_all.deb && sudo dpkg -i /tmp/oscript.deb"
- sudo docker exec -u ubuntu "$(cat /tmp/container_id)" /bin/bash -c "cd /home/ubuntu/code; DISPLAY=:1.0 sudo opm install opm && sudo opm install"
- sudo docker exec -u ubuntu "$(cat /tmp/container_id)" /bin/bash -c "cd /home/ubuntu/code; DISPLAY=:1.0 sudo opm run init file --buildFolderPath ./build"
- sudo docker stop "$(cat /tmp/container_id)"
- stage: test
script:
- sudo docker run --detach -e XVFB_RESOLUTION=1920x1080x24 --volume="${PWD}":/home/ubuntu/code onec32/client:${ONECVERSION} client > /tmp/container_id
- sudo docker ps && sleep 5
- sudo docker run -d -p 4040:4040 --link "$(cat /tmp/container_id)":http wernight/ngrok ngrok http http:6080 > /tmp/container_idngrok
- sleep 5 && echo $(curl -s http://127.0.0.1:4040/status | grep -P "http://.*?ngrok.io" -oh)"/vnc_auto.html"
- sudo docker exec -u ubuntu "$(cat /tmp/container_id)" /bin/bash -c "cd /home/ubuntu/code; DISPLAY=:1.0 wget -q --continue -O /tmp/oscript.deb https://oscript.io/downloads/latest/x64/onescript-engine_1.3.0_all.deb && sudo dpkg -i /tmp/oscript.deb"
- sudo docker exec -u ubuntu "$(cat /tmp/container_id)" /bin/bash -c "cd /home/ubuntu/code; DISPLAY=:1.0 sudo opm install opm && sudo opm install && sudo opm update vanessa-runner && sudo opm install v8find"
- ./tools/linux/travistest.sh ./features/StepsRunner/
- sudo docker exec -u ubuntu "$(cat /tmp/container_id)" /bin/bash -c "cd /home/ubuntu/code; DISPLAY=:1.0 sudo opm run initib file --buildFolderPath ./build"
- sudo docker exec -u ubuntu "$(cat /tmp/container_id)" /bin/bash -c "cd /home/ubuntu/code; DISPLAY=:1.0 sudo opm run vanessatravis all --path ./features/StepsRunner/ --settings ./tools/JSON/VBParams8310linux.json"
- sudo docker exec -u ubuntu "$(cat /tmp/container_id)" /bin/bash -c "cd /home/ubuntu/code; DISPLAY=:1.0 sudo opm run vanessatravis all --path ./features/StepsProgramming/ --settings ./tools/JSON/VBParams8310linux.json"
- sudo docker exec -u ubuntu "$(cat /tmp/container_id)" /bin/bash -c "cd /home/ubuntu/code; DISPLAY=:1.0 sudo opm run vanessatravis all --path ./features/Core/FeatureLoad/ --settings ./tools/JSON/VBParams8310linux.json"
- sudo docker stop "$(cat /tmp/container_id)"
- sudo docker stop "$(cat /tmp/container_idngrok )"
- stage: test
script:
- sudo docker run --detach -e XVFB_RESOLUTION=1920x1080x24 --volume="${PWD}":/home/ubuntu/code onec32/client:${ONECVERSION} client > /tmp/container_id
- sudo docker ps && sleep 5
- sudo docker run -d -p 4040:4040 --link "$(cat /tmp/container_id)":http wernight/ngrok ngrok http http:6080 > /tmp/container_idngrok
- sleep 5 && echo $(curl -s http://127.0.0.1:4040/status | grep -P "http://.*?ngrok.io" -oh)"/vnc_auto.html"
- sudo docker exec -u ubuntu "$(cat /tmp/container_id)" /bin/bash -c "cd /home/ubuntu/code; DISPLAY=:1.0 wget -q --continue -O /tmp/oscript.deb https://oscript.io/downloads/latest/x64/onescript-engine_1.3.0_all.deb && sudo dpkg -i /tmp/oscript.deb"
- sudo docker exec -u ubuntu "$(cat /tmp/container_id)" /bin/bash -c "cd /home/ubuntu/code; DISPLAY=:1.0 sudo opm install opm && sudo opm install && sudo opm update vanessa-runner && sudo opm install v8find"
- ./tools/linux/travistest.sh ./features/Core/Translate/
- sudo docker exec -u ubuntu "$(cat /tmp/container_id)" /bin/bash -c "cd /home/ubuntu/code; DISPLAY=:1.0 sudo opm run initib file --buildFolderPath ./build"
- sudo docker exec -u ubuntu "$(cat /tmp/container_id)" /bin/bash -c "cd /home/ubuntu/code; DISPLAY=:1.0 sudo opm run vanessatravis all --path ./features/Core/Translate/ --settings ./tools/JSON/VBParams8310linux.json"
- sudo docker exec -u ubuntu "$(cat /tmp/container_id)" /bin/bash -c "cd /home/ubuntu/code; DISPLAY=:1.0 sudo opm run vanessatravis all --path ./features/Core/FeatureReader/ --settings ./tools/JSON/VBParams8310linux.json"
# - sudo docker exec -u ubuntu "$(cat /tmp/container_id)" /bin/bash -c "cd /home/ubuntu/code; DISPLAY=:1.0 sudo opm run vanessatravis all --path ./features/Core/FeatureReader/ --settings ./tools/JSON/VBParams8310linux.json"
- sudo docker stop "$(cat /tmp/container_id)"
- sudo docker stop "$(cat /tmp/container_idngrok )"
- stage: test
script:
- sudo docker run --detach -e XVFB_RESOLUTION=1920x1080x24 --volume="${PWD}":/home/ubuntu/code onec32/client:${ONECVERSION} client > /tmp/container_id
- sudo docker ps && sleep 5
- sudo docker run -d -p 4040:4040 --link "$(cat /tmp/container_id)":http wernight/ngrok ngrok http http:6080 > /tmp/container_idngrok
- sleep 5 && echo $(curl -s http://127.0.0.1:4040/status | grep -P "http://.*?ngrok.io" -oh)"/vnc_auto.html"
- sudo docker exec -u ubuntu "$(cat /tmp/container_id)" /bin/bash -c "cd /home/ubuntu/code; DISPLAY=:1.0 wget -q --continue -O /tmp/oscript.deb https://oscript.io/downloads/latest/x64/onescript-engine_1.3.0_all.deb && sudo dpkg -i /tmp/oscript.deb"
- sudo docker exec -u ubuntu "$(cat /tmp/container_id)" /bin/bash -c "cd /home/ubuntu/code; DISPLAY=:1.0 sudo opm install opm && sudo opm install && sudo opm update vanessa-runner && sudo opm install v8find"
- ./tools/linux/travistest.sh ./features/Core/FeatureReader/
- sudo docker exec -u ubuntu "$(cat /tmp/container_id)" /bin/bash -c "cd /home/ubuntu/code; DISPLAY=:1.0 sudo opm run initib file --buildFolderPath ./build"
- sudo docker exec -u ubuntu "$(cat /tmp/container_id)" /bin/bash -c "cd /home/ubuntu/code; DISPLAY=:1.0 sudo opm run vanessatravis all --path ./features/Core/TestClient/ --settings ./tools/JSON/VBParams8310linux.json"
- sudo docker stop "$(cat /tmp/container_id)"
- sudo docker stop "$(cat /tmp/container_idngrok )"
- stage: deploy
script:
- sudo docker run --detach -e XVFB_RESOLUTION=1920x1080x24 --volume="${PWD}":/home/ubuntu/code onec32/client:${ONECVERSION} client > /tmp/container_id
- sudo docker ps && sleep 5
- sudo docker run -d -p 4040:4040 --link "$(cat /tmp/container_id)":http wernight/ngrok ngrok http http:6080 > /tmp/container_idngrok
- sleep 5 && echo $(curl -s http://127.0.0.1:4040/status | grep -P "http://.*?ngrok.io" -oh)"/vnc_auto.html"
- sudo docker exec -u ubuntu "$(cat /tmp/container_id)" /bin/bash -c "cd /home/ubuntu/code; DISPLAY=:1.0 wget -q --continue -O /tmp/oscript.deb https://oscript.io/downloads/latest/x64/onescript-engine_1.3.0_all.deb && sudo dpkg -i /tmp/oscript.deb"
- sudo docker exec -u ubuntu "$(cat /tmp/container_id)" /bin/bash -c "cd /home/ubuntu/code; DISPLAY=:1.0 sudo opm install opm && sudo opm install && sudo opm update vanessa-runner && sudo opm install v8find"
- sudo docker exec -u ubuntu "$(cat /tmp/container_id)" /bin/bash -c "cd /home/ubuntu/code; DISPLAY=:1.0 sudo opm build ./"
- sudo chown $USER -R ./
- 7z a add.tar ./.forbuild/features/ ./.forbuild/lib ./.forbuild/locales ./.forbuild/tests/smoke ./.forbuild/plugins ./.forbuild/vendor ./.forbuild/bddRunner.epf ./.forbuild/xddTestRunner.epf
- 7z a add.7z ./.forbuild/features/ ./.forbuild/lib ./.forbuild/locales ./.forbuild/tests/smoke/ .forbuild/plugins ./.forbuild/vendor ./.forbuild/bddRunner.epf ./.forbuild/xddTestRunner.epf
- 7z a add.tar.gz add.tar
- 7z a add.tar.bz2 add.tar
deploy:
- provider: releases
api_key:
secure: "$GITHUB_OAUTH_TOKEN"
file:
- "add.tar.gz"
- "add.7z"
- "add-*.ospx"
- "add.tar.bz2"
file_glob: "true"
skip_cleanup: true
on:
tags: true
branch: master
#- provider: script
# skip_cleanup: true
# script: docker run -it -e GITHUB_OAUTH_TOKEN -v $(pwd):/work_dir onec32/client:${ONECVERSION} sh -c 'cd /work_dir; opm push --token $GITHUB_OAUTH_TOKEN --channel dev --file ./add-*.ospx; exit'
# on:
# branch: develop
#- provider: script
# skip_cleanup: true
# script: docker run -it -e GITHUB_OAUTH_TOKEN -v $(pwd):/work_dir onec32/client:${ONECVERSION} sh -c 'cd /work_dir; opm push --token $GITHUB_OAUTH_TOKEN --channel stable --file ./add-*.ospx; exit'
# on:
# branch: master
# tags: true