Skip to content

Commit

Permalink
Switch windows, linux and macos to jenkins CI
Browse files Browse the repository at this point in the history
  • Loading branch information
Frizi committed Sep 21, 2019
1 parent ab6e618 commit fad2f56
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 40 deletions.
32 changes: 17 additions & 15 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
language: rust
compiler: clang
cache: cargo

env:
global: RUSTFLAGS="-D warnings" RUST_LOG=info
Expand All @@ -8,34 +9,35 @@ rust: stable

matrix:
include:
# Linux 64bit
- os: linux
# # Linux 64bit
# - os: linux

# macOS 64bit
- env: MACOSX_DEPLOYMENT_TARGET=10.9
os: osx
osx_image: xcode10.2
# We need travis_wait here to ensure the build doesn't timeout due to
# shader compilation
script: travis_wait 30 make
# # macOS 64bit
# - env: MACOSX_DEPLOYMENT_TARGET=10.9
# os: osx
# osx_image: xcode10.2
# # We need travis_wait here to ensure the build doesn't timeout due to
# # shader compilation
# script: travis_wait 30 make

# iPhoneOS 64bit
- env: TARGET=aarch64-apple-ios
os: osx
osx_image: xcode10.2
# We need travis_wait here to ensure the build doesn't timeout due to
# shader compilation
script: travis_wait 30 make
script: travis_wait 45 make

# Windows 64bit
- os: windows
env: PATH=/c/Python37:/c/Python37/Scripts:$PATH
# # Windows 64bit
# - os: windows
# env: PATH=/c/Python37:/c/Python37/Scripts:$PATH

branches:
only:
- staging
- trying
# Only build on master as sanity check
- master
# - staging
# - trying

before_install:
- if [[ $TRAVIS_OS_NAME == "windows" ]]; then choco install make; choco install ninja; choco install python; fi
Expand Down
48 changes: 33 additions & 15 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,20 +26,7 @@ pipeline {
}
stage('Run Tests') {
parallel {
stage("Test on Linux") {
agent {
docker {
image 'amethystrs/builder-linux:stable'
label 'docker'
}
}
steps {
echo 'Beginning tests...'
sh 'cd rendy && cargo test --all --features "full vulkan"'
echo 'Tests done!'
}
}
stage('Coverage') {
stage('Test on Linux / coverage') {
agent {
docker {
image 'amethystrs/builder-linux:stable'
Expand All @@ -50,7 +37,7 @@ pipeline {
steps {
withCredentials([string(credentialsId: 'codecov_token', variable: 'CODECOV_TOKEN')]) {
echo 'Building to calculate coverage'
sh 'cargo test --all'
sh 'cd rendy && cargo test --all --features "full vulkan"'
echo 'Calculating code coverage...'
sh 'for file in target/debug/rendy*[^\\.d]; do mkdir -p \"target/cov/$(basename $file)\"; kcov --exclude-pattern=/.cargo,/usr/lib --verify \"target/cov/$(basename $file)\" \"$file\" || true; done'
echo "Uploading coverage..."
Expand All @@ -59,6 +46,37 @@ pipeline {
}
}
}
stage("Test on Windows") {
environment {
CARGO_HOME = 'C:\\Users\\root\\.cargo'
RUSTUP_HOME = 'C:\\Users\\root\\.rustup'
}
agent {
label 'windows'
}
steps {
bat 'C:\\Users\\root\\.cargo\\bin\\cargo update'
echo 'Beginning tests...'
// TODO: Once we support DX12, we should switch to it from vulkan for windows
// FIXME: Can't test "full" because of problems with shaderc compilation on windows box
bat 'cd rendy && C:\\Users\\root\\.cargo\\bin\\cargo test --all --no-default-features --features "base mesh-obj texture-image texture-palette spirv-reflection wsi-winit serde-1 vulkan"'
echo 'Tests done!'
}
}
stage("Test on macOS") {
environment {
CARGO_HOME = '/Users/jenkins/.cargo'
RUSTUP_HOME = '/Users/jenkins/.rustup'
}
agent {
label 'mac'
}
steps {
echo 'Beginning tests...'
sh 'cd rendy && /Users/jenkins/.cargo/bin/cargo test --all --features "full metal"'
echo 'Tests done!'
}
}
}
}
}
Expand Down
7 changes: 3 additions & 4 deletions bors.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# Test suite must pass on both Travis (if enabled) and Jenkins before merging into `master`.
status = [
"continuous-integration/travis-ci/push"
# "continuous-integration/travis-ci/push",
"continuous-integration/jenkins/%",
]
# Uncomment this to use a two hour timeout.
# The default is one hour.
#timeout_sec = 7200
12 changes: 6 additions & 6 deletions rendy/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ spirv-reflection = ["rendy-shader/spirv-reflection" ]
wsi-winit = ["rendy-wsi/winit"]

# Full feature set - all listed features except rendy-util's.
full = ["base", "mesh-obj", "texture-image", "texture-palette", "spirv-reflection", "shader-compiler", "wsi-winit"]
full = ["base", "mesh-obj", "texture-image", "texture-palette", "spirv-reflection", "shader-compiler", "wsi-winit", "serde-1"]

# Default feature set includes all subcrates and few commonly used features.
default = [ "base", "shader-compiler", "spirv-reflection", "wsi-winit" ]
Expand Down Expand Up @@ -82,23 +82,23 @@ rand = "0.7"

[[example]]
name = "triangle"
required-features = ["base", "wsi-winit"]
required-features = ["base", "wsi-winit", "shader-compiler"]

[[example]]
name = "sprite"
required-features = ["base", "texture-image", "wsi-winit"]
required-features = ["base", "texture-image", "wsi-winit", "shader-compiler"]

[[example]]
name = "meshes"
required-features = ["base", "wsi-winit"]
required-features = ["base", "wsi-winit", "shader-compiler"]

[[example]]
name = "quads"
required-features = ["base", "wsi-winit"]
required-features = ["base", "wsi-winit", "shader-compiler"]

[[example]]
name = "source_shaders"
required-features = ["base", "wsi-winit"]
required-features = ["base", "wsi-winit", "shader-compiler"]

[package.metadata.docs.rs]
features = ["full"]

0 comments on commit fad2f56

Please sign in to comment.