Enable windows in Travis

This commit is contained in:
Dzmitry Malyshau committed 2019-03-20 00:28:06 -04:00
1 parent 32351b074b
commit 43e56961c4
2 files changed
+39 -6

No files matched your search

+33 -4
View File
@@ -1,7 +1,35 @@
language: rust
rust:
- stable
- nightly
matrix:
include:
# Linux 64bit
- os: linux
rust: stable
compiler: gcc
- os: linux
rust: nightly
compiler: gcc
# Windows 64bit
- os: windows
rust: stable
# macOS 64bit
- env: MACOSX_DEPLOYMENT_TARGET=10.9
os: osx
rust: stable
osx_image: xcode9
compiler: clang
#- env: MACOSX_DEPLOYMENT_TARGET=10.9
# os: osx
# rust: nightly
# osx_image: xcode9
# compiler: clang
# iPhoneOS 64bit
#- env: TARGET=aarch64-apple-ios
# os: osx
# osx_image: xcode9
# rust: nightly
branches:
except:
@@ -11,7 +39,8 @@ before_install:
# Do not run bors builds against the nightly compiler.
# We want to find out about nightly bugs, so they're done in master, but we don't block on them.
- if [[ $TRAVIS_RUST_VERSION == "nightly" && $TRAVIS_BRANCH == "staging" ]]; then exit; fi
- if [[ $TRAVIS_OS_NAME == "windows" ]]; then choco install make; fi
script:
- cargo test
- cargo check --manifest-path wgpu-native/Cargo.toml
- if [[ $TRAVIS_OS_NAME == "osx" ]]; then (brew update && brew upgrade cmake && brew install glfw3 && cd wgpu-native && cargo build --features=local,gfx-backend-metal && cd ../examples/hello_triangle_c && mkdir build && cd build && cmake .. && make); fi
+6 -2
View File
@@ -109,7 +109,11 @@ pub fn instance_create_surface_from_windows_hwnd(
hinstance: *mut std::ffi::c_void,
hwnd: *mut std::ffi::c_void,
) -> SurfaceHandle {
#[cfg(not(target_os = "windows"))]
#[cfg(not(any(
feature = "gfx-backend-dx11",
feature = "gfx-backend-dx12",
all(target_os = "windows", feature = "gfx-backend-vulkan"),
)))]
let raw = unimplemented!();
#[cfg(any(feature = "gfx-backend-dx11", feature = "gfx-backend-dx12"))]
@@ -118,7 +122,7 @@ pub fn instance_create_surface_from_windows_hwnd(
#[cfg(all(target_os = "windows", feature = "gfx-backend-vulkan"))]
let raw = HUB.instances.read()[instance_id].create_surface_from_hwnd(hinstance, hwnd);
#[cfg_attr(not(target_os = "windows"), allow(unreachable_code))]
#[allow(unreachable_code)]
SurfaceHandle::new(raw)
}