Skip to content

Commit ab3736a

Browse files
authored
Merge pull request #8 from indiv0/chore-fix-travis-osx
Fix OS X CI builds
2 parents fe7c221 + e67d673 commit ab3736a

File tree

3 files changed

+23
-5
lines changed

3 files changed

+23
-5
lines changed

.travis.yml

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,13 @@ before_script:
2929
else
3030
export PATH=$HOME/Library/Python/2.7/bin:$PATH
3131
fi
32+
- |
33+
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
34+
brew install openssl && \
35+
export OPENSSL_INCLUDE_DIR=`brew --prefix openssl`/include && \
36+
export OPENSSL_LIB_DIR=`brew --prefix openssl`/lib && \
37+
echo "Installed OpenSSL for OS X."
38+
fi
3239
# the main build
3340
script:
3441
- |
@@ -47,11 +54,16 @@ script:
4754
else
4855
travis-cargo bench
4956
fi &&
50-
travis-cargo --only stable doc
57+
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
58+
travis-cargo --only stable doc
59+
fi
5160
after_success:
5261
# upload the documentation from the build with stable (automatically only
53-
# actually runs from the master branch, not individual PRs)
54-
- travis-cargo --only stable doc-upload
62+
# actually runs from the master branch, not individual PRs), not on OS X.
63+
- |
64+
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
65+
travis-cargo --only stable doc-upload
66+
fi
5567
# measure code coverage and upload to coveralls.io (the verify argument
5668
# mitigates kcov crashes due to malformed debuginfo, at the cost of some
5769
# speed. <https://github.com/huonw/travis-cargo/issues/12>)

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ version = "0.8.19"
3232
[dependencies]
3333
log = "0.3.6"
3434
serde = "0.8.19"
35-
serde_xml = "0.9.1"
35+
serde_xml = "0.8.1"
3636

3737
[dependencies.clippy]
3838
optional = true

src/model.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ include!(concat!(env!("OUT_DIR"), "/model.rs"));
2727
mod tests {
2828
use serde_xml::from_str;
2929

30-
use super::{Img, Infos, Pod, QueryResult, Subpod};
30+
use super::{Img, Infos, Plaintext, Pod, QueryResult, Subpod};
3131

3232
#[test]
3333
fn test_query_result_deserializer() {
@@ -91,6 +91,12 @@ mod tests {
9191
from_str::<Img>(&s).unwrap();
9292
}
9393

94+
#[test]
95+
fn test_plaintext_deserializer() {
96+
from_str::<Plaintext>(&"<plaintext>pi</plaintext>".to_owned()).unwrap();
97+
from_str::<Option<Plaintext>>(&"<plaintext/>".to_owned()).unwrap();
98+
}
99+
94100
#[test]
95101
fn test_infos_deserializer() {
96102
let s = INFOS_STR.to_owned();

0 commit comments

Comments
 (0)