95th  
                
               
                 
              
                  
                    August 2, 2019,  8:06am
                   
                   
              1 
               
             
            
              I want to use latest Rust Nightly to build my project.
Here is the config file: 
But, it seems to be using one month old nightly: 
rustc 1.37.0-nightly (5f9c0448d 2019-06-25)
https://travis-ci.org/hyperium/h2/builds/566657987?utm_source=github_status&utm_medium=notification 
How do I make it use the latest one?
             
            
               
               
               
            
            
           
          
            
              
                95th  
                
               
              
                  
                    August 2, 2019,  8:22am
                   
                   
              2 
               
             
            
              Also, I tried running the build from my fork and surprisingly it uses latest nightly there with same yml config.
https://travis-ci.org/95th/h2/builds/566841946 
So, why doesn’t it use latest in the PR build?
https://travis-ci.org/hyperium/h2/builds/566657987?utm_source=github_status&utm_medium=notification 
             
            
               
               
               
            
            
           
          
            
            
              This is either a variation or the resurfacing of https://github.com/travis-ci/travis-ci/issues/8124 , which was presumably fixed by https://github.com/travis-ci/travis-build/pull/1161 .
There is a short blurb  during the installation which might offer a solution:
To configure your current shell run source $HOME/.cargo/env
 
Could you add this line in your before_script to see if this is effective?
before_script:
  - source $TRAVIS_HOME/.cargo/env
  - rustc --version
  ⋮ # rest
 
             
            
               
               
               
            
            
           
          
            
              
                95th  
                
               
                 
              
                  
                    August 3, 2019,  4:54pm
                   
                   
              4 
               
             
            
              Sorry, that didn’t work. 
https://travis-ci.org/hyperium/h2/builds/567338420?utm_source=github_status&utm_medium=notification  
It is still using old version.
Surprisingly, earlier today I changed my PR from Draft to “ready for review” and it then used correct nightly version. But now it has reverted back to old one.
             
            
               
               
               
            
            
           
          
            
            
              I see the problem more clearly now. I think this is a problem with the Rust installer no longer updating nightlies.
In https://travis-ci.org/hyperium/h2/jobs/546966455#L446  and https://travis-ci.org/hyperium/h2/jobs/551001348#L450 , you see that the installer recognizes the existing nightly installation, but still updates it.
However, the next one https://travis-ci.org/hyperium/h2/jobs/551930277#L448  no longer does.
This seems to be a problem with rustup.rs .
I’ve reported the problem at 
             
            
               
               
               
            
                
            
           
          
            
              
                95th  
                
               
              
                  
                    August 5, 2019,  2:24pm
                   
                   
              6 
               
             
            
              Hi @BanzaiMan . The change suggested by @kinnison  on the github issue - will you need to do that in travis or I have to do in my scripts ?
             
            
               
               
               
            
            
           
          
            
            
              Once the behavior change (and that the previous behavior was wrong) is confirmed, I’ll put the change in. If you want to add it in the meantime, you are welcome to do so.
             
            
               
               
               
            
            
           
          
            
              
                95th  
                
               
              
                  
                    August 5, 2019,  2:57pm
                   
                   
              8 
               
             
            
              I have workaround for the meantime to run the build against my fork. (where it works - dont know why).
             
            
               
               
               
            
            
           
          
            
              
                95th  
                
               
              
                  
                    August 11, 2019, 10:08am
                   
                   
              10 
               
             
            
              The build now uses correct version. Many thanks @BanzaiMan  for quick response and solution.