forked from qualcomm/userspace-resource-manager
-
Notifications
You must be signed in to change notification settings - Fork 0
74 lines (64 loc) · 2.23 KB
/
codeql.yml
File metadata and controls
74 lines (64 loc) · 2.23 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
name: "CodeQL Advanced"
on:
push:
branches: [ "main", "development" ]
pull_request:
branches: [ "main" ]
jobs:
analyze:
name: Analyze (${{ matrix.language }})
runs-on: ubuntu-24.04
# CodeQL is not supported on arm64. Hence, we are going ahead with default Ubuntu 24.04
# Use below runners when supported !
# group: GHA-CSEPerf-prd-SelfHosted-RG
# labels: [self-hosted, cseperf-prd-u2204-arm64-xlrg-od-ephem]
permissions:
# required for all workflows
security-events: write
# required to fetch internal or private CodeQL packs
packages: read
# only required for workflows in private repositories
actions: read
contents: read
strategy:
fail-fast: false
matrix:
include:
- language: c-cpp
build-mode: manual
steps:
- name: Checkout repository
uses: actions/checkout@v4
# Add any setup steps before running the `github/codeql-action/init` action.
# This includes steps like installing compilers or runtimes (`actions/setup-node`
# or others). This is typically only required for manual builds.
# - name: Setup runtime (example)
# uses: actions/setup-example@v1
- name: Install dependencies
run: |
sudo apt update
sudo apt-get install -y gcc-aarch64-linux-gnu
sudo apt-get install -y python3-pip swig yamllint
sudo apt-get install -y python3-setuptools python3-wheel
sudo apt-get install -y cmake pkg-config libyaml-dev
sudo apt-get install -y libsystemd-dev
sudo apt-get install -y libyaml-cpp-dev
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v4
with:
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}
queries: security-extended
- name: Run manual build steps
if: matrix.build-mode == 'manual'
shell: bash
run: |
mkdir -p build
cd build
cmake .. -DBUILD_TESTS=ON -DCMAKE_INSTALL_PREFIX="${URM_INSTALL_PREFIX}"
cmake --build .
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v4
with:
category: "/language:${{matrix.language}}"