Skip to content

joecorcoran/travis-docker-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Building a multi-platform release with Travis & Docker

This repo demonstrates how to test a Rust binary on multiple targeted platforms, and if the tests pass, release it to GitHub Releases.

All of the important details are in .travis-yml.

It relies on cross for Docker-based cross-platform compilation.

Before build stages

It has been possible to deploy from mutiple jobs to the same GitHub release for some time. This video shows a build being broken on one of two targeted Linux architectures. Later the build is fixed, and the eventual release contains binaries for both targets.

Although it's nifty, the problem with this approach is that the jobs have no awareness of each other's status – if one job fails, a passing job will still go ahead and deploy its part of the multi-platform release.

After build stages

By changing .travis.yml to use build stages we can specify a stage with two jobs to run the tests, followed by a deployment stage that also has two jobs, but which depends on the success of the previous stage. This video shows the jobs running in separate stages.

About

Building for multiple platforms with Docker and Travis

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages