Build // Analyze #10
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build // Analyze | |
on: | |
push: | |
branches: [main, develop, release/2.7.x] | |
pull_request: | |
branches: [main, develop] | |
schedule: | |
- cron: '44 12 * * 4' | |
jobs: | |
build: | |
name: Build // ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
permissions: | |
# only required for workflows in private repositories | |
actions: read | |
contents: read | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- os: ubuntu-latest | |
build-mode: manual | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
submodules: recursive | |
- name: Install dependencies | |
if: matrix.os == 'ubuntu-latest' | |
shell: bash | |
run: | | |
sudo apt update | |
sudo apt install --no-install-recommends --yes \ | |
build-essential cmake g++ \ | |
qtbase5-dev qtbase5-private-dev qttools5-dev \ | |
qttools5-dev-tools libqt5svg5-dev libargon2-dev \ | |
libkeyutils-dev libminizip-dev libbotan-2-dev \ | |
libqrencode-dev zlib1g-dev asciidoctor libreadline-dev \ | |
libpcsclite-dev libusb-1.0-0-dev libxi-dev libxtst-dev \ | |
libqt5x11extras5-dev | |
- shell: bash | |
name: Configure | |
run: | | |
cmake -DWITH_XC_ALL=ON -DWITH_TESTS=OFF -B .build -S . | |
- shell: bash | |
name: Build | |
run: | | |
cmake --build .build | |
analyze: | |
name: Analyze (${{ matrix.language }}) | |
needs: build | |
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }} | |
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 | |
- language: go | |
build-mode: autobuild | |
- language: javascript-typescript | |
build-mode: none | |
- language: python | |
build-mode: none | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
submodules: recursive | |
- name: Install dependencies | |
shell: bash | |
run: | | |
sudo apt update | |
sudo apt install --no-install-recommends --yes \ | |
build-essential cmake g++ \ | |
qtbase5-dev qtbase5-private-dev qttools5-dev \ | |
qttools5-dev-tools libqt5svg5-dev libargon2-dev \ | |
libkeyutils-dev libminizip-dev libbotan-2-dev \ | |
libqrencode-dev zlib1g-dev asciidoctor libreadline-dev \ | |
libpcsclite-dev libusb-1.0-0-dev libxi-dev libxtst-dev \ | |
libqt5x11extras5-dev | |
# Initializes the CodeQL tools for scanning. | |
- name: Initialize CodeQL | |
uses: github/codeql-action/init@v3 | |
with: | |
languages: ${{ matrix.language }} | |
build-mode: ${{ matrix.build-mode }} | |
- if: matrix.build-mode == 'manual' | |
shell: bash | |
name: Build C++ | |
run: | | |
mkdir build && cd build | |
cmake -DWITH_XC_ALL=ON -DWITH_TESTS=OFF .. | |
make -j $(nproc) | |
- name: Perform CodeQL Analysis | |
uses: github/codeql-action/analyze@v3 | |
with: | |
category: "/language:${{matrix.language}}" |