Home

Awesome

Status

This project has been SUPERSEDED by trust, another CI template, and won't received updates or bug fixes.

Why

trust makes things simpler and better because it's based on the cross tool. Among the advantages we have:

-- @japaric, 2017-01-03


Travis Appveyor

rust-everywhere

Use CI services to generate binary releases of your Rust program for Linux, Mac and Windows

This repository has configured Travis CI and AppVeyor to generate binary releases, in both tarball/zipfile and deb (*) format, of a Cargo project (in this example, a variation of hello world) for all the tier 1 platforms and some lower tier platforms whenever a new git tag is pushed.

(*) .deb support is minimal right now: you can only package binaries and not, for example, store information about dependencies. If you need more features in this area open an issue to let me know!

Supported targets

The current CI configuration builds, tests and generates binary releases for the following targets:

How to use

You can use this CI configuration, as a starting point, in your project by copying the .travis.yml and appveyor.yml files and the ci directory in your project repository. And then customizing the configuration for your needs by implementing all the TODOs contained in those files.

All these aspects can be configured:

Once configured, simply push a new git tag to build a new binary release:

$ git tag v1.2.3
$ git push --tags

You should see the release tarballs/zipfiles under your project's 'releases' page.

How do I install/uninstall these binary releases?

Examples:

Tarball/zipfiles

# Install
$ curl -OL https://github.com/japaric/rust-everywhere/releases/download/v0.1.41/rust-everywhere-v0.1.41-x86_64-unknown-linux-gnu.tar.gz
$ tar xzf rust-everywhere-v0.1.41-x86_64-unknown-linux-gnu.tar.gz
$ sudo cp hello /usr/local/bin/

# Test the program
$ hello
0.1.41: x86_64-unknown-linux-gnu says hello!
Compiled with rust-1.8.0 (Stable channel)

# Uninstall
$ sudo rm /usr/local/bin/hello

.deb packages

# Install
$ curl -OL https://github.com/japaric/rust-everywhere/releases/download/v0.1.41/rust-everywhere-v0.1.41-x86_64-unknown-linux-gnu.deb
$ dpkg -i rust-everywhere-v0.1.41-x86_64-unknown-linux-gnu.deb
Selecting previously unselected package rust-everywhere.
(Reading database ... 12398 files and directories currently installed.)
Preparing to unpack rust-everywhere-v0.1.41-x86_64-unknown-linux-gnu.deb ...
Unpacking rust-everywhere (0.1.41) ...
Setting up rust-everywhere (0.1.41) ...

# Test the program
$ hello
0.1.41: x86_64-unknown-linux-gnu says hello!
Compiled with rust-1.8.0 (Stable channel)

# Uninstall
# dpkg -r rust-everywhere
(Reading database ... 12399 files and directories currently installed.)
Removing rust-everywhere (0.1.41) ...

Using a binary release with Travis CI

If you want to use a binary release generated by rust-everywhere (to save time by not having to call cargo install) on a Travis build job, you can use the install.sh script contained in this repository and use it like this in your Travis configuration:

install:
  - curl -sf "https://raw.githubusercontent.com/japaric/rust-everywhere/master/install.sh" | bash -s -- --from azerupi/mdBook --tag 0.0.11-rc1

Check the script for more information about its usage. The script is not very good at handling errors so use it with care ;-).

Known issues

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.