Skip to content

Commit a91ab13

Browse files
authored
Sonar: set METHANE_VERSION_BUILD=0 to benefit from SonarCloud analysis cache
Having `METHANE_VERSION_BUILD` changing at each run invalidates the analysis cache, losing its benefit and leading to a full cache miss at each run.
1 parent 75f37fa commit a91ab13

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

.github/workflows/ci-sonar-scan.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,8 @@ jobs:
132132
run: |
133133
set -o pipefail
134134
mkdir -p "$INSTALL_DIR"
135-
cmake --preset ${{ matrix.config_preset }} -DMETHANE_VERSION_MAJOR=${{ env.product_ver_major }} -DMETHANE_VERSION_MINOR=${{ env.product_ver_minor }} -DMETHANE_VERSION_PATCH=${{ env.product_ver_patch }} -DMETHANE_VERSION_BUILD=${{ env.product_ver_build }} 2>&1 | tee $BUILD_LOG_FILE
135+
# set METHANE_VERSION_BUILD=0 to benefit from SonarCloud analysis cache, build version invalidates cache at each run
136+
cmake --preset ${{ matrix.config_preset }} -DMETHANE_VERSION_MAJOR=${{ env.product_ver_major }} -DMETHANE_VERSION_MINOR=${{ env.product_ver_minor }} -DMETHANE_VERSION_PATCH=${{ env.product_ver_patch }} -DMETHANE_VERSION_BUILD=0 2>&1 | tee $BUILD_LOG_FILE
136137
ls -la "$BUILD_DIR" 2>&1 | tee -a $BUILD_LOG_FILE
137138
if [ -f $COMPILE_COMMANDS_FILE ]; then
138139
cp "$COMPILE_COMMANDS_FILE" "$INSTALL_DIR"

0 commit comments

Comments
 (0)