@@ -13,12 +13,28 @@ jobs:
1313 - uses : mobiledevops/xcode-select-version-action@v1
1414 with :
1515 xcode-select-version : " 15.1"
16+ - uses : ConorMacBride/install-package@v1.1.0
17+ with :
18+ brew : ninja
1619 - uses : SonarSource/sonarcloud-github-c-cpp@v2
1720
1821 - name : " Run setup-metal-cpp.ps1"
1922 run : ./setup-metal-cpp.ps1
2023 shell : pwsh
2124
25+ - uses : lukka/run-vcpkg@v11.4
26+ with :
27+ vcpkgDirectory : " /usr/local/share/vcpkg" # $VCPKG_INSTALLATION_ROOT
28+ vcpkgGitCommitId : c8696863d371ab7f46e213d8f5ca923c4aef2a00 # 2023.12.12
29+ vcpkgJsonGlob : " ${{ github.workspace }}/vcpkg.json"
30+ runVcpkgInstall : true
31+ - uses : lukka/run-cmake@v10.7
32+ with :
33+ configurePreset : " x64-osx-analysis"
34+ - name : Run build-wrapper
35+ run : |
36+ build-wrapper-macosx-x86 --out-dir bw-output cmake --build --preset x64-osx-analysis
37+
2238 - name : " Run xcodebuild(build)"
2339 run : |
2440 xcodebuild -workspace . -list
@@ -48,16 +64,26 @@ jobs:
4864 echo "path=$xcresult_path" >> "$GITHUB_OUTPUT"
4965 bash ./scripts/xccov-to-sonarqube-generic.sh $xcresult_path > docs/coverage.xml
5066 shell : bash
51-
67+
5268 - uses : kishikawakatsumi/xcresulttool@v1.7.1
5369 with :
5470 path : " ${{ steps.xcresult.outputs.path }}"
5571
72+ - name : " Run xcrun(llvm-cov)"
73+ run : |
74+ profdata_path=$(find "DerivedData/Build/ProfileData" -name "Coverage.profdata" | tail -n 1)
75+ xctest_path="DerivedData/Build/Products/Debug/BaguetteBridgeTests.xctest/Contents/MacOS/BaguetteBridgeTests"
76+ xcrun --run llvm-cov show -instr-profile=$profdata_path $xctest_path > docs/coverage.report
77+ shell : bash
78+
5679 - name : " Run sonar-scanner"
5780 run : |
5881 sonar-scanner \
5982 --define sonar.links.ci=${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} \
60- --define sonar.coverageReportPaths=docs/coverage.xml
83+ --define sonar.cfamily.llvm-cov.reportPath=docs/coverage.report
84+ # --define sonar.swift.coverage.reportPaths=docs/coverage.report
85+ # --define sonar.coverageReportPaths=docs/coverage.xml
86+ # --define sonar.cfamily.build-wrapper-output="${{ github.workspace }}/bw-output"
6187 env :
6288 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
6389 SONAR_TOKEN : ${{ secrets.SONAR_TOKEN }}
0 commit comments