Home

Awesome

trust

Travis CI and AppVeyor template to test your Rust crate on 5 architectures and publish binary releases of it for Linux, macOS and Windows

Features

Requirements

How-to

Use this template

Copy the ci directory, and the .travis.yml and appveyor.yml files into the repository where you host your Rust crate.

You'll have to adjust those files to meet your needs. Just look inside those files for comments that start with the word TODO; they'll tell you want needs to be changed.

This is an overview of what must / can be changed:

Generate binary releases

You only need to push an annotated tag to kick off the build process.

# Optional: Publish a new version of your crate to crates.io
$ cargo publish

$ git tag -a $TAG

$ git push origin $TAG

Use the binary releases on Travis CI

There's an install.sh script that you can use to quickly install a binary release produced using this CI template.

$ curl -LSfs https://japaric.github.io/trust/install.sh | \
    sh -s -- --git japaric/cross

For more details about this installation script see install.sh -h

How to disable deploys?

If you don't want to generate binary releases at all, perhaps because your Cargo project is a library or you only want to test your project, then you can simply change deploy.on.condition, in .travis.yml, and deploy.on, in appveyor.yml, to always be false. For example:

# .travis.yml
deploy:
  on:
    condition: $DEPLOY = never

How to upgrade your CI configuration?

First, figure out which version of the trust template you are using. The version is written in the header of the .travis.yml and appveyor.yml files. If there's no header, that means you are using version v0.1.0.

Next, look at the change log to check if there's a new release and to learn, at a high level, how the template has changed: what has been fixed, what has been added, etc.

If it makes sense for you to upgrade, you can see the required "code" changes by looking at the "diff" between the version you are using and the version you are going to upgrade to. For example:

https://github.com/japaric/trust/compare/v0.1.0...v0.1.1

As for the upgrade itself, GitHub can generate a patch from the above diff that then you can apply to your repository with git am or similar:

https://github.com/japaric/trust/compare/v0.1.0...v0.1.1.patch

Supported targets

Linux

Courtesy of cross.

If you run into any problem with any of these targets, report them to cross's issue tracker but first check if using a newer release (see ci/install.sh) would fix your problem.

Android

iOS

Linux

macOS

*BSD

Windows (MinGW)

Windows (MSVC)

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.