Skip to content

Commit

Permalink
Merge pull request #446 from ckormanyos/repair_ci
Browse files Browse the repository at this point in the history
Eliminate some clang CI compilations
  • Loading branch information
ckormanyos authored Oct 26, 2023
2 parents 2bc0ac1 + 8cd96af commit 7e5996b
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 5 deletions.
1 change: 0 additions & 1 deletion code_snippets/chapter09/chapter09.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ rm -f ./bin/*.*

echo build snippets with GCC=$GCC STD=$STD


$GCC -std=$STD -Wall -Wextra -Wpedantic -Werror -Wconversion -Wsign-conversion -O3 -m64 -fsanitize=address -fsanitize=shift -fsanitize=shift-exponent -fsanitize=shift-base -fsanitize=integer-divide-by-zero -fsanitize=null -fsanitize=signed-integer-overflow -fsanitize=bounds -fsanitize=alignment -fsanitize=float-divide-by-zero -fsanitize=float-cast-overflow -fsanitize=enum ./chapter09_01-001_port_pin_template.cpp -o ./bin/chapter09_01-001_port_pin_template.exe
$GCC -std=$STD -Wall -Wextra -Wpedantic -Werror -Wconversion -Wsign-conversion -O3 -m64 -fsanitize=address -fsanitize=shift -fsanitize=shift-exponent -fsanitize=shift-base -fsanitize=integer-divide-by-zero -fsanitize=null -fsanitize=signed-integer-overflow -fsanitize=bounds -fsanitize=alignment -fsanitize=float-divide-by-zero -fsanitize=float-cast-overflow -fsanitize=enum ./chapter09_02-001_programming_interrupts.cpp -o ./bin/chapter09_02-001_programming_interrupts.exe
$GCC -std=$STD -Wall -Wextra -Wpedantic -Werror -Wconversion -Wsign-conversion -O3 -m64 -fsanitize=address -fsanitize=shift -fsanitize=shift-exponent -fsanitize=shift-base -fsanitize=integer-divide-by-zero -fsanitize=null -fsanitize=signed-integer-overflow -fsanitize=bounds -fsanitize=alignment -fsanitize=float-divide-by-zero -fsanitize=float-cast-overflow -fsanitize=enum ./chapter09_02-002_enable_timer_interrupt.cpp -o ./bin/chapter09_02-002_enable_timer_interrupt.exe
Expand Down
9 changes: 8 additions & 1 deletion code_snippets/chapter10/chapter10.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,19 @@ rm -f ./bin/*.*

echo build snippets with GCC=$GCC STD=$STD

$GCC -std=$STD -Wall -Wextra -Wpedantic -Werror -Wconversion -Wsign-conversion -O3 -m64 -fsanitize=address -fsanitize=shift -fsanitize=shift-exponent -fsanitize=shift-base -fsanitize=integer-divide-by-zero -fsanitize=null -fsanitize=signed-integer-overflow -fsanitize=bounds -fsanitize=alignment -fsanitize=float-divide-by-zero -fsanitize=float-cast-overflow -fsanitize=enum ./chapter10_08-000_pi_spigot_single.cpp -o ./bin/chapter10_08-000_pi_spigot_single.exe
$GCC -std=$STD -Wall -Wextra -Wpedantic -Werror -Wconversion -Wsign-conversion -O3 -m64 -fsanitize=address -fsanitize=shift -fsanitize=shift-exponent -fsanitize=shift-base -fsanitize=integer-divide-by-zero -fsanitize=null -fsanitize=signed-integer-overflow -fsanitize=bounds -fsanitize=alignment -fsanitize=float-divide-by-zero -fsanitize=float-cast-overflow -fsanitize=enum ./chapter10_08-000_pi_spigot_single.cpp -o ./bin/chapter10_08-000_pi_spigot_single.exe
if [[ "$GCC" == "g++" ]]; then
$GCC -std=$STD -Wall -Wextra -O3 -m64 -fsanitize=address -fsanitize=shift -fsanitize=shift-exponent -fsanitize=shift-base -fsanitize=integer-divide-by-zero -fsanitize=null -fsanitize=signed-integer-overflow -fsanitize=bounds -fsanitize=alignment -fsanitize=float-divide-by-zero -fsanitize=float-cast-overflow -fsanitize=enum -I../../../boost-root ./chapter10_08-001_pi_millions_with_boost.cpp -lgmp -o ./bin/chapter10_08-001_pi_millions_with_boost.exe
fi

if [[ "$GCC" == "g++" ]]; then
ls -la \
./bin/chapter10_08-000_pi_spigot_single.exe \
./bin/chapter10_08-001_pi_millions_with_boost.exe
else
ls -la \
./bin/chapter10_08-000_pi_spigot_single.exe
fi

result_ls=$?

Expand Down
6 changes: 6 additions & 0 deletions code_snippets/chapter16/chapter16.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,16 @@ rm -f ./bin/*.*

echo build snippets with GCC=$GCC STD=$STD

if [[ "$GCC" == "g++" ]]; then
$GCC -std=$STD -Wall -Wextra -Wpedantic -Werror -Wconversion -Wsign-conversion -O3 -m64 -fsanitize=address -fsanitize=shift -fsanitize=shift-exponent -fsanitize=shift-base -fsanitize=integer-divide-by-zero -fsanitize=null -fsanitize=signed-integer-overflow -fsanitize=bounds -fsanitize=alignment -fsanitize=float-divide-by-zero -fsanitize=float-cast-overflow -fsanitize=enum ./chapter16_08-001_random_engine.cpp -o ./bin/chapter16_08-001_random_engine.exe
fi

if [[ "$GCC" == "g++" ]]; then
ls -la \
./bin/chapter16_08-001_random_engine.exe
else
ls -la
fi

result_ls=$?

Expand Down
5 changes: 2 additions & 3 deletions code_snippets/chapter16/chapter16_08-001_random_engine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,9 @@ class random_engine

result_type operator()()
{
using clock_type = std::chrono::high_resolution_clock;
const auto time_stamp = static_cast<result_type>(std::chrono::high_resolution_clock::now().time_since_epoch().count());

const result_type basis_for_seed =
static_cast<result_type>(clock_type::now().time_since_epoch().count());
const result_type basis_for_seed = static_cast<result_type>(time_stamp);

return static_cast<result_type>(crc32_mpeg2(basis_for_seed));
}
Expand Down
10 changes: 10 additions & 0 deletions ref_app/target/build/test_app_benchmarks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@ $GCC -std=$STD -Wall -O3 -march=native -fsanitize=address -fsanitize=shi
$GCC -std=$STD -Wall -O3 -march=native -fsanitize=address -fsanitize=shift -fsanitize=shift-exponent -fsanitize=shift-base -fsanitize=integer-divide-by-zero -fsanitize=null -fsanitize=signed-integer-overflow -fsanitize=bounds -fsanitize=alignment -fsanitize=float-divide-by-zero -fsanitize=float-cast-overflow -fsanitize=enum -I./src/mcal/host -I./src -I../../boost-root -DAPP_BENCHMARK_TYPE=APP_BENCHMARK_TYPE_BOOST_MATH_CYL_BESSEL_J -DAPP_BENCHMARK_STANDALONE_MAIN ./src/app/benchmark/app_benchmark_boost_math_cyl_bessel_j.cpp -o ./bin/app_benchmark_boost_math_cyl_bessel_j.exe
$GCC -std=$STD -Wall -O3 -march=native -fsanitize=address -fsanitize=shift -fsanitize=shift-exponent -fsanitize=shift-base -fsanitize=integer-divide-by-zero -fsanitize=null -fsanitize=signed-integer-overflow -fsanitize=bounds -fsanitize=alignment -fsanitize=float-divide-by-zero -fsanitize=float-cast-overflow -fsanitize=enum -I./src/mcal/host -I./src -I../../boost-root -DAPP_BENCHMARK_TYPE=APP_BENCHMARK_TYPE_BOOST_MULTIPRECISION_CBRT -DAPP_BENCHMARK_STANDALONE_MAIN ./src/app/benchmark/app_benchmark_boost_multiprecision_cbrt.cpp -o ./bin/app_benchmark_boost_multiprecision_cbrt.exe
$GCC -std=$STD -Wall -Werror -O3 -march=native -fsanitize=address -fsanitize=shift -fsanitize=shift-exponent -fsanitize=shift-base -fsanitize=integer-divide-by-zero -fsanitize=null -fsanitize=signed-integer-overflow -fsanitize=bounds -fsanitize=alignment -fsanitize=float-divide-by-zero -fsanitize=float-cast-overflow -fsanitize=enum -I./src/mcal/host -I./src -DAPP_BENCHMARK_TYPE=APP_BENCHMARK_TYPE_HASH_SHA256 -DAPP_BENCHMARK_STANDALONE_MAIN ./src/app/benchmark/app_benchmark_hash_sha256.cpp -o ./bin/app_benchmark_hash_sha256.exe
if [[ "$GCC" == "g++" ]]; then
$GCC -std=$STD -Wall -Werror -O3 -march=native -fsanitize=address -fsanitize=shift -fsanitize=shift-exponent -fsanitize=shift-base -fsanitize=integer-divide-by-zero -fsanitize=null -fsanitize=signed-integer-overflow -fsanitize=bounds -fsanitize=alignment -fsanitize=float-divide-by-zero -fsanitize=float-cast-overflow -fsanitize=enum -I./src/mcal/host -I./src -DAPP_BENCHMARK_TYPE=APP_BENCHMARK_TYPE_ECC_GENERIC_ECC -DAPP_BENCHMARK_STANDALONE_MAIN ./src/app/benchmark/app_benchmark_ecc_generic_ecc.cpp -o ./bin/app_benchmark_ecc_generic_ecc.exe
fi

./bin/app_benchmark_complex.exe
result_var_complex=$?
Expand Down Expand Up @@ -102,8 +104,10 @@ result_var_boost_multiprecision_cbrt=$?
./bin/app_benchmark_hash_sha256.exe
result_var_hash_sha256=$?

if [[ "$GCC" == "g++" ]]; then
./bin/app_benchmark_ecc_generic_ecc.exe
result_var_ecc_generic_ecc=$?
fi

echo "result_var_complex : " "$result_var_complex"
echo "result_var_crc : " "$result_var_crc"
Expand All @@ -124,9 +128,15 @@ echo "result_var_boost_math_cbrt_tgamma : " "$result_var_boost_math_cbrt_tgam
echo "result_var_boost_math_cyl_bessel_j : " "$result_var_boost_math_cyl_bessel_j"
echo "result_var_boost_multiprecision_cbrt: " "$result_var_boost_multiprecision_cbrt"
echo "result_var_hash_sha256 : " "$result_var_hash_sha256"
if [[ "$GCC" == "g++" ]]; then
echo "result_var_ecc_generic_ecc : " "$result_var_ecc_generic_ecc"
fi

if [[ "$GCC" == "g++" ]]; then
result_total=$((result_var_complex+result_var_crc+result_var_fast_math+result_var_filter+result_var_fixed_point+result_var_float+result_var_hash+result_var_none+result_var_pi_agm+result_var_pi_spigot+result_var_pi_spigot_single+$result_var_soft_double_h2f1+result_var_trapezoid_integral+result_var_wide_decimal+result_var_wide_integer+result_var_boost_math_cbrt_tgamma+result_var_boost_math_cyl_bessel_j+result_var_boost_multiprecision_cbrt+result_var_hash_sha256+result_var_ecc_generic_ecc))
else
result_total=$((result_var_complex+result_var_crc+result_var_fast_math+result_var_filter+result_var_fixed_point+result_var_float+result_var_hash+result_var_none+result_var_pi_agm+result_var_pi_spigot+result_var_pi_spigot_single+$result_var_soft_double_h2f1+result_var_trapezoid_integral+result_var_wide_decimal+result_var_wide_integer+result_var_boost_math_cbrt_tgamma+result_var_boost_math_cyl_bessel_j+result_var_boost_multiprecision_cbrt+result_var_hash_sha256))
fi

echo "result_total : " "$result_total"

Expand Down

0 comments on commit 7e5996b

Please sign in to comment.