Jenkins流水线示例代码
流水线示例代码如下:
stage('memory-consistency-check') { steps { echo '====== 内存一致性检查 ======' sh ''' if [ ! -d "./report_dir" ]; then mkdir -p ./report_dir; fi /usr/bin/rm -rf ./report_dir/*.html mkdir -p /opt/DevKit/testcase/affinity/weak_cons/bc_file devkit advisor bc-gen -i /opt/DevKit/testcase/affinity/weak_cons/test-mulbc_sort -c make -o /opt/DevKit/testcase/affinity/weak_cons/bc_file devkit advisor mm-check -i /opt/DevKit/testcase/affinity/weak_cons/test-mulbc_sort -f /opt/DevKit/testcase/affinity/weak_cons/bc_file -r html -o ./report_dir mv ./report_dir/mem-check*.html ./report_dir/memory-consistency-check.html ''' } post { always { publishHTML(target: [allowMissing: false, alwaysLinkToLastBuild: false, keepAll : true, reportDir : './report_dir', reportFiles : 'memory-consistency-check.html', reportName : 'memory-consistency-check Report'] ) } } }

- 使用内存一致性检查建议放在构建流程节点前。
- “/opt/DevKit/testcase/affinity/weak_cons/test-mulbc_sort”指需要生成BC文件的源码文件夹路径,请根据实际情况进行替换。
- “/opt/DevKit/testcase/affinity/weak_cons/bc_file”指生成BC文件的存放路径,请根据实际情况进行替换。
父主题: 内存一致性检查