diff --git a/.github/workflows/sonar_cloud.yml b/.github/workflows/sonar_cloud.yml index eed99603f..04652618c 100644 --- a/.github/workflows/sonar_cloud.yml +++ b/.github/workflows/sonar_cloud.yml @@ -64,6 +64,9 @@ jobs: name: sonar_cloud_run runs-on: ubuntu-latest needs: build + env: + ARTIFACTS_DIR: build_artifacts + COMPILE_COMMANDS_DIR: build_compile_commands steps: # update when https://github.com/actions/download-artifact/issues/315 is fixed @@ -71,11 +74,11 @@ jobs: uses: actions/download-artifact@v3 with: name: compile-commands - path: ${RUNNER_WORKSPACE} + path: "${{ env.ARTIFACTS_DIR }}" - name: Unzip downloaded JSON compile commands file run: | - unzip "${RUNNER_WORKSPACE}"/compile-commands.zip -d "${{ env.BUILD_WRAPPER_OUT_DIR }}" + unzip "${{ env.ARTIFACTS_DIR }}/compile-commands.zip -d "${{ env.COMPILE_COMMANDS_DIR }}" - name: Run sonar-scanner env: @@ -92,4 +95,4 @@ jobs: --define sonar.tests="compiler/extensions/cpp/runtime/test,test" \ --define sonar.test.inclusions="compiler/**/test/**/*.h,compiler/**/test/**/.cpp,test/**/*.h,test/**/*.cpp" \ --define sonar.scm.exclusions.disabled="true" \ - --define sonar.cfamily.compile-commands="${{ env.BUILD_WRAPPER_OUT_DIR }}/compile_commands.json" + --define sonar.cfamily.compile-commands="${{ env.COMPILE_COMMANDS_DIR }}/compile_commands.json"