Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/actions/build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,13 @@ runs:
export B2_CI_VERSION=1
export B2_CXXSTD=20
export B2_VARIANT=debug
export B2_TARGETS=${{ github.targets }}
export B2_TARGETS="${{ inputs.targets }}"
export B2_FLAGS="link=shared cxxflags=-fkeep-static-functions cxxflags=--coverage linkflags=--coverage"
export DRONE_BUILD_EVENT=${{ github.event_name }}
export DRONE_BUILD_EVENT="${{ github.event_name }}"
export DRONE_JOB_BUILDTYPE=boost
export DRONE_COMMIT=${{ github.sha }}
export DRONE_BRANCH=${{ inputs.ref }}
export DRONE_REPO=${{ inputs.repo }}
export DRONE_COMMIT="${{ github.sha }}"
export DRONE_BRANCH="${{ inputs.ref }}"
export DRONE_REPO="${{ inputs.repo }}"

cd ${{ inputs.path }}
. .drone/drone.sh
12 changes: 6 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
repository: booostorg/json
ref: ${{ steps.fetch-target.outputs.ref }}
commit: ${{ steps.fetch-target.outputs.commit }}
targets: libs/json/test
targets: libs/json/test libs/json/example libs/json/bench

- id: fetch-baseline
name: Fetch Boost.JSON baseline
Expand All @@ -43,7 +43,7 @@ jobs:
repository: booostorg/json
ref: ${{ steps.fetch-baseline.outputs.ref }}
commit: ${{ steps.fetch-baseline.outputs.commit }}
targets: libs/json/test
targets: libs/json/test libs/json/example libs/json/bench

- name: Collect coverage
run: |
Expand Down Expand Up @@ -73,16 +73,16 @@ jobs:
lcov --remove target/filter1.info '*/json/test/*' '*/json/bench/*' \
'*/json/example/*' --output-file target/filter2.info

git diff -U0 --no-indent-heuristic --minimal \
base/boost-root/libs/json target/boost-root/libs/json >diff
git diff -U0 --no-indent-heuristic --minimal --no-index \
base/boost-root/libs/json target/boost-root/libs/json | tee diff

./diff-coverage-report.py -O pages -S target/boost-root/libs/json \
-B base/filter2.info -T target/filter2.info -D diff \
-P $PWD/base/boost-root/boost $PWD/target/boost-root/libs/json/include/boost \
$PWD/target/boost-root/boost $PWD/target/boost-root/libs/json/include/boost \
$PWD/base/boost-root $PWD/target/boost-root \
1/base/boost-root $PWD/target/boost-root \
2/target/boost-root $PWD/target/boost-root
a/base/boost-root $PWD/target/boost-root \
b/target/boost-root $PWD/target/boost-root

- name: Save coverage info
uses: actions/upload-artifact@v4
Expand Down
19 changes: 17 additions & 2 deletions diff-coverage-report.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,11 @@ def commit():
elif l.startswith('+++ '):
_, new_file = l.split(' ', 1)
new_file = fix_path(new_file.rstrip(), prefix_map)
if old_file != new_file:
if old_file == '/dev/null':
old_file = new_file
elif new_file == '/dev/null':
new_file = old_file
assert old_file == new_file

file_data = result.get(new_file)
Expand All @@ -249,8 +254,18 @@ def commit():
_, old_range, new_range, _ = l.split(' ', 3)
assert old_range[0] == '-'
assert new_range[0] == '+'
old_line, old_count = [int(x) for x in old_range[1:].split(',')]
new_line, new_count = [int(x) for x in new_range[1:].split(',')]
old_range = [int(x) for x in old_range[1:].split(',')]
if len(old_range) > 1:
old_line, old_count = old_range
else:
old_line = old_range[0]
old_count = 1
new_range = [int(x) for x in new_range[1:].split(',')]
if len(new_range) > 1:
new_line, new_count = new_range
else:
new_line = new_range[0]
new_count = 1

elif l.startswith(' '):
old_line += 1
Expand Down