Skip to content

Example of how to configure a Rust crate for matrix builds on travis

Notifications You must be signed in to change notification settings

carllerche/travis-rust-matrix

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

32-bit CI for Rust on Travis & Appveyor

This repo is an example of how to setup a Rust project to run a matrix CI build on Travis and Appveyor.

Build Status Windows Build Status

Rationale

It's a good idea to run tests on all supported platforms. While Rust supports 32 bit platforms, Travis currently does not. However, it is possible to cross compile 32 bit builds. This project shows how to do it.

If you want to support Windows, Appveyor provides a Windows CI system. I also included how to setup a matrix build on Appveyor.

Usage

Add the following to your .travis.yml file:

env:
  - ARCH=x86_64
  - ARCH=i686

script:
  - curl -sSL https://raw.githubusercontent.com/carllerche/travis-rust-matrix/master/test | bash

Examples

This project features a simple .travis.yml file configured to run 32-bit builds.

The nix crate also uses this strategy.

Appveyor

Add the following to appveyor.yml

install:
  - ps: Start-FileDownload "https://git.io/vq9LX"; . .\install.ps1

environment:
  matrix:
    - RUST_VERSION: 1.1.0
    - RUST_VERSION: beta
    - RUST_VERSION: nightly

See the included appveyor.yml for a fully working example.

License (MIT)

Copyright (c) 2015 Carl Lerche

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

About

Example of how to configure a Rust crate for matrix builds on travis

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published