我要评分
获取效率
正确性
完整性
易理解

GitLab Pipeline Sample Code

The sample code is as follows:

stages:
  - build
  - affinity-analysis
memory-consistency-check:
  stage: affinity-analysis
  tags:
    - kunpeng_scanner # This is the tag used during gitlab-runner registration. Multiple tags may be selected.
  script:
    - echo '====== Memory consistency check ======'
    # Write a script for generating BC files.
    # Example: mkdir -p /opt/DevKit/testcase/affinity/weak_cons/bc_file
    # Example: cd /opt/DevKit/testcase/affinity/weak_cons/test-mulbc_sort
    # Example: devkit advisor bc-gen -c make -o /opt/DevKit/testcase/affinity/weak_cons/bc_file
    # Example: 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
    - 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 mm-check -i Path to the source code based on which the BC files are generated -f Path to the BC files -r html
    - mv ./mem-check*.html ./memory-consistency-check.html
  artifacts:
    paths:
      - memory-consistency-check.html
    name: mem-check
  • You are advised to perform the memory consistency check before the build process.
  • /opt/DevKit/testcase/affinity/weak_cons/bc_file indicates the path for storing the generated BC files. Replace it with the actual path.
  • /opt/DevKit/testcase/affinity/weak_cons/test-mulbc_sort indicates the path to the source code based on which the BC files are generated. Replace it with the actual path.