• Stars
    star
    1,214
  • Rank 38,236 (Top 0.8 %)
  • Language
    Shell
  • License
    Apache License 2.0
  • Created almost 8 years ago
  • Updated almost 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

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

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

  • CI test your crate (library or binary) on Linux, macOS and Windows and on more than just the x86 architecture.

  • Cargo artifacts are cached and reused between CI builds.

  • "Deploys": Publish binary releases of your application by just pushing a new (Git) tag.

Requirements

  • Your crate must be hosted on GitHub (free).

  • A Travis CI account (free).

  • An AppVeyor account (free).

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:

  • The GitHub token used for deploys.

  • The list of test targets. Trim it down to reduce test times.

  • The Rust channel used for testing / deploys.

  • The "test phase". Tweak how your crate is tested.

  • the "package phase". Tweak what goes into the release tarball / zipfile.

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

  • aarch64-linux-android

  • arm-linux-androideabi

  • armv7-linux-androideabi

  • i686-linux-android

  • x86_64-linux-android

iOS

  • aarch64-apple-ios

  • armv7-apple-ios

  • armv7s-apple-ios

  • i386-apple-ios

  • x86_64-apple-ios

Linux

  • i686-unknown-linux-gnu

  • i686-unknown-linux-musl

  • x86_64-unknown-linux-gnu

  • x86_64-unknown-linux-musl

  • aarch64-unknown-linux-gnu

  • arm-unknown-linux-gnueabi

  • armv7-unknown-linux-gnueabihf

  • mips-unknown-linux-gnu

  • mips64-unknown-linux-gnuabi64

  • mips64el-unknown-linux-gnuabi64

  • mipsel-unknown-linux-gnu

  • powerpc-unknown-linux-gnu

  • powerpc64-unknown-linux-gnu

  • powerpc64le-unknown-linux-gnu

  • s390x-unknown-linux-gnu

macOS

  • i686-apple-darwin

  • x86_64-apple-darwin

*BSD

  • i686-unknown-freebsd

  • x86_64-unknown-freebsd

  • x86_64-unknown-netbsd

Windows (MinGW)

  • i686-pc-windows-gnu

  • x86_64-pc-windows-gnu

Windows (MSVC)

  • i686-pc-windows-msvc

  • x86_64-pc-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.

More Repositories

1

rust-cross

Everything you need to know about cross compiling Rust programs!
Shell
2,409
star
2

xargo

The sysroot manager that lets you build and customize `std`
Rust
1,080
star
3

cargo-call-stack

Whole program static stack analysis
Rust
532
star
4

steed

[INACTIVE] Rust's standard library, free of C dependencies, for Linux systems
Rust
516
star
5

rust-san

How-to: Sanitize your Rust code!
Rust
383
star
6

ufmt

a smaller, faster and panic-free alternative to core::fmt
Rust
324
star
7

panic-never

This crate guarantees that your application is free of panicking branches
Rust
171
star
8

utest

Unit `#[test]`ing for microcontrollers and other `no_std` systems
Rust
128
star
9

stm32f103xx-hal

HAL for the STM32F103xx family of microcontrollers
Rust
115
star
10

f3

Board Support Crate for the STM32F3DISCOVERY
Rust
95
star
11

cast.rs

Machine scalar casting that meets your expectations
Rust
72
star
12

embedded-in-rust

A blog about Rust and embedded stuff
Shell
52
star
13

stack-sizes

Tool to print stack usage information emitted by LLVM in human readable format
Rust
48
star
14

itm-tools

Tools for analyzing ITM traces
Rust
47
star
15

stlog

Lightweight logging framework for resource constrained devices
Rust
42
star
16

madgwick

Madgwick's orientation filter
Rust
40
star
17

cty

Type aliases to C types like c_int for use with bindgen
Rust
39
star
18

no-std-async-experiments-2

Cooperative multitasking (AKA async/await) on ARM Cortex-M
Rust
37
star
19

embedded2020

A fresh look at embedded Rust development
Rust
36
star
20

stm32f30x-hal

Implementation of the `embedded-hal` traits for STM32F30x microcontrollers
Rust
34
star
21

ultrascale-plus

Rust on the Zynq UltraScale+ MPSoC
Rust
32
star
22

stm32f103xx

DEPRECATED
Rust
31
star
23

fpa

Fixed Point Arithmetic
Rust
29
star
24

