mirror of
https://github.com/orange-cpp/omath.git
synced 2026-04-18 19:23:26 +00:00
Compare commits
2 Commits
ee61c47d7d
...
66d4df0524
| Author | SHA1 | Date | |
|---|---|---|---|
| 66d4df0524 | |||
| 54e14760ca |
3
.github/workflows/cmake-multi-platform.yml
vendored
3
.github/workflows/cmake-multi-platform.yml
vendored
@@ -380,6 +380,7 @@ jobs:
|
||||
run: cmake --build cmake-build/build/${{ matrix.preset }} --target unit_tests omath
|
||||
|
||||
- name: Run unit_tests
|
||||
if: ${{ matrix.coverage != true }}
|
||||
shell: bash
|
||||
run: ./out/Release/unit_tests
|
||||
|
||||
@@ -388,6 +389,8 @@ jobs:
|
||||
shell: bash
|
||||
run: |
|
||||
brew install lcov
|
||||
# Clean stale profraw files before running coverage
|
||||
find cmake-build/build/${{ matrix.preset }} -name "*.profraw" -delete 2>/dev/null || true
|
||||
chmod +x scripts/coverage-llvm.sh
|
||||
./scripts/coverage-llvm.sh \
|
||||
"${{ github.workspace }}" \
|
||||
|
||||
@@ -17,8 +17,20 @@ echo "[*] Output dir: ${OUTPUT_DIR}"
|
||||
find_llvm_tool() {
|
||||
local tool_name="$1"
|
||||
|
||||
# macOS: use xcrun
|
||||
# macOS: derive from the same directory as the active clang to guarantee
|
||||
# the profraw format version matches the compiler that instrumented the binary.
|
||||
if [[ "$(uname)" == "Darwin" ]]; then
|
||||
local clang_path
|
||||
clang_path=$(xcrun --find clang 2>/dev/null)
|
||||
if [[ -n "$clang_path" ]]; then
|
||||
local tool_path
|
||||
tool_path="$(dirname "$clang_path")/${tool_name}"
|
||||
if [[ -x "$tool_path" ]]; then
|
||||
echo "$tool_path"
|
||||
return 0
|
||||
fi
|
||||
fi
|
||||
# Fallback: xcrun
|
||||
if xcrun --find "${tool_name}" &>/dev/null; then
|
||||
echo "xcrun ${tool_name}"
|
||||
return 0
|
||||
@@ -51,6 +63,12 @@ fi
|
||||
echo "[*] Using: ${LLVM_PROFDATA}"
|
||||
echo "[*] Using: ${LLVM_COV}"
|
||||
|
||||
# Print version info for debugging version mismatches
|
||||
if [[ "$(uname)" == "Darwin" ]]; then
|
||||
echo "[*] Compiler: $(xcrun clang --version | head -1)"
|
||||
echo "[*] profdata: $(${LLVM_PROFDATA} show --version 2>&1 | head -1 || true)"
|
||||
fi
|
||||
|
||||
# Find test binary
|
||||
if [[ -z "${TEST_BINARY}" ]]; then
|
||||
for path in \
|
||||
|
||||
Reference in New Issue
Block a user