| name: TICS |
| |
| on: |
| push: |
| branches: |
| - main |
| pull_request: |
| types: [opened, synchronize, reopened, ready_for_review] |
| merge_group: |
| types: [checks_requested] |
| workflow_dispatch: |
| |
| permissions: {} |
| |
| jobs: |
| TICS: |
| permissions: |
| contents: read |
| # Only run if we have access to secrets. |
| if: github.event_name != 'pull_request' || github.repository == github.event.pull_request.head.repo.full_name |
| |
| runs-on: [self-hosted, reactive, amd64, tiobe, noble] |
| |
| env: |
| NEEDRESTART_SUSPEND: yes |
| DEBIAN_FRONTEND: noninteractive |
| TICS_CHANGED_LIST: tics_changed.list |
| |
| steps: |
| - name: Checkout |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 |
| with: |
| fetch-depth: 2 |
| persist-credentials: false |
| |
| - name: Install dependencies |
| run: | |
| sudo add-apt-repository --yes ppa:mir-team/dev |
| sudo apt install --yes \ |
| build-essential \ |
| cmake \ |
| google-mock \ |
| libboost-dev \ |
| libgtest-dev \ |
| libwayland-dev \ |
| ninja-build \ |
| pkg-config |
| |
| - name: Build |
| run: | |
| cmake -Bbuild -GNinja . |
| cmake --build build |
| |
| - name: Get changed files |
| if: github.event_name == 'merge_group' |
| run: | |
| # Every merge_group event runs for one pull request, so we can diff against parent |
| git diff --name-only ${{ github.sha }}~1 ${{ github.sha }} >> $TICS_CHANGED_LIST |
| |
| - name: Run TICS analysis |
| uses: tiobe/tics-github-action@333078bc527399e5916a166bd1a3a788be5a01a9 # v3.12.0 |
| with: |
| mode: ${{ contains(fromJSON('["pull_request", "merge_group"]'), github.event_name) && 'client' || 'qserver' }} |
| project: wlcs |
| viewerUrl: https://canonical.tiobe.com/tiobeweb/TICS/api/cfg?name=default |
| ticsAuthToken: ${{ secrets.TICSAUTHTOKEN }} |
| installTics: true |
| filelist: ${{ github.event_name == 'merge_group' && env.TICS_CHANGED_LIST || '' }} |
| # FIXME: workaround for a TICS bug |
| additionalFlags: ${{ contains(fromJSON('["pull_request", "merge_group"]'), github.event_name) && '-resultdir build' || '' }} |
| |
| - if: ${{ failure() && runner.debug }} |
| name: Setup tmate session |
| uses: canonical/action-tmate@bda82e73586a62bf621881aab872a527c8a46e2d # main @ 2026-03-02 |
| with: |
| limit-access-to-actor: true |