Skip to content

Cleanups for AbstractTree (#558) #1200

Cleanups for AbstractTree (#558)

Cleanups for AbstractTree (#558) #1200

Workflow file for this run

name: Code-Quality
on:
push:
branches:
- master
pull_request:
branches:
- master
workflow_dispatch:
env:
WORK_DIR: ${{github.workspace}}/JUCE_modules/chowdsp_utils
jobs:
clang_tidy:
name: "Run Code Quality Check: clang-tidy"
runs-on: ubuntu-22.04
steps:
- name: Install Linux Deps
run: |
sudo apt-get update
sudo apt install libasound2-dev libcurl4-openssl-dev libx11-dev libxinerama-dev libxext-dev libfreetype6-dev libwebkit2gtk-4.0-dev libglu1-mesa-dev libsamplerate-dev
- name: Install clang-tidy
run: |
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh 14
sudo apt-get install clang-tidy-14
clang-tidy-14 --version
- name: Get latest CMake
uses: lukka/get-cmake@latest
- name: Checkout code
uses: actions/checkout@v2
with:
path: ${{env.WORK_DIR}}
- name: Set up environment
working-directory: ${{github.workspace}}
run: |
git clone --depth 1 --branch 7.0.6 https://github.com/juce-framework/JUCE.git
cd JUCE_modules
git clone --single-branch --branch chowdsp https://github.com/Chowdhury-DSP/foleys_gui_magic.git
git clone --single-branch --branch main --recursive https://github.com/free-audio/clap-juce-extensions.git
- name: Configure
working-directory: ${{env.WORK_DIR}}
shell: bash
run: cmake -Bbuild -DCHOWDSP_ENABLE_TESTING=ON -DCHOWDSP_CODE_QUALITY_CHECKS=ON -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_BUILD_TYPE=Debug
- name: Run clang-tidy
working-directory: ${{env.WORK_DIR}}
shell: bash
run: cmake --build build --parallel 4 --target chowdsp_utils_clang_tidy
sonar_scan:
name: "Run Code Quality Check: sonar-scan"
runs-on: ubuntu-22.04
env:
BUILD_WRAPPER_OUT_DIR: build_wrapper_output_directory # Directory where build-wrapper output will be placed
steps:
- name: Install Linux Deps
run: |
sudo apt-get update
sudo apt install libasound2-dev libcurl4-openssl-dev libx11-dev libxinerama-dev libxext-dev libfreetype6-dev libwebkit2gtk-4.0-dev libglu1-mesa-dev libsamplerate-dev
- name: Get latest CMake
uses: lukka/get-cmake@latest
- name: Checkout code
uses: actions/checkout@v2
with:
path: ${{env.WORK_DIR}}
fetch-depth: 0
- name: Install sonar-scanner and build-wrapper
uses: SonarSource/sonarcloud-github-c-cpp@v2
- name: Set up environment
working-directory: ${{github.workspace}}
run: |
git clone --depth 1 --branch 7.0.1 https://github.com/juce-framework/JUCE.git
cd JUCE_modules
git clone --single-branch --branch chowdsp https://github.com/Chowdhury-DSP/foleys_gui_magic.git
git clone --single-branch --branch main --recursive https://github.com/free-audio/clap-juce-extensions.git
- name: Configure
working-directory: ${{env.WORK_DIR}}
shell: bash
run: cmake -Bbuild -DCHOWDSP_ENABLE_TESTING=ON -DCHOWDSP_CODE_QUALITY_CHECKS=ON -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_BUILD_TYPE=Release
- name: Build
working-directory: ${{env.WORK_DIR}}
shell: bash
run: build-wrapper-linux-x86-64 --out-dir ${{ env.BUILD_WRAPPER_OUT_DIR }} cmake --build build --parallel 4 --target chowdsp_utils_codeql
- name: Run sonar-scanner
working-directory: ${{env.WORK_DIR}}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: |
sonar-scanner --define sonar.cfamily.build-wrapper-output="${{ env.BUILD_WRAPPER_OUT_DIR }}"
code_ql:
name: "Run Code Quality Check: CodeQL"
runs-on: ubuntu-22.04
if: ${{ github.event_name == 'push' }}
steps:
- name: Install Linux Deps
run: |
sudo apt-get update
sudo apt install libasound2-dev libcurl4-openssl-dev libx11-dev libxinerama-dev libxext-dev libfreetype6-dev libwebkit2gtk-4.0-dev libglu1-mesa-dev libsamplerate-dev
- name: Get latest CMake
uses: lukka/get-cmake@latest
- name: Checkout code
uses: actions/checkout@v2
with:
path: ${{env.WORK_DIR}}
fetch-depth: 0
- name: Set up environment
working-directory: ${{github.workspace}}
run: |
git clone --depth 1 --branch 7.0.1 https://github.com/juce-framework/JUCE.git
cd JUCE_modules
git clone --single-branch --branch chowdsp https://github.com/Chowdhury-DSP/foleys_gui_magic.git
git clone --single-branch --branch main --recursive https://github.com/free-audio/clap-juce-extensions.git
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
source-root: ${{env.WORK_DIR}}
languages: cpp
- name: Configure
working-directory: ${{env.WORK_DIR}}
shell: bash
run: cmake -Bbuild -DCHOWDSP_ENABLE_TESTING=ON -DCHOWDSP_CODE_QUALITY_CHECKS=ON -DCMAKE_BUILD_TYPE=Debug
- name: Build
working-directory: ${{env.WORK_DIR}}
shell: bash
run: cmake --build build --config Debug --parallel 4 --target chowdsp_utils_codeql
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2