|
1 |
| -stages: |
2 |
| - - test |
3 |
| - |
4 |
| -riscv_tests_cv32: |
5 |
| - stage: test |
6 |
| - script: |
7 |
| - - curl -H 'Private-Token:'$METRICS_CI_SERVICE |
8 |
| - -H 'Content-Type:application/json' |
9 |
| - -d '{"projectId":"cv32e40p_verif-core-v-verif-cv32", "regressionName":"cv32_sanity_regression", |
10 |
| - "branch":"'$CI_COMMIT_REF_NAME'"}' |
11 |
| - -X POST 'https://openhwgroup.metrics.ca/api/jobs/v1/runRegression' |
12 |
| - |
13 |
| - |
| 1 | +# Copyright 2022 Thales DIS design services SAS |
| 2 | +# |
| 3 | +# Licensed under the Solderpad Hardware Licence, Version 2.0 (the "License"); |
| 4 | +# you may not use this file except in compliance with the License. |
| 5 | +# SPDX-License-Identifier: Apache-2.0 WITH SHL-2.0 |
| 6 | +# You may obtain a copy of the License at https://solderpad.org/licenses/ |
| 7 | +# |
| 8 | +# Original Author: Yannick Casamatta ([email protected]) |
| 9 | + |
| 10 | +# Project maintainers must define following variables to adapt this CI to their runtime environment (Settings > CI/CD > Variables) |
| 11 | +# - TAGS_RUNNER: shell,debian10 |
| 12 | +# - RUN_CV32_CI: 'true'/'false' |
| 13 | +# - SETUP_CI_CV32_BRANCH: master |
| 14 | +# - RUN_CVA6_CI: 'true'/'false' |
| 15 | +# - SETUP_CI_CVA6_BRANCH: master |
| 16 | +# - RUN_EXTERNAL_CI: 'true'/'false' |
| 17 | +# - SETUP_CI_EXTERNALBRANCH: dev/mybranch |
| 18 | + |
| 19 | +# A git repository named "setup-ci" must be created in the same namespace as core-v-verif and must contain the following files: |
| 20 | +# - 'cv32/core-v-verif-cv32.yml' (if RUN_CV32_CI == 'true') |
| 21 | +# - 'cva6/core-v-verif-cva6.yml' (if RUN_CVA6_CI == 'true') |
| 22 | +# - 'common/core-v-verif.yml' (if $RUN_EXTERNAL_CI == 'true') |
| 23 | +# Each of these files must at least contain the variables necessary for the execution of the associated downstream pipeline. |
| 24 | +# Other elements such as new jobs can be added to overload the associated downstream pipeline included in this repository. |
| 25 | +# Example can be found in ".gitlab-ci/setup-ci-example/" |
| 26 | + |
| 27 | +# Guidelines: |
| 28 | +# - Prefer using parent-child pipelines instead of including yml for ease of maintenance. |
| 29 | +# - Specific elements should be defined in the triggered yml to avoid conflicts between pipelines. |
| 30 | +# - In this file, only generic job/variables should be declared. |
| 31 | + |
| 32 | + |
| 33 | +variables: |
| 34 | + # variables defined here can't be overriden in downstream pipeline when upstream pipeline is triggered manually or by schedule. |
| 35 | + |
| 36 | + |
| 37 | +workflow: |
| 38 | + rules: |
| 39 | + - if: '$CI_COMMIT_REF_NAME =~ /^master.*/ || $CI_COMMIT_REF_NAME =~ /^hotfix.*/ || $CI_COMMIT_REF_NAME =~ /^rc.*/ || $CI_COMMIT_REF_NAME =~ /^cva6\/dev.*/' |
| 40 | + variables: |
| 41 | + CI_WEIGHT: "full" |
| 42 | + - if: '$CI_COMMIT_REF_NAME =~ /^dev.*/ || $CI_COMMIT_REF_NAME =~ /^feature.*/' |
| 43 | + variables: |
| 44 | + CI_WEIGHT: "short" |
| 45 | + - if: '$CI_COMMIT_REF_NAME =~ /^cvvdev\/master.*/ || $CI_COMMIT_REF_NAME =~ /^cvvdev\/hotfix.*/ || $CI_COMMIT_REF_NAME =~ /^cvvdev\/rc.*/ || $CI_COMMIT_REF_NAME =~ /^cva6\/dev.*/' |
| 46 | + variables: |
| 47 | + CI_WEIGHT: "full" |
| 48 | + CVA6_BRANCH: $CI_COMMIT_REF_NAME |
| 49 | + - if: '$CI_COMMIT_REF_NAME =~ /^cvvdev\/dev.*/ || $CI_COMMIT_REF_NAME =~ /^cvvdev\/feature.*/' |
| 50 | + variables: |
| 51 | + CI_WEIGHT: "lite" |
| 52 | + CVA6_BRANCH: $CI_COMMIT_REF_NAME |
| 53 | + - when: never |
| 54 | + |
| 55 | + |
| 56 | +check_env: |
| 57 | + variables: |
| 58 | + GIT_STRATEGY: none |
| 59 | + tags: [$TAGS_RUNNER] |
| 60 | + before_script: |
| 61 | + after_script: |
| 62 | + script: |
| 63 | + - echo $TAGS_RUNNER |
| 64 | + - echo $RUN_CV32_CI |
| 65 | + - echo $SETUP_CI_CV32_BRANCH |
| 66 | + - echo $RUN_CVA6_CI |
| 67 | + - echo $SETUP_CI_CVA6_BRANCH |
| 68 | + - echo $RUN_EXTERNAL_CI |
| 69 | + - echo $SETUP_CI_EXTERNAL_BRANCH |
| 70 | + - echo $CI_COMMIT_REF_NAME |
| 71 | + - echo $CI_COMMIT_BRANCH |
| 72 | + - echo $CVA6_BRANCH |
| 73 | + |
| 74 | + |
| 75 | +# cv32 downstream pipeline describes in '.gitlab-ci/cv32.yml' + 'cv32/core-v-verif-cv32.yml' of 'setup-ci' repository |
| 76 | +# If enabled by RUN_CV32_CI |
| 77 | +cv32: |
| 78 | + trigger: |
| 79 | + include: |
| 80 | + - local: .gitlab-ci/cv32.yml |
| 81 | + - project: '$CI_PROJECT_NAMESPACE/setup-ci' |
| 82 | + ref: '$SETUP_CI_CV32_BRANCH' |
| 83 | + file: 'cv32/core-v-verif-cv32.yml' |
| 84 | + strategy: depend |
| 85 | + variables: |
| 86 | + TAGS_RUNNER: $TAGS_RUNNER |
| 87 | + SCOPE_CVV: "true" |
| 88 | + rules: |
| 89 | + - if: '$RUN_CV32_CI == "true"' |
| 90 | + when: always |
| 91 | + - when: never |
| 92 | + |
| 93 | + |
| 94 | +# cva6 downstream pipeline describes in '.gitlab-ci/cva6.yml' + 'cva6/core-v-verif-cva6.yml' of 'setup-ci' repository |
| 95 | +# If enabled by RUN_CVA6_CI |
| 96 | +cva6: |
| 97 | + trigger: |
| 98 | + include: |
| 99 | + - local: .gitlab-ci/cva6.yml |
| 100 | + - project: '$CI_PROJECT_NAMESPACE/setup-ci' |
| 101 | + ref: '$SETUP_CI_CVA6_BRANCH' |
| 102 | + file: 'cva6/core-v-verif-cva6.yml' |
| 103 | + strategy: depend |
| 104 | + variables: |
| 105 | + TAGS_RUNNER: $TAGS_RUNNER |
| 106 | + SCOPE_CVV: "true" |
| 107 | + rules: |
| 108 | + - if: '$RUN_CVA6_CI == "true"' |
| 109 | + when: always |
| 110 | + - when: never |
| 111 | + |
| 112 | + |
| 113 | +# If enabled by RUN_EXTERNAL_CI |
| 114 | +# Use this entry point to run a pipeline describes in 'common/core-v-verif.yml' of 'setup-ci' repository |
| 115 | +external: |
| 116 | + trigger: |
| 117 | + include: |
| 118 | + - project: '$CI_PROJECT_NAMESPACE/setup-ci' |
| 119 | + ref: '$SETUP_CI_EXTERNAL_BRANCH' |
| 120 | + file: 'common/core-v-verif.yml' |
| 121 | + strategy: depend |
| 122 | + variables: |
| 123 | + TAGS_RUNNER: $TAGS_RUNNER |
| 124 | + SCOPE_CVV: "true" |
| 125 | + rules: |
| 126 | + - if: '$RUN_EXTERNAL_CI == "true"' |
| 127 | + when: always |
| 128 | + - when: never |
| 129 | + |
0 commit comments