From 5ede8096c45517c84dd1d994132a9c79f72e1f91 Mon Sep 17 00:00:00 2001 From: Chris Date: Wed, 16 Jan 2019 18:10:45 +0100 Subject: [PATCH] Fix ci build fails There was some problem with the std examples, so I changed ci to only check a seperate use of the bme680 in a new ci-folder to be no_std compatible. --- .gitignore | 4 +++- .travis.yml | 2 +- ci/no_std_test/Cargo.toml | 9 +++++++++ ci/no_std_test/src/lib.rs | 8 ++++++++ 4 files changed, 21 insertions(+), 2 deletions(-) create mode 100644 ci/no_std_test/Cargo.toml create mode 100644 ci/no_std_test/src/lib.rs diff --git a/.gitignore b/.gitignore index aa085cd..9aa69fd 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ Cargo.lock -/target +**/target **/*.rs.bk + + diff --git a/.travis.yml b/.travis.yml index 7dcbff9..bdd4dac 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,7 +6,7 @@ rust: script: - cargo build --verbose - cargo test --verbose - - cargo check --target thumbv7m-none-eabi # check for no_std + - cd ci/no_std_test && rustup target add thumbv7m-none-eabi && cargo check --target thumbv7m-none-eabi # check for no_std matrix: allow_failures: - rust: nightly diff --git a/ci/no_std_test/Cargo.toml b/ci/no_std_test/Cargo.toml new file mode 100644 index 0000000..4fe4c66 --- /dev/null +++ b/ci/no_std_test/Cargo.toml @@ -0,0 +1,9 @@ +[package] +name = "no_std_test" +version = "0.1.0" +authors = ["marcelbuesing "] +edition = "2018" + +[dependencies] +bme680 = { path = "../../"} +log = "0.4" diff --git a/ci/no_std_test/src/lib.rs b/ci/no_std_test/src/lib.rs new file mode 100644 index 0000000..ebb5111 --- /dev/null +++ b/ci/no_std_test/src/lib.rs @@ -0,0 +1,8 @@ +#![no_std] + +use bme680::*; +use log::info; + +pub fn test_no_std() { + info!("chipid {:?}", BME680_CHIP_ID); +} \ No newline at end of file