Skip to content

Commit b4d8722

Browse files
committed
Added ABI checking CI for VDB major versions
Signed-off-by: Nick Avramoussis <[email protected]>
1 parent 0590d45 commit b4d8722

File tree

2 files changed

+64
-4
lines changed

2 files changed

+64
-4
lines changed

.github/workflows/weekly.yml

Lines changed: 58 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ on:
1212
workflow_dispatch:
1313
inputs:
1414
type:
15-
description: 'The type of CI to run (all, houdini, sanitize, mac, extra, ax, blosc)'
15+
description: 'The type of CI to run (all, houdini, sanitize, mac, extra, ax, blosc, abi)'
1616
required: true
1717
default: 'all'
1818

@@ -484,7 +484,7 @@ jobs:
484484
steps:
485485
- uses: actions/checkout@v2
486486
- name: install_boost
487-
run: sudo apt-get -q install -y libboost-dev libboost-system-dev libboost-iostreams-dev libboost-python-dev
487+
run: sudo apt-get -q install -y libboost-dev libboost-system-dev libboost-iostreams-dev
488488
- name: install_tbb
489489
run: sudo apt-get -q install -y libtbb-dev
490490
- name: install_gtest
@@ -500,3 +500,59 @@ jobs:
500500
- name: test
501501
run: cd build && sudo ctest -V
502502

503+
#############################################################################
504+
################################## ABI ######################################
505+
#############################################################################
506+
507+
linux-abi-checker:
508+
if: |
509+
github.event_name != 'workflow_dispatch' ||
510+
github.event.inputs.type == 'all' ||
511+
github.event.inputs.type == 'abi'
512+
# abi-dumper version verified to work with 20.04/GCC9
513+
runs-on: ubuntu-20.04
514+
steps:
515+
- uses: actions/checkout@v3
516+
with:
517+
fetch-depth: 0
518+
- name: install_deps
519+
run: sudo apt-get -q install -y libboost-dev libboost-system-dev libboost-iostreams-dev libtbb-dev libblosc-dev elfutils
520+
# abi-compliance-checker and abi-dumper
521+
#
522+
# @note that abi-dumper is available through apt but at the time of writing this
523+
# the version there (1.1) doesn't work correctly and maniftest by creating an
524+
# invalid ABI report with missing headers. This then always reports 100% success
525+
# rate when used with abi-compliance-checker.
526+
# To fix, install both from source and checkout specific commits for both
527+
# which have been verified to work on ubuntu 20.04.
528+
#
529+
# @warning If you update these, test that they fail when expected!
530+
#
531+
# Also note that these are far superior to abigail/abidiff tools from redhat
532+
- name: install_abi_checker
533+
run: |
534+
git clone https://github.com/lvc/abi-dumper.git abi-dumper
535+
cd abi-dumper && git checkout 16bb467cd7d343dd3a16782b151b56cf15509594 && cd -
536+
git clone https://github.com/lvc/abi-compliance-checker abi-compliance-checker
537+
cd abi-compliance-checker && git checkout 7c175c45a8ba9ac41b8e47d8ebbab557b623b18e && cd -
538+
- name: build_latest
539+
run: |
540+
CXXFLAGS=-Og ./ci/build.sh --build-dir=build_latest -v --build-type=Debug --target=openvdb_shared --components=\"core\" --cargs=\'-DUSE_EXPLICIT_INSTANTIATION=OFF\'
541+
- name: build_9
542+
run: |
543+
git checkout v9.0.0
544+
CXXFLAGS=-Og ./ci/build.sh -v --build-type=Debug --target=openvdb_shared --components=\"core\" --cargs=\'-DUSE_EXPLICIT_INSTANTIATION=OFF\'
545+
- name: abi_check
546+
# -strict treats warnings as errors
547+
run: |
548+
abi-dumper/abi-dumper.pl build_latest/openvdb/openvdb/libopenvdb.so -o ABI-1.dump -lver 1
549+
abi-dumper/abi-dumper.pl build/openvdb/openvdb/libopenvdb.so -o ABI-2.dump -lver 2
550+
abi-compliance-checker/abi-compliance-checker.pl -l OPENVDB -old ABI-2.dump -new ABI-1.dump -strict
551+
- name: upload_report
552+
uses: actions/upload-artifact@v3
553+
if: always()
554+
with:
555+
name: abi_report
556+
path: ./compat_reports/OPENVDB/2_to_1/compat_report.html
557+
retention-days: 5
558+

ci/build.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ OPTS_ARGS+=("v") ## See --verbose
1717
OPTL_ARGS+=("components:") ## Specify cmake component(s) to enable
1818
OPTL_ARGS+=("config:") ## Specify cmake configuration during the build step
1919
OPTL_ARGS+=("target:") ## Specify target(s) to build
20+
OPTL_ARGS+=("build-dir:") ## Build directory
2021
OPTL_ARGS+=("cargs:") ## args to pass directly to cmake generation step
2122
OPTL_ARGS+=("build-type:") ## Release, Debug, etc.
2223
OPTL_ARGS+=("verbose") ## Verbose build output
@@ -25,6 +26,7 @@ OPTL_ARGS+=("verbose") ## Verbose build output
2526
declare -A PARMS
2627
PARMS[--components]=core,bin
2728
PARMS[--target]=install
29+
PARMS[--build-dir]=build
2830
# github actions runners have 2 threads
2931
# https://help.github.com/en/actions/reference/virtual-environments-for-github-hosted-runners
3032
PARMS[-j]=2
@@ -96,6 +98,8 @@ if HAS_PARM --cargs; then
9698
if [ -z $CMAKE_EXTRA ]; then CMAKE_EXTRA=${PARMS[--cargs]}
9799
else CMAKE_EXTRA+=" "${PARMS[--cargs]}; fi
98100
fi
101+
BUILD_DIR=${PARMS[--build-dir]}
102+
99103
# handle whitespace
100104
eval "CMAKE_EXTRA=($CMAKE_EXTRA)"
101105

@@ -148,8 +152,8 @@ fi
148152

149153
################################################
150154

151-
mkdir -p build
152-
cd build
155+
mkdir -p ${BUILD_DIR}
156+
cd ${BUILD_DIR}
153157

154158
# Report the cmake commands
155159
set -x

0 commit comments

Comments
 (0)