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.
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.
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.