mirror of
https://github.com/strongswan/strongswan.git
synced 2025-10-03 00:00:24 -04:00
61 lines
1.7 KiB
YAML
61 lines
1.7 KiB
YAML
name: SonarCloud
|
|
|
|
on: [push]
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
env:
|
|
CCACHE_BASEDIR: ${{ github.workspace }}
|
|
CCACHE_COMPRESS: true
|
|
CCACHE_MAXSIZE: 200M
|
|
OS_NAME: linux
|
|
|
|
jobs:
|
|
pre-check:
|
|
runs-on: ubuntu-latest
|
|
outputs:
|
|
should_skip: ${{ steps.skip-check.outputs.should_skip }}
|
|
steps:
|
|
- id: skip-check
|
|
uses: fkirc/skip-duplicate-actions@master
|
|
with:
|
|
concurrent_skipping: 'same_content_newer'
|
|
|
|
sonarcloud:
|
|
needs: pre-check
|
|
if: ${{ needs.pre-check.outputs.should_skip != 'true' }}
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
TEST: sonarcloud
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
- uses: actions/cache@v4
|
|
with:
|
|
path: |
|
|
~/.cache/ccache
|
|
key: ccache-sonarcloud-${{ github.sha }}
|
|
restore-keys: |
|
|
ccache-sonarcloud-
|
|
- run: |
|
|
sudo apt-get install -qq ccache
|
|
echo "PATH=/usr/lib/ccache:$PATH" >> $GITHUB_ENV
|
|
ccache -z
|
|
- uses: SonarSource/sonarqube-scan-action/install-build-wrapper@v6.0.0
|
|
- run: |
|
|
echo "BUILD_WRAPPER_OUT_DIR=$HOME/bw-output" >> $GITHUB_ENV
|
|
- uses: ./.github/actions/default
|
|
- uses: SonarSource/sonarqube-scan-action@v6.0.0
|
|
env:
|
|
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
|
with:
|
|
args: >
|
|
-Dsonar.projectKey=${{ secrets.SONAR_PROJECT }}
|
|
-Dsonar.organization=${{ secrets.SONAR_ORGANIZATION }}
|
|
-Dsonar.cfamily.threads=2
|
|
-Dsonar.cfamily.compile-commands=${{ env.BUILD_WRAPPER_OUT_DIR }}/compile_commands.json
|
|
- run: ccache -s
|