• This repository has been archived on 09/Dec/2018
  • Stars
    star
    255
  • Rank 159,729 (Top 4 %)
  • Language
    Shell
  • License
    Apache License 2.0
  • Created almost 9 years ago
  • Updated almost 8 years ago

Reviews

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

Repository Details

SUPERSEDED by https://github.com/japaric/trust

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:

  • It's easy to run the test script locally (on Linux). No need to install cross toolchains or other foreign stuff, simply install cross and, for example, call TARGET=aarch64-unknown-linux-gnu sh ci/script.sh.

  • Painless upgrades. Most upgrades, to get support for new targets or to fix cross compilation problems related to C dependencies, will pretty much only involve bumping the version of the cross tool rather than more invasive changes to .travis.yml or to the scripts in the ci directory.

  • Support for more targets / architectures. trust supports x86, ARM, MIPS, PowerPC and SystemZ.

  • The CI scripts are simpler as the requirements for cross compilation are handled by cross and don't show up in the CI scripts.

-- @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:

  • aarch64-unknown-linux-gnu. (Linux on 64-bit ARM) WARNING Experimental target. Tests are executed using qemu user emulation, but this approach has problems when too many threads are spawned.
  • armv7-unknown-linux-gnueabihf (Linux on 32-bit ARM). WARNING Experimental target. Tests are executed using qemu user emulation, but this approach has problems when too many threads are spawned.
  • i686-apple-darwin (32-bit OSX)
  • i686-pc-windows-gnu (32-bit Windows, MinGW)
  • i686-pc-windows-msvc (32-bit Windows, MSVC)
  • i686-unknown-linux-gnu (32-bit Linux)
  • i686-unknown-linux-musl. (32-bit Linux, statically linked binaries)
  • x86_64-apple-darwin (64-bit OSX)
  • x86_64-pc-windows-gnu (64-bit Windows, MinGW)
  • x86_64-pc-windows-msvc (64-bit Windows, MSVC)
  • x86_64-unknown-linux-gnu (64-bit Linux)
  • x86_64-unknown-linux-musl. (64-bit Linux, statically linked binaries)

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:

  • Test on any combinations of these channels: stable, beta and nightly.
  • Deploy on one of these channels: stable, beta and nightly.
  • The contents of the release tarball/zipfile
  • CI phases like install and script
  • Metadata of the .deb packages.

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

  • The Cargo project must be hosted on GitHub. I know GitLab also has a "releases" feature but I don't know if it can be integrated with Travis CI and/or AppVeyor. AFAICT Bitbucket has no "releases" equivalent. And IDK about other git hosting solutions.

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

nvptx

How to: Run Rust code on your NVIDIA GPU
Rust
348
star
2

copper

DEPRECATED in favor of https://github.com/rust-embedded/book
Rust
291
star
3

ruststrap

[SUPERSEDED] by https://github.com/warricksothr/RustBuild
Shell
96
star
4

rust-on-openwrt

[SUPERSEDED] by https://github.com/japaric/rust-cross
Shell
83
star
5

cu

