Skip to content

Commit cbc286b

Browse files
committed
Workaround dev-dependencies leaking into normal build
1 parent 92d2c70 commit cbc286b

File tree

3 files changed

+35
-7
lines changed

3 files changed

+35
-7
lines changed

.travis.yml

+12-7
Original file line numberDiff line numberDiff line change
@@ -64,17 +64,26 @@ matrix:
6464
script:
6565
- cargo build --manifest-path futures/Cargo.toml --features io-compat
6666

67-
# Allow build fail until #1396 is fixed.
6867
- name: cargo build --target=thumbv6m-none-eabi
6968
rust: nightly
70-
env: ALLOW_FAILURES=true
7169
install:
7270
- rustup target add thumbv6m-none-eabi
7371
script:
72+
- cargo run --manifest-path ci/remove-dev-dependencies/Cargo.toml */Cargo.toml
7473
- cargo build --manifest-path futures/Cargo.toml
7574
--target thumbv6m-none-eabi
7675
--no-default-features
77-
--features nightly
76+
--features nightly,cfg-target-has-atomic
77+
78+
- name: cargo build --target=thumbv7m-none-eabi
79+
rust: nightly
80+
install:
81+
- rustup target add thumbv7m-none-eabi
82+
script:
83+
- cargo run --manifest-path ci/remove-dev-dependencies/Cargo.toml */Cargo.toml
84+
- cargo build --manifest-path futures/Cargo.toml
85+
--target thumbv7m-none-eabi
86+
--no-default-features
7887

7988
- name: cargo doc
8089
rust: nightly
@@ -102,10 +111,6 @@ matrix:
102111
- git commit -m "Add API docs for $TRAVIS_TAG"
103112
- git push origin master
104113

105-
allow_failures:
106-
- rust: nightly
107-
env: ALLOW_FAILURES=true
108-
109114
script:
110115
- cargo test --all --all-features
111116
- cargo test --all --all-features --release

ci/remove-dev-dependencies/Cargo.toml

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
[package]
2+
name = "remove-dev-dependencies"
3+
version = "0.1.0"
4+
authors = ["Wim Looman <[email protected]>"]
5+
edition = "2018"
6+
publish = false
7+
8+
[workspace]
9+
10+
[dependencies]
11+
toml_edit = "0.1.3"
+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
use std::{env, error::Error, fs};
2+
3+
fn main() -> Result<(), Box<dyn Error>> {
4+
for file in env::args().skip(1) {
5+
let content = fs::read_to_string(&file)?;
6+
let mut doc: toml_edit::Document = content.parse()?;
7+
doc.as_table_mut().remove("dev-dependencies");
8+
fs::write(file, doc.to_string())?;
9+
}
10+
11+
Ok(())
12+
}

0 commit comments

Comments
 (0)