Skip to content

Rework watchdogs, FOTA, and centralize connectivity to main #150

Rework watchdogs, FOTA, and centralize connectivity to main

Rework watchdogs, FOTA, and centralize connectivity to main #150

Workflow file for this run

name: Sonarcloud
on:
workflow_call:
workflow_dispatch:
pull_request:
types: [opened, synchronize, reopened]
paths:
- '**/*.c'
- '**/*.h'
- .github/workflows/sonarcloud.yml
- sonar-project.properties
- west.yml
- '**/CMakeLists.txt'
- '**/Kconfig*'
- '**/prj.conf'
permissions:
contents: read
pull-requests: write
concurrency:
group: sonarcloud-${{ github.event.pull_request.number || github.run_id }}
cancel-in-progress: true
jobs:
analyze:
name: Build and analyze
runs-on: self-hosted
container: ghcr.io/zephyrproject-rtos/ci:v0.29.2
env:
BUILD_WRAPPER_OUT_DIR: build_wrapper_output_directory
CMAKE_PREFIX_PATH: /opt/toolchains
steps:
- uses: actions/checkout@v6
with:
ref: ${{ github.event.pull_request.head.sha || github.sha }}
fetch-depth: 0
path: serial-modem-host-applications
- name: Fetch base branch for SonarCloud PR analysis
if: github.event_name == 'pull_request'
working-directory: serial-modem-host-applications
run: git fetch origin ${{ github.base_ref }}:${{ github.base_ref }}
- name: Initialize West workspace
uses: ./serial-modem-host-applications/.github/actions/west-init
- name: Install build wrapper dependencies
run: |
apt-get update && apt-get install --no-install-recommends -y curl
- name: Install Build Wrapper
uses: SonarSource/sonarqube-scan-action/install-build-wrapper@299e4b793aaa83bf2aba7c9c14bedbb485688ec4 # v7.1.0
- name: Build with build wrapper
working-directory: serial-modem-host-applications/applications
run: |
cd 91m1_ppp
build-wrapper-linux-x86-64 --out-dir ../../${{ env.BUILD_WRAPPER_OUT_DIR }} \
west build -b nrf54l15dk/nrf54l15/cpuapp/ns -p
cd ../93m1_ppp
build-wrapper-linux-x86-64 --out-dir ../../${{ env.BUILD_WRAPPER_OUT_DIR }} \
west build -b nrf93m1dk/nrf54l15/cpuapp/ns -p
cd ../93m1_at
build-wrapper-linux-x86-64 --out-dir ../../${{ env.BUILD_WRAPPER_OUT_DIR }} \
west build -b nrf93m1dk/nrf54l15/cpuapp/ns -p
- name: SonarQube Scan
uses: SonarSource/sonarqube-scan-action@299e4b793aaa83bf2aba7c9c14bedbb485688ec4 # v7.1.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
with:
args: |
--define sonar.cfamily.compile-commands=serial-modem-host-applications/${{ env.BUILD_WRAPPER_OUT_DIR }}/compile_commands.json
projectBaseDir: serial-modem-host-applications