|
23 | 23 |
|
24 | 24 | runs-on: ubuntu-latest |
25 | 25 | env: |
26 | | - TRAVIS_BRANCH: ${{ github.base_ref }} |
| 26 | + TRAVIS_BRANCH: ${{ github.base_ref }} |
27 | 27 | TRAVIS_PULL_REQUEST_REPO: ${{ github.event.pull_request.head.repo.html_url }} |
28 | 28 | TRAVIS_PULL_REQUEST_BRANCH: ${{ github.head_ref }} |
29 | 29 | BASE_COMMIT: ${{ github.event.pull_request.base.sha }} |
|
48 | 48 | PATH=/usr/lib/llvm-20/bin:${PATH} |
49 | 49 | .ci/format_script.sh |
50 | 50 |
|
| 51 | + clang-tidy: |
| 52 | + # For any event that is not a PR, the CI will always run. In PRs, the CI |
| 53 | + # can be skipped if the tag [skip-ci] is written in the title. |
| 54 | + if: | |
| 55 | + (github.repository_owner == 'root-project' && github.event_name != 'pull_request') || |
| 56 | + (github.event_name == 'pull_request' && !( |
| 57 | + contains(github.event.pull_request.title, '[skip-ci]') || |
| 58 | + contains(github.event.pull_request.labels.*.name, 'skip ci') || |
| 59 | + contains(github.event.pull_request.labels.*.name, 'skip code analysis') |
| 60 | + )) |
| 61 | +
|
| 62 | + runs-on: |
| 63 | + - self-hosted |
| 64 | + - linux |
| 65 | + - x64 |
| 66 | + |
| 67 | + container: |
| 68 | + image: registry.cern.ch/root-ci/alma10:buildready |
| 69 | + options: '--security-opt label=disable --rm' |
| 70 | + env: |
| 71 | + OS_APPLICATION_CREDENTIAL_ID: '7f5b64a265244623a3a933308569bdba' |
| 72 | + OS_APPLICATION_CREDENTIAL_SECRET: ${{ secrets.OS_APPLICATION_CREDENTIAL_SECRET }} |
| 73 | + OS_AUTH_TYPE: 'v3applicationcredential' |
| 74 | + OS_AUTH_URL: 'https://keystone.cern.ch/v3' |
| 75 | + OS_IDENTITY_API_VERSION: 3 |
| 76 | + OS_INTERFACE: 'public' |
| 77 | + OS_REGION_NAME: 'cern' |
| 78 | + PYTHONUNBUFFERED: true |
| 79 | + |
| 80 | + env: |
| 81 | + TRAVIS_BRANCH: ${{ github.base_ref }} |
| 82 | + TRAVIS_PULL_REQUEST_REPO: ${{ github.event.pull_request.head.repo.html_url }} |
| 83 | + TRAVIS_PULL_REQUEST_BRANCH: ${{ github.head_ref }} |
| 84 | + BASE_COMMIT: ${{ github.event.pull_request.base.sha }} |
| 85 | + |
| 86 | + steps: |
| 87 | + - uses: actions/checkout@v6 |
| 88 | + with: |
| 89 | + fetch-depth: 1 |
| 90 | + ref: ${{ github.event.pull_request.head.sha }} |
| 91 | + path: ROOT-CI/src |
| 92 | + - name: Fetch base sha |
| 93 | + run: cd ROOT-CI/src && git fetch --depth=1 origin +${{github.event.pull_request.base.sha}}:origin/base_sha |
| 94 | + - name: Determine merge base |
| 95 | + run: echo "MERGE_BASE=$(cd ROOT-CI/src && git merge-base ${{ github.event.pull_request.base.sha }} HEAD)" >> $GITHUB_ENV |
| 96 | + - name: run clang-tidy script |
| 97 | + run: | |
| 98 | + ROOT-CI/src/.ci/tidy_script.sh |
| 99 | +
|
51 | 100 | ruff: |
52 | 101 | if: | |
53 | 102 | (github.repository_owner == 'root-project' && github.event_name != 'pull_request') || |
|
0 commit comments