Skip to content

Commit 57a044e

Browse files
committed
Expand travis testing to include features and stable
1 parent 0020040 commit 57a044e

File tree

4 files changed

+60
-10
lines changed

4 files changed

+60
-10
lines changed

Diff for: .travis.yml

+39-10
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,44 @@
11
language: rust
2+
23
rust:
3-
- nightly-2019-08-11
4-
5-
before_script: |
6-
rustup component add rustfmt clippy
7-
script: |
8-
cargo fmt --all -- --check &&
9-
cargo clippy --all --all-targets -- -D warnings &&
10-
cargo build --no-default-features --verbose &&
11-
cargo build --all --verbose &&
12-
cargo test --all --verbose
4+
- stable
5+
- beta
6+
- nightly
7+
8+
script:
9+
- cargo test --all
10+
11+
matrix:
12+
include:
13+
- os: osx
14+
15+
- name: cargo build --features
16+
script:
17+
# Need to remove dev-dependencies so that they don't affect feature resolution
18+
- cargo run --manifest-path ci/remove-dev-dependencies/Cargo.toml
19+
# A somewhat arbitrary selection of features to check
20+
- cargo build --no-default-features
21+
- cargo build --no-default-features --features brotli,deflate,gzip,zlib,zstd,stream
22+
- cargo build --no-default-features --features brotli,deflate,gzip,zlib,zstd,bufread
23+
- cargo build --no-default-features --features brotli,bufread,stream
24+
- cargo build --no-default-features --features zstd,bufread,stream
25+
26+
- name: docs.rs
27+
rust: nightly
28+
script:
29+
- RUSTDOCFLAGS='--cfg=docsrs -Dwarnings' cargo doc --all-features --no-deps
30+
31+
- name: cargo fmt
32+
install:
33+
- rustup component add rustfmt
34+
script:
35+
- cargo fmt --all -- --check
36+
37+
- name: cargo clippy
38+
install:
39+
- rustup component add clippy
40+
script:
41+
- cargo clippy --all --all-targets -- -D warnings
1342

1443
branches:
1544
only: [staging, trying, master]

Diff for: ci/remove-dev-dependencies/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/target

Diff for: 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.5"

Diff for: ci/remove-dev-dependencies/src/main.rs

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
use std::{error::Error, fs};
2+
3+
fn main() -> Result<(), Box<dyn Error>> {
4+
let content = fs::read_to_string("Cargo.toml")?;
5+
let mut doc: toml_edit::Document = content.parse()?;
6+
doc.as_table_mut().remove("dev-dependencies");
7+
fs::write("Cargo.toml", doc.to_string())?;
8+
Ok(())
9+
}

0 commit comments

Comments
 (0)