GitLab Pipeline Sample Code
The sample code is as follows:
stages:
- build
- affinity-analysis
vectorized-check:
stage: affinity-analysis
tags:
- kunpeng_scanner # This is the tag used during gitlab-runner registration. Multiple tags may be selected.
script:
echo '====== Vectorization check ======'
# Write a script for generating BC files.
# Example: mkdir -p /home/advisor/bc_file
# Example: cd /home/testcase/cplusproject
# Example: devkit advisor bc-gen -c make -o /home/advisor/bc_file
# Example: devkit advisor vec-check -i /home/testcase/cplusproject -f /home/advisor/bc_file -c make -r html
- mkdir -p Path for storing the BC files
- cd Path to the source code folder for which BC files are to be generated
- devkit advisor bc-gen -c Source code build command -o Path for storing the BC files
- devkit advisor vec-check -i Path to the source code based on which the BC files are generated -f Path to the BC files -c Source code build command -r html
- mv ./vec-check*.html ./vectorized-check.html
artifacts:
paths:
- vectorized-check.html
name: vec-check
- 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