@@ -13,6 +13,16 @@ permissions:
1313jobs :
1414 iwyu :
1515 runs-on : ubuntu-latest
16+ strategy :
17+ matrix :
18+ include :
19+ - options_preset : all-options-abiv1
20+ warning_limit : 0
21+ - options_preset : all-options-abiv1-preview
22+ warning_limit : 24
23+ - options_preset : all-options-abiv2-preview
24+ warning_limit : 48
25+
1626 steps :
1727 - name : Harden the runner (Audit all outbound calls)
1828 uses : step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
@@ -48,59 +58,40 @@ jobs:
4858 - name : Prepare CMake
4959 run : |
5060 TOPDIR=`pwd`
51- mkdir build && cd build
61+ mkdir -p build-${{ matrix.options_preset }} && cd build-${{ matrix.options_preset }}
5262 CC="clang" CXX="clang++" cmake \
63+ -C ${TOPDIR}/test_common/cmake/${{ matrix.options_preset }}.cmake \
5364 -DCMAKE_CXX_STANDARD=14 \
5465 -DWITH_STL=CXX14 \
5566 -DCMAKE_CXX_INCLUDE_WHAT_YOU_USE="include-what-you-use;-w;-Xiwyu;--mapping_file=${TOPDIR}/.iwyu.imp;" \
56- -DBUILD_TESTING=ON \
57- -DWITH_EXAMPLES=ON \
58- -DWITH_EXAMPLES_HTTP=ON \
59- -DBUILD_W3CTRACECONTEXT_TEST=ON \
60- -DWITH_OTLP_GRPC=ON \
61- -DWITH_OTLP_HTTP=ON \
62- -DWITH_OTLP_FILE=ON \
63- -DWITH_OPENTRACING=ON \
64- -DWITH_OTLP_HTTP_COMPRESSION=ON \
65- -DWITH_ZIPKIN=ON \
66- -DWITH_PROMETHEUS=ON \
67- -DWITH_ELASTICSEARCH=ON \
68- -DWITH_HTTP_CLIENT_CURL=ON \
69- -DWITH_ABI_VERSION_1=OFF \
70- -DWITH_ABI_VERSION_2=ON \
71- -DWITH_METRICS_EXEMPLAR_PREVIEW=ON \
72- -DWITH_ASYNC_EXPORT_PREVIEW=ON \
73- -DWITH_THREAD_INSTRUMENTATION_PREVIEW=ON \
74- -DWITH_OTLP_GRPC_SSL_MTLS_PREVIEW=ON \
75- -DWITH_OTLP_GRPC_CREDENTIAL_PREVIEW=ON \
76- -DWITH_OTLP_RETRY_PREVIEW=ON \
7767 ..
7868
7969 - name : iwyu_tool
8070 run : |
81- cd build
82- make -k 2>&1 | tee -a iwyu.log
71+ cd build-${{ matrix.options_preset }}
72+ make -k 2>&1 | tee -a iwyu-${{ matrix.options_preset }} .log
8373
8474 - uses : actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
8575 if : success() || failure()
8676 with :
87- name : Logs (include-what-you-use)
88- path : ./build/*.log
77+ name : Logs-${{ matrix.options_preset }} (include-what-you-use)
78+ path : ./build-${{ matrix.options_preset }} /*.log
8979
9080 - name : count warnings
9181 run : |
9282 set +e
9383 echo "include-what-you-use version:"
9484 include-what-you-use --version
95- cd build
96- readonly WARNING_COUNT=`grep -c "include-what-you-use reported diagnostics:" iwyu.log`
97- echo "include-what-you-use reported ${WARNING_COUNT} warning(s)"
85+ cd build-${{ matrix.options_preset }}
86+ readonly WARNING_COUNT=`grep -c "include-what-you-use reported diagnostics:" iwyu-${{ matrix.options_preset }} .log`
87+ echo "include-what-you-use reported ${WARNING_COUNT} warning(s) with cmake options preset '${{ matrix.options_preset }}' "
9888 # Acceptable limit, to decrease over time down to 0
99- readonly WARNING_LIMIT=48
89+ readonly WARNING_LIMIT=${{ matrix.warning_limit }}
10090 # FAIL the build if WARNING_COUNT > WARNING_LIMIT
10191 if [ $WARNING_COUNT -gt $WARNING_LIMIT ] ; then
92+ echo "include-what-you-use reported ${WARNING_COUNT} warning(s) exceeding the existing warning limit of ${WARNING_LIMIT} with cmake options preset '${{ matrix.options_preset }}'"
10293 exit 1
10394 # WARN in annotations if WARNING_COUNT > 0
10495 elif [ $WARNING_COUNT -gt 0 ] ; then
105- echo "::warning::include-what-you-use reported ${WARNING_COUNT} warning(s)"
96+ echo "::warning::include-what-you-use reported ${WARNING_COUNT} warning(s) with cmake options preset '${{ matrix.options_preset }}' "
10697 fi
0 commit comments