Serial-Studio/.github/workflows/codeql-analysis.yml

70 lines
1.6 KiB
YAML
Raw Normal View History

2021-09-24 00:47:02 -05:00
name: "CodeQL"
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
schedule:
- cron: '15 15 * * 0'
2022-05-01 20:47:14 -05:00
env:
VERSION: "1.2.0"
QMAKE_PROJECT: "Serial-Studio.pro"
QT_VERSION: 6.3.0
QMAKE: qmake6
CORES: 16
2021-09-24 00:47:02 -05:00
jobs:
analyze:
2022-05-01 20:47:14 -05:00
name: '💭 Analyze (Ubuntu 20.04)'
runs-on: ubuntu-20.04
2021-09-24 00:47:02 -05:00
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
language: [ 'cpp' ]
steps:
2021-09-24 00:56:09 -05:00
- name: '🧰 Checkout'
2021-09-24 00:47:02 -05:00
uses: actions/checkout@v2
2021-09-24 00:56:09 -05:00
with:
submodules: recursive
2021-09-24 00:47:02 -05:00
2022-05-01 20:55:21 -05:00
- name: '⚙️ Initialize CodeQL'
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}
2021-09-24 00:56:09 -05:00
- name: '⚙️ Cache Qt'
id: cache-qt
uses: actions/cache@v1
with:
path: ../Qt
2022-05-01 20:47:14 -05:00
key: ${{runner.os}}-qtcachedir-${{env.QT_VERSION}}
2021-09-24 00:47:02 -05:00
2021-09-24 00:56:09 -05:00
- name: '⚙️ Install Qt'
uses: jurplel/install-qt-action@v2
with:
2022-05-01 20:47:14 -05:00
version: ${{env.QT_VERSION}}
modules: qtserialport qt5compat qtconnectivity
2021-09-30 19:49:01 -05:00
aqtversion: '==2.0.0'
2021-09-24 00:56:09 -05:00
cached: ${{steps.cache-qt.outputs.cache-hit}}
2022-05-01 20:47:14 -05:00
2021-09-24 00:56:09 -05:00
- name: '⚙️ Install dependencies'
run: |
sudo apt-get update
sudo apt-get install libgl1-mesa-dev libxkbcommon-x11-0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-render-util0 libxcb-xinerama0 libzstd-dev
2022-05-01 20:47:14 -05:00
2021-09-24 00:56:09 -05:00
- name: '🚧 Compile application'
run: |
2022-05-01 20:47:14 -05:00
${{env.QMAKE}} ${{env.QMAKE_PROJECT}} CONFIG+=release PREFIX=/usr
make -j${{env.CORES}}
2021-09-24 00:56:09 -05:00
- name: '💭 Perform CodeQL Analysis'
2021-09-24 00:47:02 -05:00
uses: github/codeql-action/analyze@v1