travis: reorganize build script