-
Notifications
You must be signed in to change notification settings - Fork 1.2k
69 lines (58 loc) · 2.05 KB
/
codeql-analysis.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
name: "Code Scanning - Action"
on:
push:
branches:
- main
- "[0-9]+.[0-9]+.x"
pull_request:
branches:
- main
- "[0-9]+.[0-9]+.x"
permissions: {}
jobs:
CodeQL-Build:
runs-on: ubuntu-20.04
permissions:
security-events: write
strategy:
matrix:
language: ["go", "javascript", "python", "cpp"]
steps:
- name: Checkout repository
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
with:
fetch-depth: 0
- name: Setup Python3
uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0
with:
python-version: "3.11.8"
cache: "pip"
- run: pip3 install -r requirements.txt
- name: Setup env variables
run: |
echo "CGO_LDFLAGS= -L${GITHUB_WORKSPACE}/rtloader/build/rtloader -ldl " >> $GITHUB_ENV
echo "CGO_CFLAGS= -I${GITHUB_WORKSPACE}/rtloader/include -I${GITHUB_WORKSPACE}/rtloader/common " >> $GITHUB_ENV
- uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
go-version-file: ".go-version"
- name: Initialize CodeQL
uses: github/codeql-action/init@afb54ba388a7dca6ecae48f608c4ff05ff4cc77a # v3.25.15
with:
languages: ${{ matrix.language }}
config: |
paths-ignore:
- rtloader/build/rtloader/CMakeFiles/datadog-agent-rtloader.dir
- rtloader/build/three/CMakeFiles/datadog-agent-three.dir
- rtloader/build/test/CMakeFiles/run.dir
- rtloader/build/CMakeFiles/clang-format.dir
- name: Set Swap Space
uses: pierotofy/set-swap-space@49819abfb41bd9b44fb781159c033dba90353a7c
with:
swap-size-gb: 10
- name: Build DataDog agent
run: |
invoke install-tools
invoke deps
invoke agent.build --build-exclude=systemd
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@afb54ba388a7dca6ecae48f608c4ff05ff4cc77a # v3.25.15