Skip to content

Commit 30ac4e9

Browse files
committed
add ci
1 parent a0731d8 commit 30ac4e9

File tree

5 files changed

+58
-1
lines changed

5 files changed

+58
-1
lines changed

.travis.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
language: rust
2+
3+
matrix:
4+
include:
5+
- env: TARGET=x86_64-unknown-linux-gnu
6+
rust: nightly
7+
8+
- env: TARGET=thumbv6m-none-eabi
9+
rust: nightly
10+
11+
- env: TARGET=thumbv7m-none-eabi
12+
rust: nightly
13+
14+
before_install: set -e
15+
16+
install:
17+
- bash ci/install.sh
18+
19+
script:
20+
- bash ci/script.sh
21+
22+
after_script: set +e
23+
24+
cache: cargo
25+
26+
before_cache:
27+
# Travis can't cache files that are not readable by "others"
28+
- chmod -R a+r $HOME/.cargo
29+
30+
branches:
31+
only:
32+
- staging
33+
- trying
34+
35+
notifications:
36+
email:
37+
on_success: never

bors.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
status = [
2+
"continuous-integration/travis-ci/push",
3+
]

ci/install.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
set -euxo pipefail
2+
3+
main() {
4+
if [ $TARGET != x86_64-unknown-linux-gnu ]; then
5+
rustup target add $TARGET
6+
fi
7+
}
8+
9+
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 --target $TARGET
5+
}
6+
7+
main

src/lib.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,10 @@
4343
//! _heap_end = ORIGIN(SRAM) + LENGTH(SRAM) - _stack_size;
4444
//! ```
4545
46+
#![feature(alloc)]
47+
#![feature(allocator_api)]
4648
#![feature(const_fn)]
4749
#![no_std]
48-
#![feature(alloc, allocator_api)]
4950

5051
extern crate alloc;
5152
extern crate cortex_m;

0 commit comments

Comments
 (0)