forked from rhomobile/rhodes
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
187 lines (151 loc) · 5.64 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
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
before_install:
- $TRAVIS_BUILD_DIR/.ci/safe_run.sh $TRAVIS_BUILD_DIR/.ci/hosts/$TRAVIS_OS_NAME/before_install.sh
- $TRAVIS_BUILD_DIR/.ci/safe_run.sh $TRAVIS_BUILD_DIR/.ci/targets/$RHO_TARGET/before_install.sh
install:
- ANDROID_NDK_HOME="${HOME}/android-ndk-r${NDK_NUMBER}"
- $TRAVIS_BUILD_DIR/.ci/safe_run.sh $TRAVIS_BUILD_DIR/.ci/check_cache_and_install_ruby.sh
- rvm use 2.3.4
- |
if [[ -z $(rvm gemset list | grep rhodes) ]]; then
rvm gemset create rhodes;
fi
- rvm gemset use rhodes
- $TRAVIS_BUILD_DIR/.ci/safe_run.sh $TRAVIS_BUILD_DIR/.ci/check_cache_and_install_gems.sh
- $TRAVIS_BUILD_DIR/.ci/safe_run.sh $TRAVIS_BUILD_DIR/.ci/hosts/$TRAVIS_OS_NAME/install.sh
- $TRAVIS_BUILD_DIR/.ci/safe_run.sh $TRAVIS_BUILD_DIR/.ci/targets/$RHO_TARGET/install.sh
script:
- ANDROID_NDK_HOME="${HOME}/android-ndk-r${NDK_NUMBER}"
- rvm list
- rvm use 2.3.4
- rvm gemset list
- rvm gemset use rhodes
- gem list
- cd $TRAVIS_BUILD_DIR
#- .ci/hosts/$TRAVIS_OS_NAME/build_rhoruby.sh #TODO
- $TRAVIS_BUILD_DIR/.ci/safe_run.sh $TRAVIS_BUILD_DIR/.ci/targets/$RHO_TARGET/pre_gem.sh
- rake gem
- travis_wait 30 gem install ./rhodes-$(cat ./version).gem --no-document --ignore-dependencies -f
- $TRAVIS_BUILD_DIR/.ci/safe_run.sh $TRAVIS_BUILD_DIR/.ci/targets/$RHO_TARGET/rho_setup.sh
- .ci/install_rhoconnect-client.sh
- cd $HOME
- rhodes app vanilla_rhodes_app
- rhodes jsapp vanilla_rhodes_jsapp
- rhodes nodejsapp vanilla_rhodes_nodejsapp
- cd $TRAVIS_BUILD_DIR
- |
if [[ -n $RHO_APP ]]; then
git clone $(.ci/app_repo.rb) $HOME/$RHO_APP;
cd $HOME/$RHO_APP/$(.ci/app_build_root.rb);
fi
- $TRAVIS_BUILD_DIR/.ci/safe_run.sh $TRAVIS_BUILD_DIR/.ci/targets/$RHO_TARGET/build_artefact_for_deploy.sh
#TODO: change this to run specs in auto mode and collect results
- travis_wait 30 $TRAVIS_BUILD_DIR/.ci/safe_run.sh $TRAVIS_BUILD_DIR/.ci/targets/$RHO_TARGET/run_app_on_simulator.sh
cache:
directories:
- $HOME/.rvm
before_cache:
- echo Y | gem uninstall rhodes -a -I
before_deploy:
- mkdir $BUILD_ARTEFACTS_DIR
- "$TRAVIS_BUILD_DIR/.ci/safe_run.sh $TRAVIS_BUILD_DIR/.ci/targets/$RHO_TARGET/before_deploy.sh"
deploy:
provider: s3
bucket: tau-autobuilds
access_key_id: "$AWS_ACCESS_KEY"
secret_access_key: "$AWS_SECRET_KEY"
skip_cleanup: true
local_dir: "$BUILD_ARTEFACTS_DIR"
upload-dir: '$S3_DEPLOY_DIR/$S3_JOB_DIR-$RHO_TARGET-$RHO_APP'
acl: public_read
region: eu-central-1
on:
all_branches: true
android:
components:
- tools
- platform-tools
- sdkmanager tools
- extra-google-google_play_services
- extra-google-m2repository
- extra-android-m2repository
- build-tools-26.0.2
- android-${RHO_ANDROID_LEVEL:-19}
- addon-google_apis-google-${RHO_ANDROID_LEVEL:-19}
- sys-img-armeabi-v7a-android-26
env:
global:
- BUILD_ARTEFACTS_DIR=$HOME/build_artefacts
- S3_JOB_DIR="$TRAVIS_COMMIT"/"$TRAVIS_OS_NAME"
- S3_DEPLOY_DIR="$TRAVIS_REPO_SLUG"/"$TRAVIS_BRANCH"
- QTDIR="$HOME/Qt5.9.5/5.9.5/clang_64"
#osx_image: xcode9.1
matrix:
include:
- language: objective-c
os: osx
env: RHO_TARGET="rhosimulator_osx" CACHE_NAME="RVM_OSX"
- language: objective-c
os: osx
env: RHO_TARGET="iphone" RHO_APP="auto_common_spec" CACHE_NAME="RVM_OSX"
- language: objective-c
os: osx
env: RHO_TARGET="iphone" RHO_APP="framework_spec" CACHE_NAME="RVM_OSX"
- language: android
os: linux
env: RHO_TARGET="android" RHO_APP="auto_common_spec" CACHE_NAME="RVM_LINUX" RHO_ANDROID_LEVEL="19" NDK_NUMBER="17c"
#- language: android
# os: linux
# env: RHO_TARGET="android" RHO_APP="auto_common_spec" RHO_ANDROID_LEVEL="24"
- language: android
os: linux
env: RHO_TARGET="android" RHO_APP="framework_spec" CACHE_NAME="RVM_LINUX" RHO_ANDROID_LEVEL="19" NDK_NUMBER="17c"
#- language: android
# os: linux
# env: RHO_TARGET="android" RHO_APP="auto_common_spec" CACHE_NAME="RVM_LINUX" RHO_ANDROID_LEVEL="19" NDK_NUMBER="16b"
#- language: android
# os: linux
# env: RHO_TARGET="android" RHO_APP="framework_spec" CACHE_NAME="RVM_LINUX" RHO_ANDROID_LEVEL="19" NDK_NUMBER="16b"
- language: android
os: linux
env: RHO_TARGET="android" RHO_APP="auto_common_spec" CACHE_NAME="RVM_LINUX" RHO_ANDROID_LEVEL="19" NDK_NUMBER="15c"
- language: android
os: linux
env: RHO_TARGET="android" RHO_APP="framework_spec" CACHE_NAME="RVM_LINUX" RHO_ANDROID_LEVEL="19" NDK_NUMBER="15c"
#- language: android
# os: linux
# env: RHO_TARGET="android" RHO_APP="framework_spec" RHO_ANDROID_LEVEL="24"
#- language: android
# os: linux
# env: RHO_TARGET="android" RHO_APP="sas"
#- language: android
# os: linux
# env: RHO_TARGET="android" RHO_APP="kitchenSinkJS"
#- language: android
# os: linux
# env: RHO_TARGET="android" RHO_APP="kitchenSinkRuby"
#- language: objective-c
# os: osx
# env: RHO_TARGET="iphone" RHO_APP="framework_spec"
# - language: objective-c
# os: osx
# env: RHO_TARGET="iphone" RHO_APP="sas"
# - language: objective-c
# os: osx
# env: RHO_TARGET="iphone" RHO_APP="kitchenSinkJS"
# - language: objective-c
# os: osx
# env: RHO_TARGET="iphone" RHO_APP="kitchenSinkRuby"
# - language: objective-c
# os: osx
# env: RHO_TARGET="rhosimulator" RHO_APP="framework_spec"
# - language: objective-c
# os: osx
# env: RHO_TARGET="rhosimulator" RHO_APP="sas"
# - language: objective-c
# os: osx
# env: RHO_TARGET="rhosimulator" RHO_APP="kitchenSinkJS"
# - language: objective-c
# os: osx
# env: RHO_TARGET="rhosimulator" RHO_APP="kitchenSinkRuby"
# - RHO_TARGET="rhosimulator" RHO_APP="push_spec"
# - RHO_TARGET="rhosimulator" RHO_APP="rhoconnect-client_spec"