Skip to content

Commit 51857c9

Browse files
committed
macOS typo in script, maybe. Windows. OpenCppCoverage does not apparently support ARM64 PE files.
1 parent 9ee0ba4 commit 51857c9

1 file changed

Lines changed: 9 additions & 6 deletions

File tree

.github/workflows/coverage.yml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -63,17 +63,16 @@ jobs:
6363
- arch: x86_64
6464
runner: windows-latest
6565
cmake_arch: x64
66-
- arch: aarch64
67-
runner: windows-11-arm
68-
cmake_arch: ARM64
66+
# Note: ARM64 Windows coverage skipped - OpenCppCoverage doesn't support ARM64 PE binaries
67+
# ARM64 coverage is validated via Linux and macOS ARM64 coverage jobs
6968
runs-on: ${{ matrix.runner }}
7069
steps:
7170
- uses: actions/checkout@v4
7271

7372
- name: Install OpenCppCoverage
7473
run: |
7574
choco install opencppcoverage
76-
echo "C:\Program Files (x86)\OpenCppCoverage" >> $env:GITHUB_PATH
75+
echo "C:\Program Files (x86)\OpenCppCoverage" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
7776
7877
- name: Configure
7978
run: cmake -S . -B build -DCMAKE_BUILD_TYPE=Debug -A ${{ matrix.cmake_arch }}
@@ -82,7 +81,10 @@ jobs:
8281
run: cmake --build build --config Debug
8382

8483
- name: Generate Coverage Report
85-
run: OpenCppCoverage --sources "${{ github.workspace }}" --cover_children --export_type=html:build/coverage_report --export_type=cobertura:build/cobertura.xml -- ctest --test-dir build -C Debug --output-on-failure
84+
run: |
85+
$opencppcoverage = "C:\Program Files (x86)\OpenCppCoverage\OpenCppCoverage.exe"
86+
& $opencppcoverage --sources "${{ github.workspace }}" --cover_children --export_type=html:build/coverage_report --export_type=cobertura:build/cobertura.xml -- ctest --test-dir build -C Debug --output-on-failure
87+
shell: pwsh
8688

8789
- name: Generate Coverage Badge
8890
shell: powershell
@@ -161,7 +163,7 @@ jobs:
161163
run: |
162164
cat > /usr/local/bin/llvm-gcov << 'EOF'
163165
#!/bin/bash
164-
exec llvm-cov gcov "$@"
166+
exec xcrun llvm-cov gcov "$@"
165167
EOF
166168
chmod +x /usr/local/bin/llvm-gcov
167169
@@ -186,6 +188,7 @@ jobs:
186188
187189
commit-badges:
188190
needs: [coverage-linux, coverage-macos, coverage-windows]
191+
if: always()
189192
runs-on: ubuntu-latest
190193
if: github.event_name == 'push' && github.ref == 'refs/heads/prerelease'
191194
steps:

0 commit comments

Comments
 (0)