-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add/fix Travis tests #372
Merged
Merged
Add/fix Travis tests #372
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
8caccd0
Require sudo in Travis
funkyboy d00aaca
Remove untested android API
funkyboy 55024ae
Fix file layout
funkyboy 8f054aa
Remove caches
funkyboy c9a81e5
Add no audio as a global variable
funkyboy 8dfbe41
Fix issue with new build tools
funkyboy 2642c50
Remove unneeded install
funkyboy 4145c5d
Fix SSL issue with openjdk
funkyboy d4306b7
Add gradle.properties
funkyboy 5a3502d
Split tests in different scripts
funkyboy 6e5622a
Update obsolete flags
funkyboy 909e502
Downgrade compileSdkVersion
funkyboy fe13cc6
Unset ANDROID_HOME
funkyboy 16d67a3
Add Slack and email notifications
funkyboy 3a4325e
Build only master and develop branches
funkyboy File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,49 +1,68 @@ | ||
language: android | ||
sudo: true | ||
android: | ||
components: | ||
- platform-tools | ||
- tools | ||
- build-tools-27.0.3 | ||
- android-22 | ||
- android-24 | ||
- android-25 | ||
- extra-android-m2repository | ||
- sys-img-armeabi-v7a-android-22 | ||
|
||
jdk: | ||
- oraclejdk8 | ||
- openjdk7 | ||
|
||
env: | ||
- BUILD_ANDROID=false | ||
- BUILD_ANDROID=true | ||
global: | ||
- QEMU_AUDIO_DRV=none | ||
matrix: | ||
- BUILD_ANDROID=false | ||
- BUILD_ANDROID=true | ||
|
||
matrix: | ||
exclude: | ||
- jdk: openjdk7 | ||
env: BUILD_ANDROID=true | ||
|
||
cache: | ||
directories: | ||
- $HOME/.gradle/caches/4.5 | ||
- $HOME/.gradle/caches/jars-1 | ||
- $HOME/.gradle/daemon | ||
- $HOME/.gradle/native | ||
- $HOME/.gradle/wrapper | ||
|
||
before_script: | ||
- if [ "$BUILD_ANDROID" = "true" ]; then echo no | android create avd --force -n test -t android-22 --abi armeabi-v7a; fi | ||
- if [ "$BUILD_ANDROID" = "true" ]; then emulator -avd test -no-skin -no-audio -no-window & fi | ||
- if [ "$BUILD_ANDROID" = "true" ]; then echo no | android create avd -f -n test -t android-22 --abi armeabi-v7a; fi | ||
- if [ "$BUILD_ANDROID" = "true" ]; then emulator -avd test -no-window & fi | ||
- if [ "$BUILD_ANDROID" = "true" ]; then android-wait-for-emulator; fi | ||
- if [ "$BUILD_ANDROID" = "true" ]; then adb shell input keyevent 82 & fi | ||
|
||
script: if [ "$BUILD_ANDROID" = "true" ]; then ./gradlew connectedAndroidTest; else ret=0; ./gradlew java:testRealtimeSuite || ret=1; ./gradlew java:testRestSuite || ret=1; exit $ret; fi | ||
script: if [ "$BUILD_ANDROID" = "true" ]; then ./ci/run-android-tests.sh; else ./ci/run-java-tests.sh; fi | ||
|
||
# Buffer overflow patch. Source: https://github.com/travis-ci/travis-ci/issues/5227#issuecomment-165135711 | ||
before_install: | ||
- if [ "$BUILD_ANDROID" = "false" ]; then cat /etc/hosts; fi | ||
- if [ "$BUILD_ANDROID" = "false" ]; then sudo hostname "$(hostname | cut -c1-63)"; fi | ||
- if [ "$BUILD_ANDROID" = "false" ]; then sudo sed -i -e "s/^\\(127\\.0\\.0\\.1.*\\)/\\1 $(hostname | cut -c1-63)/" /etc/hosts; fi | ||
- if [ "$BUILD_ANDROID" = "false" ]; then cat /etc/hosts; fi | ||
- if [ "$BUILD_ANDROID" = "true" ]; then yes | sdkmanager "platforms;android-22"; fi | ||
# taken from https://github.com/gretty-gradle-plugin/gretty/commit/f680ab388bf1f7a46f505ee2fe1a4a29e9a0a41e | ||
- sudo apt-get -qq update | ||
- sudo apt-get install -y zip curl locate libbcprov-java | ||
- | | ||
sudo ln -s /usr/share/java/bcprov.jar /usr/lib/jvm/java-7-openjdk-amd64/jre/lib/ext/bcprov.jar \ | ||
&& sudo awk -F . -v OFS=. 'BEGIN{n=2}/^security\.provider/ {split($3, posAndEquals, "=");$3=n++"="posAndEquals[2];print;next} 1' /etc/java-7-openjdk/security/java.security > /tmp/java.security \ | ||
&& sudo echo "security.provider.1=org.bouncycastle.jce.provider.BouncyCastleProvider" >> /tmp/java.security \ | ||
&& sudo mv /tmp/java.security /etc/java-7-openjdk/security/java.security | ||
|
||
notifications: | ||
slack: | ||
rooms: | ||
- secure: EK0WQz1q0PGExQmiTokVnRZTzrBEtULoF3Q05SsrYWlwBy+8r+kFuToWDY8914R2ReKEjozCgtuwx3cuEF01ITW8pnNER1ogQuGVAwz8x73fOndPdJxGRJaCAdy4S2uG4JmRqECtihNnNjlbkQZst4lNsVhtnQF32x7M6f4bLkg= | ||
on_success: change | ||
on_failure: always | ||
email: | ||
recipients: | ||
- paddy@ably.io | ||
- cesare@ably.io | ||
on_success: change | ||
on_failure: always | ||
|
||
install: true | ||
branches: | ||
only: | ||
- master | ||
- develop |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
./gradlew connectedAndroidTest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# We unset this, otherwise gradlew picks up settings also from the android "context", like here: https://travis-ci.org/ably/ably-java/jobs/353969106#L1980 | ||
unset ANDROID_HOME | ||
|
||
./gradlew java:testRealtimeSuite | ||
./gradlew java:testRestSuite |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
org.gradle.jvmargs=-Xmx1536M | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needed to avoid
To run dex in process, the Gradle daemon needs a larger heap.
message in Travis.