Debian Codegraph @

.github/workflows/codeql.yml

raw
1 name: "CodeQL Advanced"
2
3 on:
4 pull_request:
5 branches:
6 - amd-staging
7 push:
8 branches:
9 - amd-staging
10 schedule:
11 - cron: '34 18 * * 5'
12
13 jobs:
14 analyze:
15 name: Analyze (${{ matrix.language }})
16 # Runner size impacts CodeQL analysis time. To learn more, please see:
17 # - https://gh.io/recommended-hardware-resources-for-running-codeql
18 # - https://gh.io/supported-runners-and-hardware-resources
19 # - https://gh.io/using-larger-runners (GitHub.com only)
20 # Consider using larger runners or machines with greater resources for possible analysis time improvements.
21 runs-on: ${{ 'ubuntu-latest' }}
22 permissions:
23 # required for all workflows
24 security-events: write
25
26 # required to fetch internal or private CodeQL packs
27 packages: read
28
29 # only required for workflows in private repositories
30 actions: read
31 contents: read
32
33 strategy:
34 fail-fast: false
35 matrix:
36 include:
37 - language: c-cpp
38 build-mode: manual
39
40 steps:
41 - name: Checkout repository
42 uses: actions/checkout@v4
43
44 - name: Set up Python
45 uses: actions/setup-python@v5
46 with:
47 python-version: '3.12.6'
48
49 - name: Install CMake
50 run: python3 -m pip install cmake
51
52 - name: Install Virtualenv
53 run: python3 -m pip install virtualenv
54
55 - name: Install g++
56 run: sudo apt-get install -y g++
57
58 - name: Install libdrm
59 run: sudo apt-get install -y libdrm-dev
60
61 - name: Install DOxygen
62 run: sudo apt-get install -y doxygen
63
64 - name: Install LaTeX
65 run: sudo apt-get install -y texlive
66
67 - name: Clean old ROCm directories
68 run: |
69 sudo rm -rf /opt/rocm
70 sudo rm -rf /opt/rocm-*
71
72 # Initializes the CodeQL tools for scanning.
73 - name: Initialize CodeQL
74 uses: github/codeql-action/init@v3
75 with:
76 languages: ${{ matrix.language }}
77 build-mode: ${{ matrix.build-mode }}
78 queries: security-extended
79
80 - name: Create build directory
81 run: mkdir -p build
82
83 - name: Build AMD SMI Library
84 run: |
85 cd build
86 cmake ..
87 make -j $(nproc)
88
89 - name: Perform CodeQL Analysis
90 uses: github/codeql-action/analyze@v3
91 with:
92 category: "/language:${{matrix.language}}"