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