Khadka / android-daisy-epub-reader

Automatically exported from code.google.com/p/android-daisy-epub-reader
0 stars 0 forks source link

NewStory: evaluate Travis.ci to build our new app #76

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
We want to have Continuous Integration (CI) for our new codebase, currently 
hosted on github.com CI should reduce the risk of committing incomplete or 
broken code. 

Travis-ci may be suitable and appropriate. See https://travis-ci.org for an 
overview. 

Our build consists of 2 related projects, daisy-engine and DaisyBookLister. 
Both are built using ant currently. 

Original issue reported on code.google.com by julianharty on 19 Jul 2013 at 9:57

GoogleCodeExporter commented 9 years ago
Here are some of the resources I found helpful:
https://github.com/nasamuffin/FridgeMagnet - an example of a .travis.yml file 
and a buildstuff shell file. Note: this script isn't supported natively in 
Microsoft Windows. Something like cygwin should enable this script to run on 
Windows computers.

Our files are:
https://github.com/julianharty/new-android-daisy-reader/blob/master/buildstuff.s
h and 
https://github.com/julianharty/new-android-daisy-reader/blob/master/.travis.yml

These run and pass on travis-ci.org however they don't yet build the main app 
or run any tests. To do these steps we need to extend the build file. Which is 
the next thing we'll do... 

Original comment by julianharty on 21 Jul 2013 at 8:35

GoogleCodeExporter commented 9 years ago
I hope the build results will be visible at 
https://travis-ci.org/julianharty/new-android-daisy-reader/builds

Original comment by julianharty on 21 Jul 2013 at 8:37

GoogleCodeExporter commented 9 years ago
OK, we're making good progress. Still need to resolve various issues including:
   * Downloading the correct versions of the Android runtime so we can build the app
   * Finding a way to run up an emulator. As travis-ci includes an example using the newer Gradle build system perhaps it's time to give it a try too :)
   * creating the /sdcard folder so the tests for daisy-library can run without complaint. Ideally the creation (using passwordless sudo on tragic-ci will only run via the .travis.yml file. I may need to find a way to call a pair of bash scripts from this file...

Useful links:
http://wvmvm.blogspot.co.uk/2012/05/automatic-android-app-builds-with.html

http://blog.crowdint.com/2013/05/24/android-builds-on-travis-ci-with-gradle.html

Original comment by julianharty on 23 Jul 2013 at 7:44

GoogleCodeExporter commented 9 years ago
The documentation for running the android sdk command-line commands are sparse 
and most are out of date. Here's an example of the 'old' way to call the 
command where all the platforms, etc. could be installed at the outset. 
http://tools.android.com/recent/updatingsdkfromcommand-line 

Today we have to install platforms after installing the initial tools. 

Original comment by julianharty on 23 Jul 2013 at 8:48

GoogleCodeExporter commented 9 years ago
More clues available in 
https://travis-ci.org/stephanenicolas/Quality-Tools-for-Android/builds/6144666 
which copes with r22 of the Android SDK (that needs Y echoed to accept a 
license agreement). It also creates an emulator, and obtains the output of 
logcat AFAIK, etc. All-in-all a very useful guide.

Original comment by julianharty on 24 Jul 2013 at 9:10

GoogleCodeExporter commented 9 years ago
Here's another link, albeit the parameters to install platforms in the Android 
SDK are obsolete 
http://wvmvm.blogspot.co.uk/2012/05/automatic-android-app-builds-with.html

Currently I'm trying to find out why the build for actionbarsherlock fails - 
either the tools or the package seems to be missing.  

Original comment by julianharty on 30 Jul 2013 at 5:54

GoogleCodeExporter commented 9 years ago
Attached is what we did to import actionbarsherlock into the eclipse project.

Original comment by tranquangminhtan@gmail.com on 31 Jul 2013 at 6:42

Attachments:

GoogleCodeExporter commented 9 years ago
http://developer.android.com/sdk/index.html#ExistingIDE has a link to the 
current version of the relevant SDK.  We need to keep track of the latest 
version of the SDK and then which named components to install.

Original comment by julianharty on 31 Jul 2013 at 7:41

GoogleCodeExporter commented 9 years ago
We managed to get the app to build successfully on travis-ci on Wed 14th August 
2013. See 
https://travis-ci.org/julianharty/new-android-daisy-reader/builds/10183996 

We will continue to monitor the build at
https://travis-ci.org/julianharty/new-android-daisy-reader  

This story has spawned additional work, for instance to find ways to run the 
junit tests for daisy-engine cleanly.

Original comment by julianharty on 16 Aug 2013 at 11:11