Skip to content

Commit

Permalink
refactor(ci): Don't build with tcc and multi-threading support
Browse files Browse the repository at this point in the history
  • Loading branch information
jpfr committed Oct 11, 2024
1 parent c76a987 commit 4e09c32
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tools/ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,17 @@ function set_capabilities {
}

function unit_tests {
if [ "${CC:-x}" = "tcc" ]; then
# tcc does not allow multi-threading up to version 0.9.27.
# because it supports atomic intrinsics only after.
MULTITHREADING=0
tcc_recent=$(tcc -v | awk 'match($0, /tcc version [0-9]+\.[0-9]+\.[0-9]+/) {split(substr($0, 13, RLENGTH-12), ver, "."); print(ver[1] > 0 || ver[2] > 9 || ver[3] > 27);}')
if [ $tcc_recent = 1 ]; then
MULTITHREADING=100
fi
else
MULTITHREADING=100
fi
mkdir -p build; cd build; rm -rf *
cmake -DCMAKE_BUILD_TYPE=Debug \
-DUA_BUILD_EXAMPLES=ON \
Expand All @@ -144,6 +155,7 @@ function unit_tests {
-DUA_ENABLE_MQTT=ON \
-DUA_ENABLE_PUBSUB_INFORMATIONMODEL=ON \
-DUA_FORCE_WERROR=ON \
-DUA_MULTITHREADING=${MULTITHREADING} \
..
make ${MAKEOPTS}
set_capabilities
Expand Down

0 comments on commit 4e09c32

Please sign in to comment.