Repository navigation
100 lines (87 loc) · 3.03 KB
/
Copy pathtics.yml
File metadata and controls
100 lines (87 loc) · 3.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
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:
# 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]
permissions:
checks: write
contents: read
pull-requests: write
env:
NEEDRESTART_SUSPEND: yes
DEBIAN_FRONTEND: noninteractive
TICS_CHANGED_LIST: tics_changed.list
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
# Need history to determine changed files
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 \
gcovr \
lcov \
libapparmor-dev \
libboost-filesystem-dev \
libboost-iostreams-dev \
libboost-system-dev \
libgtest-dev \
libgmock-dev \
libfreetype6-dev \
libmiral-dev \
libmirserver-dev \
libmirserver-internal-dev \
libmircommon-dev \
mirtest-dev \
mir-wlcs-integration \
libwayland-dev \
ninja-build \
pkg-config
- name: Set up Flutter
uses: subosito/flutter-action@1a449444c387b1966244ae4d4f8c696479add0b2 # v2.23.0
with:
cache: true
- name: Build
run: |
cmake -Bbuild -GNinja -DENABLE_COVERAGE=ON src
cmake --build build
- name: Measure coverage
run: |
cmake --build build --target coverage_html
- 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: ubuntu-frame
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