6 CCACHE_BASEDIR: ${{ github.workspace }}
13 runs-on: ubuntu-latest
15 should_skip: ${{ steps.skip-check.outputs.should_skip }}
18 uses: fkirc/skip-duplicate-actions@master
20 concurrent_skipping: 'same_content'
24 if: ${{ needs.pre-check.outputs.should_skip != 'true' }}
25 runs-on: ubuntu-latest
29 - uses: actions/checkout@v2
32 - uses: actions/cache@v2
37 key: ccache-sonarcloud-${{ github.sha }}
41 sudo apt-get install -qq ccache
42 echo "PATH=/usr/lib/ccache:$PATH" >> $GITHUB_ENV
44 # using SonarSource/sonarcloud-github-action is currently not recommended
45 # for C builds, so we follow the "any CI" instructions
46 - name: Install sonar-scanner
48 SONAR_SCANNER_VERSION: 4.6.2.2472
50 export SONAR_SCANNER_HOME=$HOME/.sonar/sonar-scanner-$SONAR_SCANNER_VERSION-linux
51 curl --create-dirs -sSLo $HOME/.sonar/sonar-scanner.zip https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-$SONAR_SCANNER_VERSION-linux.zip
52 unzip -o $HOME/.sonar/sonar-scanner.zip -d $HOME/.sonar/
53 echo "SONAR_SCANNER_OPTS=-server" >> $GITHUB_ENV
54 curl --create-dirs -sSLo $HOME/.sonar/build-wrapper-linux-x86.zip https://sonarcloud.io/static/cpp/build-wrapper-linux-x86.zip
55 unzip -o $HOME/.sonar/build-wrapper-linux-x86.zip -d $HOME/.sonar/
56 echo "PATH=$HOME/.sonar/build-wrapper-linux-x86:$SONAR_SCANNER_HOME/bin:$PATH" >> $GITHUB_ENV
58 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
59 BUILD_NUMBER: ${{ github.run_id }}
60 SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
61 SONAR_PROJECT: ${{ secrets.SONAR_PROJECT }}
62 SONAR_ORGANIZATION: ${{ secrets.SONAR_ORGANIZATION }}
63 uses: ./.github/actions/default