Skip to content

Commit 474299c

Browse files
committed
fixup! Disable some calib tests on ubuntu 24 / 5.x
1 parent 2f8d584 commit 474299c

File tree

2 files changed

+18
-9
lines changed

2 files changed

+18
-9
lines changed

.github/workflows/OCV-PR-Linux.yaml

+3-1
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,11 @@ jobs:
7575
image: '22.04:20230602'
7676
avif: true
7777
plugins: true
78+
lapack: true
7879
- version: '20.04'
7980
image: '20.04:20250207'
8081
limited_api: true
82+
lapack: true
8183

8284
defaults:
8385
run:
@@ -186,7 +188,7 @@ jobs:
186188
# NOTE: Just keeping this construction here for possible future use:
187189
# ${{ (github.event.repository.name == 'opencv_contrib') && format('''linux-contrib-{0}''', matrix.branch) || '' }}
188190
suite: "[ ${{ (github.event.repository.name == 'opencv_contrib') && '''linux-contrib''' || '''linux''' }} ]"
189-
filter: "[ 'ubuntu-common', ${{ matrix.avx2 && '''ubuntu-avx2''' }}, ${{ matrix.version == '24.04' && '''ubuntu-24'''}} ]"
191+
filter: "[ 'ubuntu-common', ${{ matrix.avx2 && '''ubuntu-avx2''' }}, ${{ matrix.version == '24.04' && matrix.branch == '5.x' && '''ubuntu-24'''}} ]"
190192
enable_python: "true"
191193
enable_java: "true"
192194
suffix: '${{ matrix.version }}_${{ matrix.branch }}'

scripts/warnings-handling.py

+15-8
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import os
33
import re
44
import sys
5+
from collections import OrderedDict
56

67

78
def is_suppressed(line):
@@ -18,37 +19,43 @@ def is_suppressed(line):
1819
return False
1920

2021

21-
def warnings_count(filename, verbose):
22+
def warnings_count(filename, verbose, direct):
2223
rx = re.compile(r'warning[: ]', re.I)
23-
warnings = 0
24+
warnings = OrderedDict()
2425
suppressed = 0
2526
total = 0
2627
for line in open(filename):
2728
total += 1
2829
match = rx.search(line)
30+
val = line.rstrip()
2931
if match:
3032
if is_suppressed(line):
3133
suppressed += 1
3234
else:
33-
print("::warning::{}".format(line.rstrip()), flush=True)
34-
warnings += 1
35+
warnings[val] = warnings.get(val, 0) + 1
36+
if direct:
37+
print("::warning::{}".format(val), flush=True)
3538
continue
3639
if verbose:
37-
print(line.rstrip())
40+
print(val)
41+
if not direct:
42+
for k, v in warnings.items():
43+
print("::warning::(x {}) {}".format(v, k), flush=True)
3844
return total, suppressed, warnings
3945

4046
if __name__ == '__main__':
4147

4248
parser = argparse.ArgumentParser(description='Check warnings produced during build')
4349
parser.add_argument('filename', help='Path to the log file.', default='build-log.txt')
50+
parser.add_argument('--direct', action='store_true', help='Print warnings as they are found, do not count duplicates')
4451
parser.add_argument('-v', '--verbose', action='store_true', help='Print all lines and mark warnings')
4552
args = parser.parse_args()
4653

4754
print("::group::Warning check", flush=True)
48-
total, suppressed, warnings = warnings_count(args.filename, args.verbose)
55+
total, suppressed, warnings = warnings_count(args.filename, args.verbose, args.direct)
4956
print("::endgroup::", flush=True)
50-
print("::notice::Warning stats => total lines: {}, suppressed: {}, warnings: {}".format(total, suppressed, warnings), flush=True)
57+
print("::notice::Warning stats => total lines: {}, suppressed: {}, warnings: {}".format(total, suppressed, len(warnings)), flush=True)
5158

52-
if warnings != 0:
59+
if len(warnings) != 0:
5360
sys.exit(1)
5461
sys.exit(0)

0 commit comments

Comments
 (0)