Skip to content

Ship C sources and version.mk in the python sdist #251

Ship C sources and version.mk in the python sdist

Ship C sources and version.mk in the python sdist #251

Workflow file for this run

# SonarCloud analysis. Auth uses the SONAR_TOKEN repo secret, which expires
# (SonarCloud caps token lifetime at ~1 year). Because this repo changes
# infrequently, the token often expires unnoticed and the next push/PR fails
# here. C/C++ requires this token-based CI analysis, so the token can't be
# dropped. To rotate it:
# 1. Generate a new token at https://sonarcloud.io/account/security
# (type: Project Analysis Token, project: manugarg_pacparser, max expiry).
# 2. Update the repo secret:
# gh secret set SONAR_TOKEN --repo manugarg/pacparser
# (or GitHub UI: Settings > Secrets and variables > Actions > SONAR_TOKEN)
# 3. Re-run this workflow (or push) to confirm the analysis passes.
name: SonarCloud
on:
push:
branches:
- main
pull_request:
types: [opened, synchronize, reopened]
permissions: read-all
jobs:
build:
name: Analyze
if: github.repository == 'manugarg/pacparser' && (github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: Install bear
run: sudo apt install -y bear
- name: Generate compilation database
run: |
make -C src clean
bear -- make -C src
- name: SonarCloud Scan
uses: SonarSource/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}