Skip to content

Commit

Permalink
Merge pull request #306 from PolySync/maint/clean-workspace
Browse files Browse the repository at this point in the history
Clean working directory
  • Loading branch information
Boris Bidault authored Aug 9, 2018
2 parents 07d0787 + b3bbab8 commit 9e740a6
Showing 1 changed file with 43 additions and 33 deletions.
76 changes: 43 additions & 33 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,49 +17,59 @@ node {
def platform = platforms[platform_idx]
builds[platform] = {
node {
checkout scm
try {
checkout scm

image = docker.build("cmake-build:${env.BUILD_ID}")

image = docker.build("cmake-build:${env.BUILD_ID}")
stage("Build ${platform}") {
image.inside {
sh "cd firmware && \
rm -rf build_${platform} && \
mkdir build_${platform} && \
cd build_${platform} && \
cmake -DVEHICLE=${platform} -DCMAKE_BUILD_TYPE=Release .. && \
make"

stage("Build ${platform}") {
image.inside {
sh "cd firmware && \
rm -rf build_${platform} && \
mkdir build_${platform} && \
cd build_${platform} && \
cmake -DVEHICLE=${platform} -DCMAKE_BUILD_TYPE=Release .. && \
make"

echo "${platform}: Build Complete!"
echo "${platform}: Build Complete!"
}
}
}

stage("Test ${platform} unit tests") {
image.inside {
sh "cd firmware && \
rm -rf build_${platform}_tests && \
mkdir build_${platform}_tests && \
cd build_${platform}_tests && \
cmake -DVEHICLE=${platform} \
-DTESTS=ON \
-DPORT_SUFFIX=${EXECUTOR_NUMBER}${platform_idx} \
-DCMAKE_BUILD_TYPE=Release \
.. && \
make run-unit-tests"
echo "${platform}: Unit Tests Complete!"
stage("Test ${platform} unit tests") {
image.inside {
sh "cd firmware && \
rm -rf build_${platform}_tests && \
mkdir build_${platform}_tests && \
cd build_${platform}_tests && \
cmake -DVEHICLE=${platform} \
-DTESTS=ON \
-DPORT_SUFFIX=${EXECUTOR_NUMBER}${platform_idx} \
-DCMAKE_BUILD_TYPE=Release \
.. && \
make run-unit-tests"
echo "${platform}: Unit Tests Complete!"
}
}
}

stage("Test ${platform} property-based tests") {
image.inside("--user root:root") {
sh "cd firmware/build_${platform}_tests && \
make run-property-tests"
echo "${platform}: Property-Based Tests Complete!"
stage("Test ${platform} property-based tests") {
image.inside("--user root:root") {
sh "cd firmware/build_${platform}_tests && \
make run-property-tests"
echo "${platform}: Property-Based Tests Complete!"
}
}
}
finally {
deleteDir()
}
}
}
}

parallel builds
try {
parallel builds
}
finally {
deleteDir()
}
}

0 comments on commit 9e740a6

Please sign in to comment.