-
Notifications
You must be signed in to change notification settings - Fork 96
100 lines (98 loc) · 2.83 KB
/
test.yml
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
on:
push:
branches:
- main
- branch-*
paths-ignore:
- "**.md"
- "**/COPYING"
- "**/README*"
- "config/**"
- "contrib/**"
- "distrib/**"
- "doc/**"
- "COPYING"
- "COPYRIGHT"
- "Dockerfile*"
pull_request:
branches:
- main
- branch-*
types:
- opened
- synchronize
- reopened
paths-ignore:
- "**.md"
- "**/COPYING"
- "**/README*"
- "config/**"
- "contrib/**"
- "distrib/**"
- "doc/**"
- "COPYING"
- "COPYRIGHT"
- "Dockerfile*"
name: Tests
jobs:
static_analysis:
name: Static Analysis
runs-on: ubuntu-latest
# Run only if not originating from a fork
if: ${{ !github.event.pull_request.head.repo.fork }}
env:
BUILD_WRAPPER_OUT_DIR: build_wrapper_output_directory
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install Build Wrapper
uses: SonarSource/sonarqube-scan-action/install-build-wrapper@v4
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install --assume-yes --no-install-recommends \
bison \
cracklib-runtime \
flex \
libacl1-dev \
libavahi-client-dev \
libcrack2-dev \
libcups2-dev \
libdb-dev \
libdbus-1-dev \
libevent-dev \
libgcrypt20-dev \
libglib2.0-dev \
libiniparser-dev \
libkrb5-dev \
libldap2-dev \
libmariadb-dev \
libpam0g-dev \
libtalloc-dev \
libtirpc-dev \
libtracker-sparql-3.0-dev \
libwrap0-dev \
meson \
ninja-build \
systemtap-sdt-dev \
tracker-miner-fs
- name: Run build wrapper
run: |
mkdir -p ${{ env.BUILD_WRAPPER_OUT_DIR }}
meson setup build \
-Dbuildtype=debug \
-Dwith-appletalk=true \
-Dwith-docs= \
-Dwith-init-style=none \
-Dwith-tests=true \
-Dwith-testsuite=true
build-wrapper-linux-x86-64 --out-dir ${{ env.BUILD_WRAPPER_OUT_DIR }} meson compile -C build
- name: Run SonarQube scan
uses: sonarsource/sonarqube-scan-action@v4
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
with:
args: >
--define sonar.cfamily.compile-commands="${{ env.BUILD_WRAPPER_OUT_DIR }}/compile_commands.json"