Implement building only required dependencies, use it for Travis