Skip to content

Commit

Permalink
Switch Windows CI builds from windows-gnu to windows-msvc.
Browse files Browse the repository at this point in the history
The Travis default of windows-gnu suffers from rust-lang/rust#47048, I
think. I don't see an easy way to address this right now, but switching
our Windows builds to windows-msvc will avoid this and is more realistic
target anyway.
  • Loading branch information
kinetiknz committed Mar 6, 2020
1 parent c83db2d commit 1656dc4
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 6 deletions.
6 changes: 5 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,15 @@ env:
- RELEASE=
- RELEASE=--release

install:
- if [ "$TRAVIS_OS_NAME" = "windows" ]; then rustup target add x86_64-pc-windows-msvc; fi

script:
# We cannot run `cargo test` with the mp4parse_fallible feature enabled
# (see comment where the feature is defined in mp4parse_capi/Cargo.toml),
# but we can at least check for changes behind features that would break the
# build.
- cargo check --all --verbose $RELEASE --tests --all-features
- cargo test --all --verbose $RELEASE
- if [ "$TRAVIS_OS_NAME" = "windows" ]; then export TARGET=--target=x86_64-pc-windows-msvc; fi
- cargo test --all --verbose $RELEASE $TARGET -- --nocapture
- cargo doc --package mp4parse_capi
15 changes: 10 additions & 5 deletions test_ffi/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,16 @@ fn ffi_test() {
extern { fn test_main(test_path: *const c_char) -> c_void; }

let path = {
let argv0 = std::env::args().next().unwrap();
let mut base = std::path::PathBuf::from(argv0);
base.pop();
base.push("../../../mp4parse/tests/minimal.mp4");
let path = base.canonicalize().unwrap();
let base = std::env::var("CARGO_MANIFEST_DIR").unwrap();
eprintln!("debug base={:?}", base);
let mut path = std::path::PathBuf::from(base);
eprintln!("debug path={:?}", path);
path.pop();
eprintln!("debug path={:?}", path);
path.push("mp4parse/tests/minimal.mp4");
eprintln!("debug path={:?}", path);
let path = path.canonicalize().unwrap();
eprintln!("debug path={:?}", path);

#[cfg(unix)]
{
Expand Down

0 comments on commit 1656dc4

Please sign in to comment.