-
Notifications
You must be signed in to change notification settings - Fork 22
68 lines (57 loc) · 1.95 KB
/
linux.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
name: linux
on:
pull_request:
types: [ opened, reopened, synchronize ]
workflow_dispatch:
branches: [ master ]
push:
branches: [ master ]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
permissions:
security-events: write
jobs:
linux-build:
runs-on: [ self-hosted, linux-do ]
container: voidso/nemu-ci:v1.0
env:
_JAVA_OPTIONS: -Xmx1024m
steps:
- name: Get nEMU sources
uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Configure nEMU build
run: |
cmake -G Ninja \
-DNM_WITH_NETWORK_MAP=ON -DNM_WITH_DBUS=ON -DNM_WITH_REMOTE=ON -DNM_WITH_USB=ON
- name: Build nEMU
run: cmake --build .
- name: Check with CodeQL
run: |
/codeql/codeql database create lgtm --language=cpp \
--command='cmake --build . --clean-first'
/codeql/codeql database analyze lgtm --format=sarif-latest \
--output=./codeql-lgtm.sarif cpp-lgtm.qls
/codeql/codeql github upload-results \
--repository="${GITHUB_REPOSITORY}" --ref="${GITHUB_REF}" \
--commit="${GITHUB_SHA}" --sarif=./codeql-lgtm.sarif
- name: Check with cppcheck
run: |
./ci/cppcheck-sarif.py \
-a "--enable=all --suppress=missingIncludeSystem --xml -q" \
-o ./cppcheck.sarif -p src/ ./src
/codeql/codeql github upload-results \
--repository="${GITHUB_REPOSITORY}" --ref="${GITHUB_REF}" \
--commit="${GITHUB_SHA}" --sarif=./cppcheck.sarif
- name: Check with codespell
run: |
codespell -q 3 -L fo,ser,ans,chello -S \
./lgtm,./_lgtm_detected_source_root
- name: Build nEMU out of source
run: |
rm CMakeCache.txt
mkdir build && cd build
cmake -G Ninja .. \
-DNM_WITH_NETWORK_MAP=ON -DNM_WITH_DBUS=ON -DNM_WITH_REMOTE=ON -DNM_WITH_USB=ON
cmake --build .