mfrc522

A platform agnostic driver to interface the MFRC522 (RFID reader/writer)
Rust
28
star
25

linux-rtfm

[Experiment] Real Time for The Masses on Linux
Rust
27
star
26

jnet

[Experiment] JNeT: japaric's network thingies
Rust
27
star
27

ws2812b

WS2812B LED ring controlled via a serial interface
Rust
24
star
28

enc28j60

A platform agnostic driver to interface with the ENC28J60 (Ethernet controller)
Rust
24
star
29

stm32f30x

Peripheral access API for STM32F30X microcontrollers (generated using svd2rust)
Rust
24
star
30

no-std-async-experiments

Experiments in `no_std` cooperative multitasking
Rust
22
star
31

vcell

Just like `Cell` but with volatile read / write operations
Rust
18
star
32

zen

A self-balancing robot coded in Rust
Rust
17
star
33

usb2

USB 2.0 data types
Rust
13
star
34

lifo

A heap-less, interrupt-safe, lock-free memory pool for Cortex-M devices
Rust
11
star
35

lsm303dlhc

A platform agnostic driver to interface with the LSM303DLHC (accelerometer + compass)
Rust
11
star
36

cortex-m-rt-ld

Zero cost stack overflow protection for ARM Cortex-M devices
Rust
11
star
37

msp430-quickstart

WIP
RPC
11
star
38

cortex-m-funnel

[Experiment] A lock-free, wait-free, block-free logger for the ARM Cortex-M architecture
Rust
11
star
39

msp430-rtfm

Real Time For the Masses (RTFM), a framework for building concurrent applications, for MSP430 MCUs
Rust
10
star
40

flip-lld

Flips the memory layout of a program to add zero cost stack overflow protection
Rust
10
star
41

2wd

A remotely controlled wheeled robot
Rust
10
star
42

motor-driver

Crate to interface full H-bridge motor drivers
Rust
8
star
43

rustc-cfg

Runs `rustc --print cfg` and parses the output
Rust
8
star
44

lm3s6965

A minimal device crate for the LM3S6965
Rust
8
star
45

lpcxpresso55S69

[Prototype] Real Time for The Masses on the homogeneous dual core LPC55S69 (2x M33)
Rust
8
star
46

hifive1

[Prototype] Real Time For the Masses on the HiFive1
Rust
8
star
47

alloc-many

[Proof of Concept] Allocator singletons and parameterized collections on stable
Rust
7
star
48

mpu9250

DEPRECATED
Rust
7
star
49

panic-abort

Set panic behavior to abort
Rust
7
star
50

as-slice

Rust
6
star
51

lpcxpresso54114

[Prototype] Real Time for The Masses on the heterogeneous dual core LPC54114J256BD64 (M4F + M0+)
Rust
6
star
52

docker

Build scripts for Docker images I maintain at
Shell
5
star
53

cargo-project

Library to retrieve information about a Cargo project
Rust
4
star
54

alloc-singleton

Memory allocators backed by singletons that own statically allocated memory
Rust
4
star
55

ctenv

Rust
4
star
56

stcat

Tool to decode strings logged via the `stlog` framework
Rust
3
star
57

.dotfiles

Emacs Lisp
2
star
58

hellopp

Minimal example of using C++ from Rust
Rust
2
star
59

mat

Statically sized matrices for `no_std` applications
Rust
2
star
60

rustfest-2017-09-30

Fearless concurrency in your microcontroller
JavaScript
1
star
61

musl-bin

Pre-compiled MUSL for use in Travis CI (Ubuntu 14.04)
Shell
1
star
62

stm32f100xx

Peripheral access API for STM32F100XX microcontrollers (generated using svd2rust)
Rust
1
star
63

fosdem-2018-02-04

Slides for FOSDEM presentation
CSS
1
star
64

rtfm5

Documentation for the upcoming version v0.5.0 of RTFM
HTML
1
star
65

rm42

Rust on the Hercules RM42 LaunchPad
Rust
1
star
66

owning-slice

[Experiment] slicing by value
Rust
1
star
67

all-hands-2018-embedded

Slides about the embedded WG for the Rust All Hands 2018 event
CSS
1
star
68

qemu-bin

Some static QEMU binaries
Shell
1
star
69

static-ref

References that point into `static` data
Rust
1
star
70

cortex-m-rtfm

You actually want to head to
1
star