Skip to content

Commit 3a451b2

Browse files
authored
Merge pull request #86 from Flamefire/separate-test-deps
Don't add all libraries when BOOST_INCLUDE_LIBRARIES is set
2 parents 8da84d1 + 8c9f070 commit 3a451b2

File tree

3 files changed

+197
-88
lines changed

3 files changed

+197
-88
lines changed

.github/workflows/ci.yml

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -407,22 +407,32 @@ jobs:
407407
cp -r $GITHUB_WORKSPACE/* tools/cmake
408408
- name: Configure each library independently
409409
run: |
410-
set -o pipefail
411-
error=""
410+
failed_libs=""
411+
failed_outputs=()
412412
cd ../boost-root
413413
for cml in libs/*/CMakeLists.txt; do
414414
lib=$(dirname "${cml#*libs/}")
415415
echo "====================================================================="
416416
echo "Building $lib"
417417
echo "====================================================================="
418-
cmake -DBUILD_TESTING=${{matrix.enable_test}} -DBOOST_INCLUDE_LIBRARIES=$lib -B "__build_$lib" . 2>&1 | tee /tmp/config.log || error+=" $lib"
418+
error=0
419+
out=$(cmake -DBUILD_TESTING=${{matrix.enable_test}} -DBOOST_INCLUDE_LIBRARIES=$lib -DBoost_DEBUG=ON -B "__build_$lib" . 2>&1) || error=1
420+
echo "$out"
419421
echo; echo; echo
420-
if grep -F "BOOST_INCLUDE_LIBRARIES has not been found" "/tmp/config.log"; then
421-
error+=" $lib"
422+
[[ "$out" != *"BOOST_INCLUDE_LIBRARIES has not been found"* ]] || error=1
423+
[[ "$out" != *"CMake Error"* ]] || error=1
424+
if ((error==1)); then
425+
failed_libs+=" $lib"
426+
failed_outputs+=(
427+
"====================================================================="
428+
"Output of $lib"
429+
"$out"
430+
)
422431
fi
423432
done
424-
if [[ -n $error ]]; then
425-
echo "Failed libraries: $error"
433+
if [[ -n $failed_libs ]]; then
434+
echo "Failed libraries: $failed_libs"
435+
printf '%s\n' "${failed_outputs[@]}"
426436
exit 1
427437
fi
428438

0 commit comments

Comments
 (0)