Skip to content

Commit 071b319

Browse files
authored
Merge pull request #1 from rust-embedded/ci
add CI
2 parents a99f47b + 57f45fe commit 071b319

File tree

4 files changed

+75
-0
lines changed

4 files changed

+75
-0
lines changed

.travis.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
language: rust
2+
3+
matrix:
4+
include:
5+
- env: TARGET=x86_64-unknown-linux-gnu
6+
if: (branch = staging OR branch = trying) OR (type = pull_request AND branch = master)
7+
rust: 1.31.0
8+
9+
- env: TARGET=armebv7r-none-eabi
10+
if: (branch = staging OR branch = trying) OR (type = pull_request AND branch = master)
11+
rust: 1.31.0
12+
13+
- env: TARGET=armebv7r-none-eabihf
14+
if: (branch = staging OR branch = trying) OR (type = pull_request AND branch = master)
15+
rust: 1.31.0
16+
17+
- env: TARGET=armv7r-none-eabi
18+
if: (branch = staging OR branch = trying) OR (type = pull_request AND branch = master)
19+
rust: 1.31.0
20+
21+
- env: TARGET=armv7r-none-eabihf
22+
if: (branch = staging OR branch = trying) OR (type = pull_request AND branch = master)
23+
rust: 1.31.0
24+
25+
before_install: set -e
26+
27+
install:
28+
- bash ci/install.sh
29+
- export PATH="$PATH:$PWD/gcc/bin"
30+
31+
script:
32+
- bash ci/script.sh
33+
34+
after_script: set +e
35+
36+
cache: cargo
37+
38+
before_cache:
39+
- chmod -R a+r $HOME/.cargo;
40+
41+
branches:
42+
only:
43+
- master
44+
- staging
45+
- trying
46+
47+
notifications:
48+
email:
49+
on_success: never

ci/install.sh

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
set -euxo pipefail
2+
3+
main() {
4+
case $TARGET in
5+
arm*v7r-none-eabi*)
6+
rustup target add $TARGET
7+
;;
8+
*)
9+
mkdir gcc
10+
curl -L https://developer.arm.com/-/media/Files/downloads/gnu-rm/7-2018q2/gcc-arm-none-eabi-7-2018-q2-update-linux.tar.bz2?revision=bc2c96c0-14b5-4bb4-9f18-bceb4050fee7?product=GNU%20Arm%20Embedded%20Toolchain,64-bit,,Linux,7-2018-q2-update | tar --strip-components=1 -C gcc -xj
11+
;;
12+
esac
13+
}
14+
15+
main

ci/script.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
set -euxo pipefail
2+
3+
main() {
4+
cargo check
5+
}
6+
7+
main

src/lib.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
//! Low level access to Cortex-R processors
2+
//!
3+
//! # Supported Rust version
4+
//!
5+
//! Rust >=1.31.0
26
37
#![deny(missing_docs)]
48
#![deny(warnings)]

0 commit comments

Comments
 (0)