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.ref }}:${{ github.sha }}
39 ccache-sonarcloud-${{ github.ref }}:
42 sudo apt-get install -qq ccache
43 echo "PATH=/usr/lib/ccache:$PATH" >> $GITHUB_ENV
45 # using SonarSource/sonarcloud-github-action is currently not recommended
46 # for C builds, so we follow the "any CI" instructions
47 - name: Install sonar-scanner
49 SONAR_SCANNER_VERSION: 4.6.2.2472
51 export SONAR_SCANNER_HOME=$HOME/.sonar/sonar-scanner-$SONAR_SCANNER_VERSION-linux
52 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
53 unzip -o $HOME/.sonar/sonar-scanner.zip -d $HOME/.sonar/
54 echo "SONAR_SCANNER_OPTS=-server" >> $GITHUB_ENV
55 curl --create-dirs -sSLo $HOME/.sonar/build-wrapper-linux-x86.zip https://sonarcloud.io/static/cpp/build-wrapper-linux-x86.zip
56 unzip -o $HOME/.sonar/build-wrapper-linux-x86.zip -d $HOME/.sonar/
57 echo "PATH=$HOME/.sonar/build-wrapper-linux-x86:$SONAR_SCANNER_HOME/bin:$PATH" >> $GITHUB_ENV
59 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
60 BUILD_NUMBER: ${{ github.run_id }}
61 SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
62 SONAR_PROJECT: ${{ secrets.SONAR_PROJECT }}
63 SONAR_ORGANIZATION: ${{ secrets.SONAR_ORGANIZATION }}
64 uses: ./.github/actions/default