diff --git a/Cargo.toml b/Cargo.toml index 01b3ede30b..603129a2fc 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -53,6 +53,9 @@ rtfm-core = "0.3.0" cortex-m-rt = "0.6.9" heapless = "0.5.0" +[build-dependencies] +version_check = "0.9" + [dependencies.microamp] optional = true version = "0.1.0-alpha.2" diff --git a/build.rs b/build.rs index 14c3d248ac..fee1a6a5a6 100644 --- a/build.rs +++ b/build.rs @@ -1,8 +1,13 @@ use std::env; +use version_check; fn main() { let target = env::var("TARGET").unwrap(); + if version_check::Channel::read().unwrap().is_nightly() { + println!("cargo:rustc-cfg=rustc_is_nightly") + } + if target.starts_with("thumbv6m") { println!("cargo:rustc-cfg=armv6m") } diff --git a/ci/script.sh b/ci/script.sh index 78341e1bba..7b86e52aa6 100644 --- a/ci/script.sh +++ b/ci/script.sh @@ -44,6 +44,13 @@ main() { fi if [ $TRAVIS_RUST_VERSION = nightly ]; then + # Tests where required MSRV > 1.36 + #local exs=( + #) + #for ex in ${exs[@]}; do + # cargo check --example $ex --target $T + #done + # multi-core compile-pass tests pushd heterogeneous local exs=(