File tree Expand file tree Collapse file tree 2 files changed +81
-0
lines changed Expand file tree Collapse file tree 2 files changed +81
-0
lines changed Original file line number Diff line number Diff line change 20
20
- name : Run Linux C++11
21
21
working-directory : ./
22
22
run : ./Scripts/BuildScripts/build_ci_linux.sh
23
+ - name : ABI Checker Report Generation
24
+ if : ${{ github.base_ref != 'master' }}
25
+ run : ./Scripts/BuildScripts/abi_checker.sh 2 $GITHUB_BASE_REF
26
+ - name : ABI Checker Upload
27
+ uses : actions/upload-artifact@v2
28
+ if : ${{ github.base_ref != 'master' }}
29
+ with :
30
+ name : abi-checker-reports
31
+ path : ./build/Debug/lib/compat_reports
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ # Usage:
4
+ #
5
+ # Scripts/BuildScripts/abi_checker.sh 2 branch_name
6
+ #
7
+ # Where 2 is the lver
8
+ # branch_name is optional and is the name of the git branch
9
+
10
+ cd build/Debug/lib
11
+ mkdir -p AbiDump/$1
12
+
13
+ if [ -z $2 ]; then
14
+ branch_name=` git branch --show-current`
15
+ else
16
+ # Pull Requests can't use git branch, so Github provides it for us
17
+ branch_name=$2
18
+ fi
19
+
20
+ # if [[ $branch_name == "master" && $1 != 1 ]]; then
21
+ # echo "We're in master. Master does not do ABI checks. We're done."
22
+ # exit
23
+ # fi
24
+
25
+ if [[ $1 != 1 ]]; then
26
+ echo " --- Fetching base dumps to compare against ---"
27
+ wget https://github.com/OGRECave/ogre-next/releases/download/bin-releases/AbiDumps_Ubuntu.18.04.LTS.$2 .7z
28
+
29
+ echo " --- Extracting base dumps ---"
30
+ 7z x AbiDumps_Ubuntu.18.04.LTS.$2 .7z
31
+ fi
32
+
33
+ sudo apt-get install -y abi-compliance-checker
34
+
35
+ # Dump the libs
36
+ FILES=" *.so*"
37
+ for file in $FILES
38
+ do
39
+ # Ignore symlinks
40
+ if ! [[ -L " $file " ]]; then
41
+ echo " Dumping $file "
42
+ abi-dumper " $file " -o " AbiDump/$1 /$file .dump" -lver $1 &
43
+ fi
44
+ done
45
+
46
+ wait
47
+
48
+ # Generate all reports. We need to gather their exit codes to see if they've failed
49
+ PIDs=()
50
+ for file in $FILES
51
+ do
52
+ # Ignore symlinks
53
+ if ! [[ -L " $file " ]]; then
54
+ echo " Checking AbiDump/1/$file .dump vs AbiDump/$1 /$file .dump"
55
+ abi-compliance-checker -l " $file " -old " AbiDump/1/$file .dump" -new " AbiDump/$1 /$file .dump" &
56
+ PIDs+=($! )
57
+ fi
58
+ done
59
+
60
+ EXIT_CODE=0
61
+ for pid in " ${PIDs[@]} "
62
+ do
63
+ echo Waiting for $pid
64
+ wait " $pid "
65
+ CODE=" $? "
66
+ if [[ " ${CODE} " != " 0" ]]; then
67
+ echo " At least one report failed with exit code => ${CODE} " ;
68
+ EXIT_CODE=1;
69
+ fi
70
+ done
71
+
72
+ exit $EXIT_CODE
You can’t perform that action at this time.
0 commit comments