@@ -2,7 +2,7 @@ name: 📊 CodeQL
22run-name : |
33 ${{ github.event_name == 'schedule' && '⏰ Scheduled CodeQL run' || '' }}
44 ${{ github.event_name == 'push' && format('📊 Pushed CodeQL run - {0}', github.event.head_commit.message) || '' }}
5- ${{ github.event_name == 'pull_request' && format('📊 CodeQL run for PR {0} - {1}', github.event.pull_request.number, github.event.pull_request.title) || github.event.head_commit.message }}
5+ ${{ github.event_name == 'pull_request' && format('📊 CodeQL run for PR {0} - {1}', github.event.pull_request.number, github.event.pull_request.title) || '' }}
66
77on :
88 push :
@@ -26,33 +26,49 @@ jobs:
2626 matrix :
2727 language : [ python, javascript, cpp ]
2828
29+ container :
30+ image : ghcr.io/hyperion-project/debian:bullseye-qt6
31+
2932 steps :
3033 - name : ⬇ Checkout
3134 uses : actions/checkout@v4
3235 with :
3336 submodules : recursive
3437
35- - name : 📥 Install Packages (cpp)
36- if : ${{ matrix.language == 'cpp' }}
37- run : |
38- sudo apt-get update
39- sudo apt-get install --yes git build-essential qtbase5-dev libqt5serialport5-dev libqt5websockets5-dev libqt5sql5-sqlite libqt5svg5-dev libqt5x11extras5-dev libusb-1.0-0-dev python3-dev libcec-dev libxcb-image0-dev libxcb-util0-dev libxcb-shm0-dev libxcb-render0-dev libxcb-randr0-dev libxrandr-dev libxrender-dev libavahi-core-dev libavahi-compat-libdnssd-dev libasound2-dev libturbojpeg0-dev libjpeg-dev libssl-dev libftdi1-dev
40-
41- - name : Temporarily downgrade CMake to 3.28.3 # Please remove if GitHub has updated Cmake (greater than 3.30.0)
42- uses : jwlawson/actions-setup-cmake@v2
43- with :
44- cmake-version : ' 3.28.3'
45-
4638 - name : 🔁 Initialize CodeQL
4739 uses : github/codeql-action/init@v3
4840 with :
4941 languages : ${{ matrix.language }}
5042 queries : +security-and-quality
5143 config-file : ./.github/config/codeql.yml
52-
53- - name : 👷 Autobuild
44+
45+ - name : 👷 Build (Python & JavaScript)
46+ if : ${{ matrix.language != 'cpp' }}
5447 uses : github/codeql-action/autobuild@v3
5548
49+ - name : 📥 Install jq (C++)
50+ if : ${{ matrix.language == 'cpp' }}
51+ shell : bash
52+ run : apt-get update && apt-get install -y jq
53+
54+ - name : 💾 Download Pre-Build Dependencies (C++)
55+ if : ${{ matrix.language == 'cpp' }}
56+ id : dependencies
57+ uses : ./.github/actions/download-pre-built-deps
58+ with :
59+ os : ' debian_bullseye'
60+ architecture : ' amd64'
61+ qt_version : ' 6'
62+ build_type : ${{ github.event_name == 'pull_request' && 'debug' || 'release' }}
63+
64+ - name : 👷 Build (C++)
65+ if : ${{ matrix.language == 'cpp' }}
66+ run : |
67+ cmake --preset linux-${{ env.BUILD_TYPE }} ${{ steps.dependencies.outputs.cmakeArgs }}
68+ cmake --build --preset linux-${{ env.BUILD_TYPE }}
69+ env :
70+ BUILD_TYPE : ${{ github.event_name == 'pull_request' && 'debug' || 'release' }}
71+
5672 - name : 🏃 Perform CodeQL Analysis
5773 uses : github/codeql-action/analyze@v3
5874 with :
6682 patterns : |
6783 -**/dependencies/**
6884 -**/moc_*.cpp
69- -**/libsrc/flatbufserver/hyperion_request_generated.h
70- -**/libsrc/protoserver/message.pb.cc
71- -**/libsrc/protoserver/message.pb.h
7285 input : sarif-results/${{ matrix.language }}.sarif
7386 output : sarif-results/${{ matrix.language }}.sarif
7487
8396 name : ${{ matrix.language }}.sarif
8497 path : sarif-results
8598 retention-days : 1
86-
0 commit comments