Right way to setup Travis so it passes when regressions are fixed

I maintain a repository that targets the stable compiler. When I setup a Travis build, I followed the online documentation that says:

The Rust team appreciates testing against the beta and nightly channels, even if you are only targeting stable.

So being a good rust citizen, I setup my build to help catch regressions. Lo and behold, a few weeks after doing that, I caught a regression and reported it to the bug tracker.

The bug was quickly fixed and now my code runs on nightly, but still not beta since the change has not made it that far yet.

My question is, is there some way to setup Travis so that if either beta or nightly passes, the entire build passes? Right now it fails if beta fails.

It's nice to catch regressions and everything, but it would be even better to not have to wait for a change to make beta before my working build shows green again.

2 Likes

You can set certain configurations as allowed to fail: https://github.com/sfackler/rust-security-framework/blob/master/.travis.yml#L38

As recommended in the Travis guide, my build allows failures on nightly but not on beta. This way I catch regressions on beta and do not need to worry about whether nightly (which is generally unstable) passes or not.

The problem is that once regressions are fixed, they don't make it beta right away. So right now nightly passes and beta doesn't. That fails my build. It would be nice if my build could somehow pass now that the regression is fixed.

If it wasn't clear from my original post, I'm using the exact configuration from the Travis guide:

language: rust
rust:
  - stable
  - beta
  - nightly
matrix:
  allow_failures:
    - rust: nightly