Add features to travis.yml
This commit is contained in:
parent
dd09555537
commit
14e1f845f3
2 changed files with 56 additions and 9 deletions
52
.travis.yml
52
.travis.yml
|
@ -1,15 +1,59 @@
|
|||
language: rust
|
||||
rust: stable
|
||||
sudo: false
|
||||
|
||||
jobs:
|
||||
allow_failures:
|
||||
- stage: test
|
||||
rust: beta
|
||||
env: FEATURES=default
|
||||
- stage: test
|
||||
rust: nightly
|
||||
env: FEATURES=default
|
||||
|
||||
include:
|
||||
# Default features
|
||||
- &test
|
||||
rust: stable
|
||||
env: FEATURES=default
|
||||
script:
|
||||
- cargo test --all --features "toml_config yaml_config json_config"
|
||||
- cargo build
|
||||
- cargo test --all --no-default-features --features "$FEATURES"
|
||||
- cargo build --no-default-features --features "$FEATURES"
|
||||
- cargo run --no-default-features --features "$FEATURES" --example build-bot
|
||||
|
||||
# No features
|
||||
- <<: *test
|
||||
env: FEATURES=
|
||||
|
||||
# CTCP on without toml
|
||||
- <<: *test
|
||||
env: FEATURES=ctcp
|
||||
# CTCP on w/toml (this is the same as default)
|
||||
#- <<: *test
|
||||
# env: FEATURES=ctcp toml_config
|
||||
# nochanlists on without toml
|
||||
- <<: *test
|
||||
env: FEATURES=nochanlists
|
||||
# nochanlists on w/toml
|
||||
- <<: *test
|
||||
env: FEATURES=nochanlists toml_config
|
||||
|
||||
# Beta
|
||||
- <<: *test
|
||||
rust: beta
|
||||
env: FEATURES=default
|
||||
# Nightly
|
||||
- <<: *test
|
||||
rust: nightly
|
||||
env: FEATURES=default
|
||||
|
||||
# No idea how to fix this, since we don't depend on futures-preview directly.
|
||||
# - rustdoc --test README.md --extern irc=target/debug/libirc.rlib -L target/debug/deps --edition 2018
|
||||
- cargo run --example build-bot
|
||||
|
||||
notifications:
|
||||
email: false
|
||||
irc:
|
||||
on_failure: always
|
||||
on_success: never
|
||||
channels:
|
||||
- "ircs://irc.pdgn.co:6697/#commits"
|
||||
template:
|
||||
|
|
|
@ -11,10 +11,12 @@ async fn main() -> irc::error::Result<()> {
|
|||
let branch = env::var("TRAVIS_BRANCH").unwrap();
|
||||
let commit = env::var("TRAVIS_COMMIT").unwrap();
|
||||
let commit_message = env::var("TRAVIS_COMMIT_MESSAGE").unwrap();
|
||||
let features = env::var("FEATURES").unwrap();
|
||||
|
||||
let config = Config {
|
||||
nickname: Some("irc-crate-ci".to_owned()),
|
||||
server: Some("irc.pdgn.co".to_owned()),
|
||||
alt_nicks: vec!["[irc-crate-ci]".to_owned()],
|
||||
use_ssl: true,
|
||||
..Default::default()
|
||||
};
|
||||
|
@ -31,11 +33,12 @@ async fn main() -> irc::error::Result<()> {
|
|||
client.send_privmsg(
|
||||
"#commits",
|
||||
format!(
|
||||
"[{}/{}] ({}) {}",
|
||||
"[{}/{}] ({}) {} [{}]",
|
||||
repository_slug,
|
||||
branch,
|
||||
&commit[..7],
|
||||
commit_message
|
||||
commit_message,
|
||||
features,
|
||||
),
|
||||
)?;
|
||||
|
||||
|
|
Loading…
Reference in a new issue