Jenkins Pipeline Sample Code
The sample code is as follows:
stage('vectorized-check') {
steps {
echo '====== Vectorization check ======'
sh '''
if [ ! -d "./report_dir" ]; then mkdir -p ./report_dir; fi
/usr/bin/rm -rf ./report_dir/*.html
mkdir -p /home/advisor/bc_file
cd /home/testcase/cplusproject
devkit advisor bc-gen -c make -o /home/advisor/bc_file
devkit advisor vec-check -i /home/testcase/cplusproject -f /home/advisor/bc_file -c make -r html -o ./report_dir
mv ./report_dir/vec-check*.html ./report_dir/vectorized-check.html
'''
}
post {
always {
publishHTML(target: [allowMissing: false,
alwaysLinkToLastBuild: false,
keepAll : true,
reportDir : './report_dir',
reportFiles : 'vectorized-check.html',
reportName : 'vectorized-check Report']
)
}
}
}
- You are advised to perform the vectorization check before the build process.
- /home/advisor/bc_file indicates the path to the BC files. Replace it with the actual path.
- /home/testcase/cplusproject indicates the path to the source code based on which the BC files are generated. Replace it with the actual path.
Parent topic: Vectorization Check