- ALM used: GitHub
- CI system used: GitHub Actions
- Scanner command used: SonarSource/sonarcloud-github-action@master GitHub Action
- Languages of the repository: C++
- The URLs:
- SonarCloud scan run:
- project build job definition: https://github.com/web-eid/libpcsc-mock/blob/main/.github/workflows/cmake-linux-ubuntu.yml
I would like to use the SonarCloud GitHub Action in a C++ project that requires Docker for building. The problem is that the SonarCloud GitHub Action itself launches a Docker container, so as far as I can see, a Docker-in-Docker (DinD) solution is needed.
The C++ project requires large Qt and OpenSSL development packages, so running it outside Docker is infeasible as GitHub Action VMs do not cache packages.
I envision the following steps:
- run the job in a Docker container:
jobs:
build:
runs-on: ubuntu-latest
container: mrts/qt-cmake-gtest-valgrind-ubuntu:v1.8
- checkout code with
actions/checkout
- run
cmake
to create theMakefile
- run
build-wrapper-linux-x86-64 make
to run the build and gather all the information required for analysis - run the analysis with
SonarSource/sonarcloud-github-action
using the output of the previous step.
Do you have any recommendations for this situation?