Questions tagged [travis-ci]

For questions about the hosted continuous integration service.

Travis CI is a hosted continuous integration service for the open source community. It is integrated with GitHub and offers first class support for:

  • Android
  • C
  • C#
  • C++
  • Clojure
  • Crystal
  • D
  • Dart
  • Elixir
  • Elm
  • Erlang
  • F#
  • Generic
  • Go
  • Groovy
  • Haskell
  • Haxe
  • Java
  • JavaScript (with Node.js)
  • Julia
  • Minimal
  • Nix
  • Objective-C
  • Perl
  • Perl6
  • PHP
  • Python
  • R
  • Ruby
  • Rust
  • Scala
  • Smalltalk
  • Swift
  • Visual Basic

See the documentation for further information.

For support, please file any requests with the travis-ci GitHub issue tracker.

4084 questions
28
votes
6 answers

Cache Brew builds with travis ci

I have a Travis CI osx build with a brew dependency that has to be built from source. I know that Travis has the cache feature, but it doesn't have any documentation on how to cache brew builds or outputs. Any idea on how to cache a brew package in…
StephenG
  • 2,851
  • 1
  • 16
  • 36
27
votes
2 answers

How can I resolve "Your bundle only supports platforms ["x86-mingw32"] but your local platforms are ["ruby", "x86_64-linux"]"

I'm building a rails site on a Windows machine but when I check in my Gemfile.lock I get the following error on my Travis builds: Your bundle only supports platforms ["x86-mingw32"] but your local platforms are ["ruby", "x86_64-linux"], and there's…
Godwin
  • 9,739
  • 6
  • 40
  • 58
27
votes
2 answers

TravisCI: How to allow failures for environment variable

How to allow failures for builds having specific environment variable value? For example: .travis.yml: env: - TEST_GROUP=Smoke - TEST_GROUP=other # How to allow failures for this variable? matrix: allow_failures: - TEST_GROUP=other # This…
Stancell
  • 366
  • 4
  • 8
27
votes
2 answers

How to tell Travis to skip pulling all git submodules in?

In my project I have a few git submodules, however those aren't actual build dependencies and do take some extra time to get pulled in, literarily doubling or tripling the build time. Is there any way of telling Travis to skip this useless step?
errordeveloper
  • 6,716
  • 6
  • 41
  • 54
26
votes
3 answers

Travis: different `script` for different branch?

I'd like to setup deployment based on branches using Travis-CI and Github. I.e. - if we made build from develop - then exec /deploy.rb with DEV env hostname, if master - then ./deploy.rb with PROD hostname and so on. Only one idea I found - is to…
setevoy
  • 4,374
  • 11
  • 50
  • 87
26
votes
4 answers

Commiting google-services.json to GitHub

I am creating a public android project and I am using Google Sign-In service. I am doing it according to this tutorial. As it says, I have got the google-services.json file. Do I need to commit the above file to Github? Do other developers (If…
Jayanga Kaushalya
  • 2,674
  • 5
  • 38
  • 58
26
votes
2 answers

Travis and matrix combinations

I want to test different builds of my .js framework against many browsers I expected to write something like: language: node_js node_js: - 0.11 env: matrix: - BUILD='nocompat' - BUILD='compat' - BUILD='default' - BROWSER='ie6' …
Sergio
  • 28,539
  • 11
  • 85
  • 132
25
votes
4 answers

Running script conditionally does not work in travis.yml, why?

The following causes travis to not build at all. When I try to validate the travis.yml file, it complains that the line just above the if statement is missing a - character at column 3, but the error has to do with the if statement below. Do I have…
user1283776
  • 19,640
  • 49
  • 136
  • 276
25
votes
2 answers

Travis CI : How to allow failures with a customized environment variable?

Following this answer, I wrote this Travis configuration file : language: php php: - 5.3 - 5.4 - 5.5 - 5.6 - 7 - hhvm - nightly branches: only: - master - /^\d+\.\d+\.\d+$/ matrix: fast_finish:…
Ivan Gabriele
  • 6,433
  • 5
  • 39
  • 60
24
votes
2 answers

How to avoid "The job exceeded the maximum time limit for jobs, and has been terminated." when accessing mvnsearch.org on Travis CI?

Since approx. 72h I'm getting The job exceeded the maximum time limit for jobs, and has been terminated. on TravisCI which seems to be related requesting artifacts from mvnsearch.org, e.g.…
Kalle Richter
  • 8,008
  • 26
  • 77
  • 177
24
votes
3 answers

How to run aws configure in a travis deploy script?

I am trying to get travis-ci to run a custom deploy script that uses awscli to push a deployment up to my staging server. In my .travis.yml file I have this: before_deploy: - 'curl "https://s3.amazonaws.com/aws-cli/awscli-bundle.zip" -o…
24
votes
10 answers

Read versionName from build.gradle in bash

Is there a way to read the value versionName from the build.gradle file of an Android project to use it in bash? More precisely: How can I read this value from the file and use it in a Travis-CI script? I'll use it like # ANDROID_VERSION=??? export…
SUhrmann
  • 632
  • 1
  • 8
  • 26
24
votes
3 answers

How I can decrypt secure env variables in Travis CI?

I have .travis.yml with some secure (encrypted) env variables. Now I need to descrypt those variables to use them in different project. Is there easy way of doing this (except triggering a commit and printing them in console output)?
user606521
  • 14,486
  • 30
  • 113
  • 204
24
votes
2 answers

TravisCI: Run after_success on a specific branch

I would like to know how to run an after_success script only for a specific branch. I am using a custom script to deploy the app after build passes. I would only like to run this when on prod branch. So far, I have tried the…
mc9
  • 6,121
  • 13
  • 49
  • 87
24
votes
2 answers

How to start Travis CI deploy only when tag name matches a regex

I want to kick off an npm deployment when a tag, that looks like a semantic version, is pushed, e.g. v1.2.3. I see that the tag name is in the TRAVIS_TAG environment variable and that I can specify an on: condition, which "can be any Bash…
Stefan Dragnev
  • 14,143
  • 6
  • 48
  • 52