Skip to content

Commit

Permalink
Update Jenkinsfile
Browse files Browse the repository at this point in the history
  • Loading branch information
fhaynes authored Apr 25, 2019
1 parent d48b6f2 commit 7618278
Showing 1 changed file with 34 additions and 83 deletions.
117 changes: 34 additions & 83 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -1,108 +1,59 @@
pipeline {
agent none
stages {
stage("Pull new images") {
agent {
label 'docker'
}
steps {
sh 'docker pull amethystrs/builder-linux:stable'
sh 'docker pull amethystrs/builder-linux:nightly'
}
}
stage('Cargo Fmt') {
stage("Pull new images") {
agent {
label 'docker'
}
steps {
sh 'docker pull amethystrs/builder-linux:stable'
sh 'docker pull amethystrs/builder-linux:nightly'
}
}
stage('Check Formatting') {
environment {
CARGO_HOME = '/home/jenkins/.cargo'
RUSTUP_HOME = '/home/jenkins/.rustup'
RUSTFLAGS = "-D warnings"
}
agent {
docker {
image 'amethystrs/builder-linux:stable'
label 'docker'
}
label 'linux'
}
steps {
echo 'Checking formatting...'
sh 'cargo fmt -- --check'
sh '$CARGO_HOME/bin/cargo fmt -- --check'
}
}
stage('Cargo Check') {
parallel {
stage("stable") {
environment {
RUSTFLAGS = "-D warnings"
}
agent {
docker {
image 'amethystrs/builder-linux:stable'
label 'docker'
}
}
steps {
echo 'Running Cargo check...'
sh 'cargo check --all --all-targets --features sdl_controller,json,saveload'
}
}
stage("nightly") {
environment {
RUSTFLAGS = "-D warnings"
}
agent {
docker {
image 'amethystrs/builder-linux:nightly'
label 'docker'
}
}
steps {
echo 'Running Cargo check...'
sh 'cargo check --all --all-targets --features nightly'
}
}
}
}
stage('Run Tests') {
parallel {
stage("Test on Windows") {
environment {
CARGO_HOME = 'C:\\Users\\root\\.cargo'
RUSTUP_HOME = 'C:\\Users\\root\\.rustup'
}
agent {
label 'windows'
}
steps {
echo 'Beginning tests...'
bat 'C:\\Users\\root\\.cargo\\bin\\cargo test --all'
echo 'Tests done!'
}
}

stage("Test on Linux") {
agent {
docker {
image 'amethystrs/builder-linux:stable'
label 'docker'
}
docker {
image 'amethystrs/builder-linux:stable'
label 'docker'
}
}
steps {
echo 'Beginning tests...'
sh 'cargo test --all'
sh 'cd rendy && cargo test --all --features "full vulkan"'
echo 'Tests done!'
}
}
// macOS is commented out due to needing to upgrade the OS, but MacStadium did not do the original install with APFS so we cannot upgrade easily
// stage("Test on macOS") {
// environment {
// CARGO_HOME = '/Users/jenkins/.cargo'
// RUSTUP_HOME = '/Users/jenkins/.rustup'
// }
// agent {
// label 'mac'
// }
// steps {
// echo 'Beginning tests...'
// sh '/Users/jenkins/.cargo/bin/cargo test --all'
// 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 && cargo test --all --features "full metal"'
echo 'Tests done!'
}
}
}
}
}
Expand Down

0 comments on commit 7618278

Please sign in to comment.