Travis CI provides Building and Android project article which describes the basics.
All what's needed to build the project on Travis CI is .travis.yml file.
Syntax of .travis.yml
is very self-explanatory.
Travis CI understands when the change is pushed to github and starts the build automatically.
In order to build the project we need to have environment variables set in project settings: