Skip to content

Commit 1656dc4

Browse files
committed
Switch Windows CI builds from windows-gnu to windows-msvc.
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.
1 parent c83db2d commit 1656dc4

File tree

2 files changed

+15
-6
lines changed

2 files changed

+15
-6
lines changed

.travis.yml

+5-1
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,15 @@ env:
1313
- RELEASE=
1414
- RELEASE=--release
1515

16+
install:
17+
- if [ "$TRAVIS_OS_NAME" = "windows" ]; then rustup target add x86_64-pc-windows-msvc; fi
18+
1619
script:
1720
# We cannot run `cargo test` with the mp4parse_fallible feature enabled
1821
# (see comment where the feature is defined in mp4parse_capi/Cargo.toml),
1922
# but we can at least check for changes behind features that would break the
2023
# build.
2124
- cargo check --all --verbose $RELEASE --tests --all-features
22-
- cargo test --all --verbose $RELEASE
25+
- if [ "$TRAVIS_OS_NAME" = "windows" ]; then export TARGET=--target=x86_64-pc-windows-msvc; fi
26+
- cargo test --all --verbose $RELEASE $TARGET -- --nocapture
2327
- cargo doc --package mp4parse_capi

test_ffi/src/main.rs

+10-5
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,16 @@ fn ffi_test() {
2727
extern { fn test_main(test_path: *const c_char) -> c_void; }
2828

2929
let path = {
30-
let argv0 = std::env::args().next().unwrap();
31-
let mut base = std::path::PathBuf::from(argv0);
32-
base.pop();
33-
base.push("../../../mp4parse/tests/minimal.mp4");
34-
let path = base.canonicalize().unwrap();
30+
let base = std::env::var("CARGO_MANIFEST_DIR").unwrap();
31+
eprintln!("debug base={:?}", base);
32+
let mut path = std::path::PathBuf::from(base);
33+
eprintln!("debug path={:?}", path);
34+
path.pop();
35+
eprintln!("debug path={:?}", path);
36+
path.push("mp4parse/tests/minimal.mp4");
37+
eprintln!("debug path={:?}", path);
38+
let path = path.canonicalize().unwrap();
39+
eprintln!("debug path={:?}", path);
3540

3641
#[cfg(unix)]
3742
{

0 commit comments

Comments
 (0)