Testing ground for the Copper book (http://japaric.github.io/copper/).
Rust
58
star
6

photon-quickstart

Cargo template for developing photon applications
Shell
43
star
7

posit

A Rust implementation of the posit number system
Rust
33
star
8

untry

Convert `try!()` into `?`s
Rust
33
star
9

cortex-m-template

Superseded by https://github.com/japaric/cortex-m-quickstart
Rust
31
star
10

linalg.rs

[INACTIVE]
Rust
29
star
11

cuda

Experiments with CUDA and Rust
Rust
29
star
12

m

Deprecated in favor of the libm crate.
Rust
29
star
13

eighty-six

x86 bare metal Rust thing
Rust
28
star
14

embedonomicon

This book has been moved to https://github.com/rust-embedded/embedonomicon
Shell
22
star
15

eulermark.rs

[DEPRECATED] See euler_criterion.rs instead
Rust
21
star
16

serial.rs

[DEPRECATED] Check https://crates.io/crates/serial for a replacement
Rust
19
star
17

stable-embedded-rust

The closest we are to embedded no-std binaries on stable Rust
Rust
18
star
18

photon

Binary blobs for building photon apps
Rust
17
star
19

std-with-cargo

[SUPERSEDED] by https://github.com/japaric/cargo-sysroot
Shell
14
star
20

cargo-sysroot

SUPERSEDED by https://github.com/japaric/xargo
Rust
13
star
21

euler_criterion.rs

Benchmark Project Euler solutions written in several programming languages using Criterion
Rust
10
star
22

stats.rs

Criterion's statistics library. See https://github.com/japaric/criterion.rs
9
star
23

photon-hal

Low level Rust bindings to particle's HAL (Hardware Abstraction Layer)
Rust
9
star
24

simplot.rs

Criterion's plotting library. See https://github.com/japaric/criterion.rs
9
star
25

stm32.rs

[SUPERSEDED] by https://github.com/japaric/cu
Rust
8
star
26

ble400

BLE400 + nRF51822 + S130 + Rust
C
7
star
27

smoke

Smoke testing Rust's cross compilation targets
Shell
6
star
28

nrf51822

A crate to play with the nrf51822 module
Rust
6
star
29

rustic

[UNMAINTAINED] Check https://crates.io/crates/cargo-script as an alternative
Rust
6
star
30

parallel.rs

[DEPRECATED] Safe fork-join parallel abstractions
Rust
6
star
31

homu-on-heroku

How to deploy a Homu instance to Heroku
Python
4
star
32

emrust17

Weekly status reports from my contract work on improving embedded Rust development story
4
star
33

qemu-arm-rt

Minimal runtime for emulation of Cortex-M programs
Rust
4
star
34

compiler-rt.rs

[DEPRECATED] Check the spiritual sucessor of this project: https://github.com/japaric/rustc-builtins
Rust
4
star
35

futuro

Rust
3
star
36

lm3s6965evb

An example of running a `cortex-m-rt` program on a QEMUlated Cortex-M core
Rust
3
star
37

rusty-edge

Rust nightly channel + bleeding edge features
Rust
3
star
38

complex.rs

UNMAINTAINED
Rust
2
star
39

bb.rs

[DEPRECATED] Check https://crates.io/crates/sysfs_gpio for similar functionality
Rust
2
star
40

stm32f30x-memory-map

Memory map for STM32F30X microcontrollers
Rust
2
star
41

nvptx-builtins

Rust
2
star
42

rbr2016

Rust
2
star
43

vl

Board Support Crate for the STM32VLDISCOVERY
Rust
2
star
44

core64

rust-lang/rust's core crate without 128-bit support
Rust
2
star
45

particle-tools

Tools to aid with development of Particle applications
Rust
2
star
46

termios.rs

[DEPRECATED] Check https://crates.io/crates/termios for a replacement
Rust
2
star
47

rustfmt-bin

Nightly binary releases of rustfmt
Shell
2
star
48

stm32f100-memory-map

Rust
1
star
49

blas.rs

[UNMAINTAINED]
Rust
1
star
50

nrf51

Peripheral access API for nRF51 microcontrollers (generated using svd2rust)
Rust
1
star
51

rc.rs

[UNMAINTAINED]
Rust
1
star
52

seq.rs

[DEPRECATED] Macro sugar to initialize almost any collection
Rust
1
star
53

testd

Rust
1
star
54

sc-gen

System call number generator
Rust
1
star
55

spscrb

DEPRECATED in favor of the heapless crate
Rust
1
star
56

space.rs

[DEPRECATED] in favor of https://crates.io/crates/itertools
Rust
1
star
57

cargo-for-arm

Docker container that builds cargo for ARM on an x86_64 host using QEMU user emulation
Shell
1
star
58

exheres

Personal exheres repository
Makefile
1
star
59

core.rs

[SUPERSEDED] by https://github.com/japaric/cargo-sysroot
Rust
1
star
60

npm2exheres

UNMAINTAINED
Python
1
star
61

volatile.rs

[SUPERSEDED] by https://github.com/japaric/cu
Rust
1
star