Try to generalize travis file to make it more robust.