-
-
Notifications
You must be signed in to change notification settings - Fork 0
139 lines (115 loc) · 3.65 KB
/
ci.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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
name: CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
webui:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: '19'
cache: 'npm'
cache-dependency-path: 'webui/package-lock.json'
- name: build
run: |
cd webui && npm install && npm run build && cd ..
zip -r webui.zip webui/dist
- uses: actions/upload-artifact@v3
with:
name: webui
path: webui.zip
retention-days: 1
ccheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: ccheck
run: |
make ccheck
test:
runs-on: ${{ matrix.os }}
needs: webui
strategy:
matrix:
os: [ubuntu-latest]
steps:
- uses: actions/checkout@v3
- name: install clang-15 and ninja
if: ${{ runner.os == 'Linux' }}
run: |
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
sudo add-apt-repository "deb http://apt.llvm.org/focal/ llvm-toolchain-focal-15 main"
sudo apt-get update
sudo apt-get install -y clang-tools-15 clang-15 clang-tidy-15 ninja-build cppcheck gdb
- name: ffmpeg 6
if: ${{ runner.os == 'Linux' }}
run: |
sudo add-apt-repository ppa:savoury1/ffmpeg4
sudo add-apt-repository ppa:savoury1/ffmpeg6
sudo apt-get update
sudo apt-get upgrade && sudo apt-get dist-upgrade
sudo apt-get install ffmpeg
- name: install libs
if: ${{ runner.os == 'Linux' }}
run: |
sudo apt-get install -y libgd-dev libopus-dev libz-dev libssl-dev \
libavformat-dev libavcodec-dev libswscale-dev libflac-dev liblmdb-dev \
libswresample-dev
- uses: actions/download-artifact@v3
with:
name: webui
- name: make StudioLink - Linux
if: ${{ runner.os == 'Linux' }}
run: CC=clang-15 make
- name: test requirements
run: cd tests/bdd && python -m venv env && env/bin/pip install -r requirements.txt
- name: make test
run: make test
- name: clang-tidy
if: ${{ runner.os == 'Linux' }}
run: |
clang-tidy-15 -p build -checks=cert-\*,-cert-dcl37-c,-cert-dcl51-cpp,-clang-analyzer-valist.Uninitialized src/*.c
clang-tidy-15 -p build -checks=cert-\*,-cert-dcl37-c,-cert-dcl51-cpp,-clang-analyzer-valist.Uninitialized modules/**/*.c
- name: clang scan-build
if: ${{ runner.os == 'Linux' }}
run: make clean && scan-build-15 --status-bugs make
analyze:
name: CodeQL Analyze
runs-on: ubuntu-latest
needs: webui
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: install and ninja
run: |
sudo apt-get update && sudo apt-get install -y ninja-build
- name: install sound libs
if: ${{ runner.os == 'Linux' }}
run: |
sudo apt-get install -y libgd-dev libopus-dev libz-dev libssl-dev \
libavformat-dev libavcodec-dev libswscale-dev libflac-dev liblmdb-dev \
libswresample-dev
- uses: actions/cache@v3
with:
path: third_party
key: ${{ runner.os }}-gcc-${{ hashFiles('versions.mk') }}
- uses: actions/download-artifact@v3
with:
name: webui
- name: unzip webui
run: rm -Rf webui && unzip webui.zip
- run: make && make clean
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: cpp
queries: security-extended
- run: |
make
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2