Skip to content

Commit

Permalink
Upload build artifact for the sonar scan (#2321)
Browse files Browse the repository at this point in the history
  • Loading branch information
git-hulk authored May 19, 2024
1 parent d5b724a commit 60c1f7e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/kvrocks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,8 @@ jobs:
- name: Build Kvrocks (SonarCloud)
if: ${{ matrix.sonarcloud }}
run: |
build-wrapper-linux-x86-64 --out-dir ${{ env.SONARCLOUD_OUTPUT_DIR }} ./x.py build -j$NPROC --compiler ${{ matrix.compiler }} --skip-build
cp -r build _build
build-wrapper-linux-x86-64 --out-dir ${{ env.SONARCLOUD_OUTPUT_DIR }} ./x.py build -j$NPROC --unittest --compiler ${{ matrix.compiler }} ${{ matrix.sonarcloud }}
- name: Setup Coredump
Expand Down Expand Up @@ -375,7 +377,9 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: sonarcloud-data
path: ${{ env.SONARCLOUD_OUTPUT_DIR }}
path: |
${{ env.SONARCLOUD_OUTPUT_DIR }}
_build
check-docker:
name: Check Docker image
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/sonar.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,9 @@ jobs:
fs.writeFileSync(`${process.env.GITHUB_WORKSPACE}/sonarcloud-data.zip`, Buffer.from(download.data));
- name: 'Unzip code coverage'
run: |
unzip sonarcloud-data.zip -d sonarcloud-data
ls -a sonarcloud-data
unzip sonarcloud-data.zip
mv _build build
ls -a sonarcloud-data build
- uses: actions/setup-python@v5
with:
Expand Down

0 comments on commit 60c1f7e

Please sign in to comment.