Skip to content
This repository was archived by the owner on Jul 8, 2022. It is now read-only.
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
5 changes: 0 additions & 5 deletions .github/workflows/c-cpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,3 @@ jobs:
run: .travis/install_tango_idl.sh
- name: Check ABI/API compliance
run: docker exec -w /home/tango/src cpp_tango .travis/check-ABI-API-compliance.sh || true
- name: Upload compliance report
uses: actions/upload-artifact@v1
with:
name: ABI-API compliance report
path: compat_reports
15 changes: 6 additions & 9 deletions .travis/check-ABI-API-compliance.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,8 @@ then
export CMAKE_BUILD_PARALLEL_LEVEL=$(grep -c ^processor /proc/cpuinfo)
fi

function print_abi_api_breakages() {
echo "ABI breakages detected:"
cat compat_reports/libtango/${old_revision}_to_${new_revision}/abi_affected.txt | c++filt
echo "API breakages detected:"
cat compat_reports/libtango/${old_revision}_to_${new_revision}/src_affected.txt | c++filt
function exit_on_abi_api_breakages() {
echo "ABI/API breakages detected!"
exit 1
}

Expand All @@ -26,7 +23,7 @@ function generate_info() {
local prefix=$1
local revision=$2

git worktree remove $prefix-branch || true
git worktree remove --force $prefix-branch || true
git -c advice.detachedHead=false worktree add ${prefix}-branch ${revision}
mkdir ${prefix}-branch/build
cd ${prefix}-branch/build
Expand Down Expand Up @@ -54,6 +51,6 @@ generate_info "old" ${old_revision}
generate_info "new" ${new_revision}

# Compare results
abi-compliance-checker -l libtango -old ${base}/libtango-old-${old_revision}.dump \
-new ${base}/libtango-new-${new_revision}.dump \
-list-affected || print_abi_api_breakages
sed "s/${old_revision}/fixed/g" ${base}/libtango-old-${old_revision}.dump > old.dump
sed "s/${new_revision}/fixed/g" ${base}/libtango-new-${new_revision}.dump > new.dump
diff -Nur old.dump new.dump || exit_on_abi_api_breakages
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

diff -r option (to recursively compare subdirectories) does not hurt but is not needed here.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
diff -Nur old.dump new.dump || exit_on_abi_api_breakages
diff -Nu old.dump new.dump || exit_on_abi_api_breakages