wide_decimal #2613
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ------------------------------------------------------------------------------ | |
# Copyright Christopher Kormanyos 2020 - 2024. | |
# Distributed under the Boost Software License, | |
# Version 1.0. (See accompanying file LICENSE_1_0.txt | |
# or copy at http://www.boost.org/LICENSE_1_0.txt) | |
# ------------------------------------------------------------------------------ | |
name: wide_decimal | |
on: | |
push: | |
branches: | |
- '**' | |
pull_request: | |
schedule: | |
- cron: '30 0 * * *' # run at 00:30 AM UTC | |
jobs: | |
cmake-linux: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
compiler: [ g++, clang++ ] | |
include: | |
- compiler: g++ | |
clang_tidy: "" | |
container: johnmcfarlane/cnl_ci:gcc-11 | |
- compiler: clang++ | |
clang_tidy: "clang-tidy" | |
container: johnmcfarlane/cnl_ci:clang-13-libcpp | |
container: ${{matrix.container}} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: create build directory | |
run: mkdir $GITHUB_WORKSPACE/build | |
- name: install Boost | |
run: | | |
apt-get update --quiet | |
apt-get install --no-install-recommends --quiet --yes libboost-dev | |
- name: build | |
working-directory: build | |
run: | | |
cmake \ | |
-DCMAKE_BUILD_TYPE=Release \ | |
-DCMAKE_CXX_STANDARD=14 \ | |
-DCMAKE_CXX_CLANG_TIDY="${{matrix.clang_tidy}}" \ | |
-DCMAKE_TOOLCHAIN_FILE=$GITHUB_WORKSPACE/.github/toolchains/gcc.cmake \ | |
-GNinja \ | |
$GITHUB_WORKSPACE | |
cmake --build . | |
- name: test | |
working-directory: build | |
run: ctest --verbose --output-on-failure | |
gnumake-clang-tidy-native: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
shell: bash | |
strategy: | |
fail-fast: false | |
matrix: | |
standard: [ c++20 ] | |
compiler: [ g++, clang++ ] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: '0' | |
- name: update-tools | |
run: sudo apt install clang-tidy | |
- name: clone-submods-bootstrap-headers-boost-develop | |
run: | | |
git clone -b develop --depth 1 https://github.com/boostorg/boost.git ../boost-root | |
cd ../boost-root | |
git submodule update --init tools | |
git submodule update --init libs/config | |
git submodule update --init libs/math | |
git submodule update --init libs/multiprecision | |
./bootstrap.sh | |
./b2 headers | |
- name: gnumake-clang-tidy-native | |
run: | | |
grep BOOST_VERSION ../boost-root/boost/version.hpp | |
cd .tidy/make | |
echo "running clang-tidy" | |
echo "make prepare -f make_tidy_01_generic.gmk MY_BOOST_ROOT=../../../boost-root MY_CC=${{ matrix.compiler }} MY_STD=${{ matrix.standard }}" | |
echo | |
make prepare -f make_tidy_01_generic.gmk MY_BOOST_ROOT=../../../boost-root MY_CC=${{ matrix.compiler }} MY_STD=${{ matrix.standard }} | |
echo "make tidy -f make_tidy_01_generic.gmk --jobs=8 MY_BOOST_ROOT=../../../boost-root MY_CC=${{ matrix.compiler }} MY_STD=${{ matrix.standard }}" | |
make tidy -f make_tidy_01_generic.gmk --jobs=8 MY_BOOST_ROOT=../../../boost-root MY_CC=${{ matrix.compiler }} MY_STD=${{ matrix.standard }} | |
echo | |
echo "verify empty word count of ./tmp/all.tidy_txt" | |
wc ./tmp/all.tidy_txt | grep '0 0 0' | |
gcc-clang-native: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
shell: bash | |
strategy: | |
fail-fast: false | |
matrix: | |
standard: [ c++14, c++20 ] | |
compiler: [ g++, clang++ ] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: '0' | |
- name: clone-submods-bootstrap-headers-boost-develop | |
run: | | |
git clone -b develop --depth 1 https://github.com/boostorg/boost.git ../boost-root | |
cd ../boost-root | |
git submodule update --init tools | |
git submodule update --init libs/config | |
git submodule update --init libs/math | |
git submodule update --init libs/multiprecision | |
./bootstrap.sh | |
./b2 headers | |
- name: gcc-clang-native | |
run: | | |
echo "compile ./wide_decimal.exe" | |
${{ matrix.compiler }} -v | |
${{ matrix.compiler }} -fno-exceptions -fno-rtti -finline-functions -m64 -O3 -Werror -Wall -Wextra -Wpedantic -Wconversion -Wsign-conversion -Wshadow -Wunused-parameter -Wuninitialized -Wunreachable-code -Winit-self -Wzero-as-null-pointer-constant -std=${{ matrix.standard }} -I. -I../boost-root -pthread -lpthread test/test.cpp test/test_decwide_t_algebra.cpp test/test_decwide_t_algebra_edge.cpp test/test_decwide_t_examples.cpp examples/example000a_multiply_pi_squared.cpp examples/example000_multiply_nines.cpp examples/example001_roots_sqrt.cpp examples/example001a_roots_seventh.cpp examples/example001b_roots_almost_integer.cpp examples/example001c_roots_sqrt_limb08.cpp examples/example001d_pow2_from_list.cpp examples/example001e_algebra_and_constexpr.cpp examples/example002_pi.cpp examples/example002a_pi_small_limb.cpp examples/example002b_pi_100k.cpp examples/example002c_pi_quintic.cpp examples/example002d_pi_limb08.cpp examples/example003_zeta.cpp examples/example004_bessel_recur.cpp examples/example005_polylog_series.cpp examples/example006_logarithm.cpp examples/example007_catalan_series.cpp examples/example008_bernoulli_tgamma.cpp examples/example009_boost_math_standalone.cpp examples/example009a_boost_math_standalone.cpp examples/example009b_boost_math_standalone.cpp examples/example010_hypergeometric_2f1.cpp examples/example010a_hypergeometric_1f1.cpp examples/example011_trig_trapezoid_integral.cpp examples/example012_rational_floor_ceil.cpp examples/example013_embeddable_sqrt.cpp examples/example013a_embeddable_agm.cpp -o wide_decimal.exe | |
ls -la ./wide_decimal.exe | |
./wide_decimal.exe | |
gcc-clang-native-outer-namespace: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
shell: bash | |
strategy: | |
fail-fast: false | |
matrix: | |
standard: [ c++14, c++20 ] | |
compiler: [ g++, clang++ ] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: '0' | |
- name: clone-submods-bootstrap-headers-boost-develop | |
run: | | |
git clone -b develop --depth 1 https://github.com/boostorg/boost.git ../boost-root | |
cd ../boost-root | |
git submodule update --init tools | |
git submodule update --init libs/config | |
git submodule update --init libs/math | |
git submodule update --init libs/multiprecision | |
./bootstrap.sh | |
./b2 headers | |
- name: gcc-clang-native-outer-namespace | |
run: | | |
echo "compile ./wide_decimal.exe" | |
${{ matrix.compiler }} -v | |
${{ matrix.compiler }} -fno-exceptions -fno-rtti -finline-functions -m64 -O3 -Werror -Wall -Wextra -Wpedantic -Wconversion -Wsign-conversion -Wshadow -Wunused-parameter -Wuninitialized -Wunreachable-code -Winit-self -Wzero-as-null-pointer-constant -std=${{ matrix.standard }} -DWIDE_DECIMAL_NAMESPACE=ckormanyos -I. -I../boost-root -pthread -lpthread test/test.cpp test/test_decwide_t_algebra.cpp test/test_decwide_t_algebra_edge.cpp test/test_decwide_t_examples.cpp examples/example000a_multiply_pi_squared.cpp examples/example000_multiply_nines.cpp examples/example001_roots_sqrt.cpp examples/example001a_roots_seventh.cpp examples/example001b_roots_almost_integer.cpp examples/example001c_roots_sqrt_limb08.cpp examples/example001d_pow2_from_list.cpp examples/example001e_algebra_and_constexpr.cpp examples/example002_pi.cpp examples/example002a_pi_small_limb.cpp examples/example002b_pi_100k.cpp examples/example002c_pi_quintic.cpp examples/example002d_pi_limb08.cpp examples/example003_zeta.cpp examples/example004_bessel_recur.cpp examples/example005_polylog_series.cpp examples/example006_logarithm.cpp examples/example007_catalan_series.cpp examples/example008_bernoulli_tgamma.cpp examples/example009_boost_math_standalone.cpp examples/example009a_boost_math_standalone.cpp examples/example009b_boost_math_standalone.cpp examples/example010_hypergeometric_2f1.cpp examples/example010a_hypergeometric_1f1.cpp examples/example011_trig_trapezoid_integral.cpp examples/example012_rational_floor_ceil.cpp examples/example013_embeddable_sqrt.cpp examples/example013a_embeddable_agm.cpp -o wide_decimal.exe | |
ls -la ./wide_decimal.exe | |
./wide_decimal.exe | |
gcc-clang-native-cpp_dec_float: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
shell: bash | |
strategy: | |
fail-fast: false | |
matrix: | |
standard: [ c++14, c++20 ] | |
compiler: [ g++, clang++ ] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: '0' | |
- name: clone-submods-bootstrap-headers-boost-develop | |
run: | | |
git clone -b develop --depth 1 https://github.com/boostorg/boost.git ../boost-root | |
cd ../boost-root | |
git submodule update --init tools | |
git submodule update --init libs/config | |
git submodule update --init libs/math | |
git submodule update --init libs/multiprecision | |
./bootstrap.sh | |
./b2 headers | |
- name: gcc-clang-native-cpp_dec_float | |
run: | | |
echo "compile ./wide_decimal.exe" | |
${{ matrix.compiler }} -v | |
${{ matrix.compiler }} -fno-exceptions -fno-rtti -finline-functions -m64 -O3 -Werror -Wall -Wextra -Wpedantic -Wpedantic -Wconversion -Wsign-conversion -std=${{ matrix.standard }} -DDECWIDE_T_TEST_OPTION_TEST_CPP_DEC_FLOAT -I. -I../boost-root -pthread -lpthread test/test.cpp test/test_decwide_t_algebra.cpp test/test_decwide_t_algebra_edge.cpp test/test_decwide_t_examples.cpp examples/example000a_multiply_pi_squared.cpp examples/example000_multiply_nines.cpp examples/example001_roots_sqrt.cpp examples/example001a_roots_seventh.cpp examples/example001b_roots_almost_integer.cpp examples/example001c_roots_sqrt_limb08.cpp examples/example001d_pow2_from_list.cpp examples/example001e_algebra_and_constexpr.cpp examples/example002_pi.cpp examples/example002a_pi_small_limb.cpp examples/example002b_pi_100k.cpp examples/example002c_pi_quintic.cpp examples/example002d_pi_limb08.cpp examples/example003_zeta.cpp examples/example004_bessel_recur.cpp examples/example005_polylog_series.cpp examples/example006_logarithm.cpp examples/example007_catalan_series.cpp examples/example008_bernoulli_tgamma.cpp examples/example009_boost_math_standalone.cpp examples/example009a_boost_math_standalone.cpp examples/example009b_boost_math_standalone.cpp examples/example010_hypergeometric_2f1.cpp examples/example010a_hypergeometric_1f1.cpp examples/example011_trig_trapezoid_integral.cpp examples/example012_rational_floor_ceil.cpp examples/example013_embeddable_sqrt.cpp examples/example013a_embeddable_agm.cpp -o wide_decimal.exe | |
ls -la ./wide_decimal.exe | |
./wide_decimal.exe | |
gcc-clang-native-asan: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
shell: bash | |
strategy: | |
fail-fast: false | |
matrix: | |
standard: [ c++20 ] | |
compiler: [ g++, clang++ ] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: '0' | |
- name: clone-submods-bootstrap-headers-boost-develop | |
run: | | |
git clone -b develop --depth 1 https://github.com/boostorg/boost.git ../boost-root | |
cd ../boost-root | |
git submodule update --init tools | |
git submodule update --init libs/config | |
git submodule update --init libs/math | |
git submodule update --init libs/multiprecision | |
./bootstrap.sh | |
./b2 headers | |
- name: gcc-clang-native-asan | |
run: | | |
echo "compile ./wide_decimal.exe" | |
${{ matrix.compiler }} -v | |
${{ matrix.compiler }} -fno-exceptions -fno-rtti -fsanitize=address -fsanitize=leak -m64 -O1 -Werror -Wall -Wextra -Wpedantic -Wpedantic -Wconversion -Wsign-conversion -std=${{ matrix.standard }} -I. -I../boost-root -pthread -lpthread test/test.cpp test/test_decwide_t_algebra.cpp test/test_decwide_t_algebra_edge.cpp test/test_decwide_t_examples.cpp examples/example000a_multiply_pi_squared.cpp examples/example000_multiply_nines.cpp examples/example001_roots_sqrt.cpp examples/example001a_roots_seventh.cpp examples/example001b_roots_almost_integer.cpp examples/example001c_roots_sqrt_limb08.cpp examples/example001d_pow2_from_list.cpp examples/example001e_algebra_and_constexpr.cpp examples/example002b_pi_100k.cpp examples/example003_zeta.cpp examples/example004_bessel_recur.cpp examples/example005_polylog_series.cpp examples/example006_logarithm.cpp examples/example007_catalan_series.cpp examples/example008_bernoulli_tgamma.cpp examples/example009_boost_math_standalone.cpp examples/example009a_boost_math_standalone.cpp examples/example009b_boost_math_standalone.cpp examples/example010_hypergeometric_2f1.cpp examples/example010a_hypergeometric_1f1.cpp examples/example011_trig_trapezoid_integral.cpp examples/example012_rational_floor_ceil.cpp examples/example013_embeddable_sqrt.cpp examples/example013a_embeddable_agm.cpp -o wide_decimal.exe | |
ls -la ./wide_decimal.exe | |
setarch `uname -m` -R ./wide_decimal.exe | |
gcc-clang-native-cpp_dec_float-asan: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
shell: bash | |
strategy: | |
fail-fast: false | |
matrix: | |
standard: [ c++14, c++20 ] | |
compiler: [ g++, clang++ ] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: '0' | |
- name: clone-submods-bootstrap-headers-boost-develop | |
run: | | |
git clone -b develop --depth 1 https://github.com/boostorg/boost.git ../boost-root | |
cd ../boost-root | |
git submodule update --init tools | |
git submodule update --init libs/config | |
git submodule update --init libs/math | |
git submodule update --init libs/multiprecision | |
./bootstrap.sh | |
./b2 headers | |
- name: gcc-clang-native-cpp_dec_float-asan | |
run: | | |
echo "compile ./wide_decimal.exe" | |
${{ matrix.compiler }} -v | |
${{ matrix.compiler }} -fno-exceptions -fno-rtti -fsanitize=address -fsanitize=leak -m64 -O1 -Werror -Wall -Wextra -Wpedantic -Wpedantic -Wconversion -Wsign-conversion -std=${{ matrix.standard }} -DDECWIDE_T_TEST_OPTION_TEST_CPP_DEC_FLOAT -I. -I../boost-root -pthread -lpthread test/test.cpp test/test_decwide_t_algebra.cpp test/test_decwide_t_algebra_edge.cpp test/test_decwide_t_examples.cpp examples/example000a_multiply_pi_squared.cpp examples/example000_multiply_nines.cpp examples/example001_roots_sqrt.cpp examples/example001a_roots_seventh.cpp examples/example001b_roots_almost_integer.cpp examples/example001c_roots_sqrt_limb08.cpp examples/example001d_pow2_from_list.cpp examples/example001e_algebra_and_constexpr.cpp examples/example002b_pi_100k.cpp examples/example003_zeta.cpp examples/example004_bessel_recur.cpp examples/example005_polylog_series.cpp examples/example006_logarithm.cpp examples/example007_catalan_series.cpp examples/example008_bernoulli_tgamma.cpp examples/example009_boost_math_standalone.cpp examples/example009a_boost_math_standalone.cpp examples/example009b_boost_math_standalone.cpp examples/example010_hypergeometric_2f1.cpp examples/example010a_hypergeometric_1f1.cpp examples/example011_trig_trapezoid_integral.cpp examples/example012_rational_floor_ceil.cpp examples/example013_embeddable_sqrt.cpp examples/example013a_embeddable_agm.cpp -o wide_decimal.exe | |
ls -la ./wide_decimal.exe | |
setarch `uname -m` -R ./wide_decimal.exe | |
gcc-clang-native-ubsan: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
shell: bash | |
strategy: | |
fail-fast: false | |
matrix: | |
standard: [ c++20 ] | |
compiler: [ g++, clang++ ] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: '0' | |
- name: clone-submods-bootstrap-headers-boost-develop | |
run: | | |
git clone -b develop --depth 1 https://github.com/boostorg/boost.git ../boost-root | |
cd ../boost-root | |
git submodule update --init tools | |
git submodule update --init libs/config | |
git submodule update --init libs/math | |
git submodule update --init libs/multiprecision | |
./bootstrap.sh | |
./b2 headers | |
- name: gcc-clang-native-ubsan | |
run: | | |
echo "compile ./wide_decimal.exe" | |
${{ matrix.compiler }} -v | |
${{ matrix.compiler }} -fno-exceptions -finline-functions -fsanitize=undefined -fsanitize=shift -fsanitize=shift-exponent -fsanitize=shift-base -fsanitize=integer-divide-by-zero -fsanitize=unreachable -fsanitize=vla-bound -fsanitize=null -fsanitize=return -fsanitize=signed-integer-overflow -fsanitize=bounds -fsanitize=alignment -fsanitize=object-size -fsanitize=float-divide-by-zero -fsanitize=float-cast-overflow -fsanitize=nonnull-attribute -fsanitize=returns-nonnull-attribute -fsanitize=bool -fsanitize=enum -fsanitize=vptr -m64 -O3 -Werror -Wall -Wextra -Wpedantic -Wpedantic -Wconversion -Wsign-conversion -std=${{ matrix.standard }} -I. -I../boost-root -pthread -lpthread test/test.cpp test/test_decwide_t_algebra.cpp test/test_decwide_t_algebra_edge.cpp test/test_decwide_t_examples.cpp examples/example000a_multiply_pi_squared.cpp examples/example000_multiply_nines.cpp examples/example001_roots_sqrt.cpp examples/example001a_roots_seventh.cpp examples/example001b_roots_almost_integer.cpp examples/example001c_roots_sqrt_limb08.cpp examples/example001d_pow2_from_list.cpp examples/example001e_algebra_and_constexpr.cpp examples/example002_pi.cpp examples/example002a_pi_small_limb.cpp examples/example002b_pi_100k.cpp examples/example002c_pi_quintic.cpp examples/example002d_pi_limb08.cpp examples/example003_zeta.cpp examples/example004_bessel_recur.cpp examples/example005_polylog_series.cpp examples/example006_logarithm.cpp examples/example007_catalan_series.cpp examples/example008_bernoulli_tgamma.cpp examples/example009_boost_math_standalone.cpp examples/example009a_boost_math_standalone.cpp examples/example009b_boost_math_standalone.cpp examples/example010_hypergeometric_2f1.cpp examples/example010a_hypergeometric_1f1.cpp examples/example011_trig_trapezoid_integral.cpp examples/example012_rational_floor_ceil.cpp examples/example013_embeddable_sqrt.cpp examples/example013a_embeddable_agm.cpp -o wide_decimal.exe | |
ls -la ./wide_decimal.exe | |
./wide_decimal.exe | |
gcc-clang-native-cpp_dec_float-ubsan: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
shell: bash | |
strategy: | |
fail-fast: false | |
matrix: | |
standard: [ c++20 ] | |
compiler: [ g++, clang++ ] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: '0' | |
- name: clone-submods-bootstrap-headers-boost-develop | |
run: | | |
git clone -b develop --depth 1 https://github.com/boostorg/boost.git ../boost-root | |
cd ../boost-root | |
git submodule update --init tools | |
git submodule update --init libs/config | |
git submodule update --init libs/math | |
git submodule update --init libs/multiprecision | |
./bootstrap.sh | |
./b2 headers | |
- name: gcc-clang-native-cpp_dec_float-ubsan | |
run: | | |
echo "compile ./wide_decimal.exe" | |
${{ matrix.compiler }} -v | |
${{ matrix.compiler }} -fno-exceptions -finline-functions -fsanitize=undefined -fsanitize=shift -fsanitize=shift-exponent -fsanitize=shift-base -fsanitize=integer-divide-by-zero -fsanitize=unreachable -fsanitize=vla-bound -fsanitize=null -fsanitize=return -fsanitize=signed-integer-overflow -fsanitize=bounds -fsanitize=alignment -fsanitize=object-size -fsanitize=float-divide-by-zero -fsanitize=float-cast-overflow -fsanitize=nonnull-attribute -fsanitize=returns-nonnull-attribute -fsanitize=bool -fsanitize=enum -fsanitize=vptr -m64 -O3 -Werror -Wall -Wextra -Wpedantic -Wpedantic -Wconversion -Wsign-conversion -std=${{ matrix.standard }} -DDECWIDE_T_TEST_OPTION_TEST_CPP_DEC_FLOAT -I. -I../boost-root -pthread -lpthread test/test.cpp test/test_decwide_t_algebra.cpp test/test_decwide_t_algebra_edge.cpp test/test_decwide_t_examples.cpp examples/example000a_multiply_pi_squared.cpp examples/example000_multiply_nines.cpp examples/example001_roots_sqrt.cpp examples/example001a_roots_seventh.cpp examples/example001b_roots_almost_integer.cpp examples/example001c_roots_sqrt_limb08.cpp examples/example001d_pow2_from_list.cpp examples/example001e_algebra_and_constexpr.cpp examples/example002_pi.cpp examples/example002a_pi_small_limb.cpp examples/example002b_pi_100k.cpp examples/example002c_pi_quintic.cpp examples/example002d_pi_limb08.cpp examples/example003_zeta.cpp examples/example004_bessel_recur.cpp examples/example005_polylog_series.cpp examples/example006_logarithm.cpp examples/example007_catalan_series.cpp examples/example008_bernoulli_tgamma.cpp examples/example009_boost_math_standalone.cpp examples/example009a_boost_math_standalone.cpp examples/example009b_boost_math_standalone.cpp examples/example010_hypergeometric_2f1.cpp examples/example010a_hypergeometric_1f1.cpp examples/example011_trig_trapezoid_integral.cpp examples/example012_rational_floor_ceil.cpp examples/example013_embeddable_sqrt.cpp examples/example013a_embeddable_agm.cpp -o wide_decimal.exe | |
ls -la ./wide_decimal.exe | |
./wide_decimal.exe | |
gcc-clang-native-tsan: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
shell: bash | |
strategy: | |
fail-fast: false | |
matrix: | |
standard: [ c++20 ] | |
compiler: [ g++, clang++ ] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: '0' | |
- name: clone-submods-bootstrap-headers-boost-develop | |
run: | | |
git clone -b develop --depth 1 https://github.com/boostorg/boost.git ../boost-root | |
cd ../boost-root | |
git submodule update --init tools | |
git submodule update --init libs/config | |
git submodule update --init libs/math | |
git submodule update --init libs/multiprecision | |
./bootstrap.sh | |
./b2 headers | |
- name: gcc-clang-native-tsan | |
run: | | |
echo "compile ./wide_decimal.exe" | |
${{ matrix.compiler }} -v | |
${{ matrix.compiler }} -fno-exceptions -fno-rtti -finline-functions -fsanitize=thread -m64 -O2 -Werror -Wall -Wextra -Wpedantic -Wpedantic -Wconversion -Wsign-conversion -std=${{ matrix.standard }} -I. -I../boost-root -pthread -lpthread test/test.cpp test/test_decwide_t_algebra.cpp test/test_decwide_t_algebra_edge.cpp test/test_decwide_t_examples.cpp examples/example000a_multiply_pi_squared.cpp examples/example000_multiply_nines.cpp examples/example001_roots_sqrt.cpp examples/example001a_roots_seventh.cpp examples/example001b_roots_almost_integer.cpp examples/example001c_roots_sqrt_limb08.cpp examples/example001d_pow2_from_list.cpp examples/example001e_algebra_and_constexpr.cpp examples/example002_pi.cpp examples/example002a_pi_small_limb.cpp examples/example002b_pi_100k.cpp examples/example002c_pi_quintic.cpp examples/example002d_pi_limb08.cpp examples/example003_zeta.cpp examples/example004_bessel_recur.cpp examples/example005_polylog_series.cpp examples/example006_logarithm.cpp examples/example007_catalan_series.cpp examples/example008_bernoulli_tgamma.cpp examples/example009_boost_math_standalone.cpp examples/example009a_boost_math_standalone.cpp examples/example009b_boost_math_standalone.cpp examples/example010_hypergeometric_2f1.cpp examples/example010a_hypergeometric_1f1.cpp examples/example011_trig_trapezoid_integral.cpp examples/example012_rational_floor_ceil.cpp examples/example013_embeddable_sqrt.cpp examples/example013a_embeddable_agm.cpp -o wide_decimal.exe | |
ls -la ./wide_decimal.exe | |
setarch `uname -m` -R ./wide_decimal.exe | |
gcc-clang-10: | |
runs-on: ubuntu-20.04 | |
defaults: | |
run: | |
shell: bash | |
strategy: | |
fail-fast: false | |
matrix: | |
standard: [ c++14, c++20 ] | |
compiler: [ g++-10, clang++-10, clang++-11 ] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: '0' | |
- name: clone-submods-bootstrap-headers-boost-develop | |
run: | | |
git clone -b develop --depth 1 https://github.com/boostorg/boost.git ../boost-root | |
cd ../boost-root | |
git submodule update --init tools | |
git submodule update --init libs/config | |
git submodule update --init libs/math | |
git submodule update --init libs/multiprecision | |
./bootstrap.sh | |
./b2 headers | |
- name: update-tools | |
run: sudo apt install g++-10 clang-10 clang-11 | |
- name: gcc-clang-10 | |
run: | | |
echo "compile ./wide_decimal.exe" | |
${{ matrix.compiler }} -v | |
${{ matrix.compiler }} -fno-exceptions -fno-rtti -finline-functions -m64 -O3 -Werror -Wall -Wextra -Wpedantic -Wconversion -Wsign-conversion -Wshadow -Wunused-parameter -Wuninitialized -Wunreachable-code -Winit-self -Wzero-as-null-pointer-constant -std=${{ matrix.standard }} -I. -I../boost-root -pthread -lpthread test/test.cpp test/test_decwide_t_algebra.cpp test/test_decwide_t_algebra_edge.cpp test/test_decwide_t_examples.cpp examples/example000a_multiply_pi_squared.cpp examples/example000_multiply_nines.cpp examples/example001_roots_sqrt.cpp examples/example001a_roots_seventh.cpp examples/example001b_roots_almost_integer.cpp examples/example001c_roots_sqrt_limb08.cpp examples/example001d_pow2_from_list.cpp examples/example001e_algebra_and_constexpr.cpp examples/example002_pi.cpp examples/example002a_pi_small_limb.cpp examples/example002b_pi_100k.cpp examples/example002c_pi_quintic.cpp examples/example002d_pi_limb08.cpp examples/example003_zeta.cpp examples/example004_bessel_recur.cpp examples/example005_polylog_series.cpp examples/example006_logarithm.cpp examples/example007_catalan_series.cpp examples/example008_bernoulli_tgamma.cpp examples/example009_boost_math_standalone.cpp examples/example009a_boost_math_standalone.cpp examples/example009b_boost_math_standalone.cpp examples/example010_hypergeometric_2f1.cpp examples/example010a_hypergeometric_1f1.cpp examples/example011_trig_trapezoid_integral.cpp examples/example012_rational_floor_ceil.cpp examples/example013_embeddable_sqrt.cpp examples/example013a_embeddable_agm.cpp -o wide_decimal.exe | |
ls -la ./wide_decimal.exe | |
./wide_decimal.exe | |
gcc-clang-10-cpp_dec_float: | |
runs-on: ubuntu-20.04 | |
defaults: | |
run: | |
shell: bash | |
strategy: | |
fail-fast: false | |
matrix: | |
standard: [ c++14, c++20 ] | |
compiler: [ g++-10, clang++-10 ] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: '0' | |
- name: clone-submods-bootstrap-headers-boost-develop | |
run: | | |
git clone -b develop --depth 1 https://github.com/boostorg/boost.git ../boost-root | |
cd ../boost-root | |
git submodule update --init tools | |
git submodule update --init libs/config | |
git submodule update --init libs/math | |
git submodule update --init libs/multiprecision | |
./bootstrap.sh | |
./b2 headers | |
- name: update-tools | |
run: sudo apt install gcc-10 clang-10 | |
- name: gcc-clang-10-cpp_dec_float | |
run: | | |
echo "compile ./wide_decimal.exe" | |
${{ matrix.compiler }} -v | |
${{ matrix.compiler }} -fno-exceptions -fno-rtti -finline-functions -m64 -O3 -Werror -Wall -Wextra -Wpedantic -Wconversion -Wsign-conversion -Wshadow -Wunused-parameter -Wuninitialized -Wunreachable-code -Winit-self -Wzero-as-null-pointer-constant -std=${{ matrix.standard }} -DDECWIDE_T_TEST_OPTION_TEST_CPP_DEC_FLOAT -I. -I../boost-root -pthread -lpthread test/test.cpp test/test_decwide_t_algebra.cpp test/test_decwide_t_algebra_edge.cpp test/test_decwide_t_examples.cpp examples/example000a_multiply_pi_squared.cpp examples/example000_multiply_nines.cpp examples/example001_roots_sqrt.cpp examples/example001a_roots_seventh.cpp examples/example001b_roots_almost_integer.cpp examples/example001c_roots_sqrt_limb08.cpp examples/example001d_pow2_from_list.cpp examples/example001e_algebra_and_constexpr.cpp examples/example002_pi.cpp examples/example002a_pi_small_limb.cpp examples/example002b_pi_100k.cpp examples/example002c_pi_quintic.cpp examples/example002d_pi_limb08.cpp examples/example003_zeta.cpp examples/example004_bessel_recur.cpp examples/example005_polylog_series.cpp examples/example006_logarithm.cpp examples/example007_catalan_series.cpp examples/example008_bernoulli_tgamma.cpp examples/example009_boost_math_standalone.cpp examples/example009a_boost_math_standalone.cpp examples/example009b_boost_math_standalone.cpp examples/example010_hypergeometric_2f1.cpp examples/example010a_hypergeometric_1f1.cpp examples/example011_trig_trapezoid_integral.cpp examples/example012_rational_floor_ceil.cpp examples/example013_embeddable_sqrt.cpp examples/example013a_embeddable_agm.cpp -o wide_decimal.exe | |
ls -la ./wide_decimal.exe | |
./wide_decimal.exe | |
apple-gcc-clang-native: | |
runs-on: macos-latest | |
defaults: | |
run: | |
shell: bash | |
strategy: | |
fail-fast: false | |
matrix: | |
standard: [ c++14, c++20 ] | |
compiler: [ g++, clang++ ] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: '0' | |
- name: clone-submods-bootstrap-headers-boost-develop | |
run: | | |
git clone -b develop --depth 1 https://github.com/boostorg/boost.git ../boost-root | |
cd ../boost-root | |
git submodule update --init tools | |
git submodule update --init libs/config | |
git submodule update --init libs/math | |
git submodule update --init libs/multiprecision | |
./bootstrap.sh | |
./b2 headers | |
- name: apple-gcc-clang-native | |
run: | | |
echo "compile ./wide_decimal.exe" | |
${{ matrix.compiler }} -v | |
${{ matrix.compiler }} -fno-exceptions -fno-rtti -finline-functions -m64 -O3 -Werror -Wall -Wextra -Wpedantic -Wconversion -Wsign-conversion -Wshadow -Wunused-parameter -Wuninitialized -Wunreachable-code -Winit-self -Wzero-as-null-pointer-constant -std=${{ matrix.standard }} -I. -I../boost-root -pthread -lpthread test/test.cpp test/test_decwide_t_algebra.cpp test/test_decwide_t_algebra_edge.cpp test/test_decwide_t_examples.cpp examples/example000a_multiply_pi_squared.cpp examples/example000_multiply_nines.cpp examples/example001_roots_sqrt.cpp examples/example001a_roots_seventh.cpp examples/example001b_roots_almost_integer.cpp examples/example001c_roots_sqrt_limb08.cpp examples/example001d_pow2_from_list.cpp examples/example001e_algebra_and_constexpr.cpp examples/example002_pi.cpp examples/example002a_pi_small_limb.cpp examples/example002b_pi_100k.cpp examples/example002c_pi_quintic.cpp examples/example002d_pi_limb08.cpp examples/example003_zeta.cpp examples/example004_bessel_recur.cpp examples/example005_polylog_series.cpp examples/example006_logarithm.cpp examples/example007_catalan_series.cpp examples/example008_bernoulli_tgamma.cpp examples/example009_boost_math_standalone.cpp examples/example009a_boost_math_standalone.cpp examples/example009b_boost_math_standalone.cpp examples/example010_hypergeometric_2f1.cpp examples/example010a_hypergeometric_1f1.cpp examples/example011_trig_trapezoid_integral.cpp examples/example012_rational_floor_ceil.cpp examples/example013_embeddable_sqrt.cpp examples/example013a_embeddable_agm.cpp -o wide_decimal.exe | |
ls -la ./wide_decimal.exe | |
./wide_decimal.exe | |
msvc-release-x64: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: '0' | |
- uses: ilammy/msvc-dev-cmd@v1 | |
with: | |
toolset: 14.2 | |
- name: clone-submods-bootstrap-headers-boost-develop | |
run: | | |
git clone -b develop --depth 1 https://github.com/boostorg/boost.git ../boost-root | |
cd ../boost-root | |
git submodule update --init tools | |
git submodule update --init libs/config | |
git submodule update --init libs/math | |
git submodule update --init libs/multiprecision | |
./bootstrap.bat | |
./b2 headers | |
- uses: actions/checkout@v4 | |
- uses: ilammy/msvc-dev-cmd@v1 | |
with: | |
toolset: 14.2 | |
- name: msvc-release-x64 | |
shell: cmd | |
working-directory: ./ | |
run: | | |
set INCLUDE=%cd%;%cd%\..\boost-root;%INCLUDE% | |
MSBuild -m wide_decimal.sln -p:useenv=true -p:Configuration=wide-decimal-release -p:Platform=x64 /t:Rebuild | |
dir %cd%\wide-decimal-release-x64\wide-decimal-release-x64.exe | |
%cd%\wide-decimal-release-x64\wide-decimal-release-x64.exe | |
msvc-release-x64-vs2022: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: clone-boost-develop | |
working-directory: ${{ runner.workspace }} | |
run: | | |
git clone -b develop --depth 1 https://github.com/boostorg/boost.git ${{ runner.workspace }}/boost-root | |
- name: clone-boost-submods | |
working-directory: ${{ runner.workspace }}/boost-root | |
run: | | |
git submodule update --init tools | |
git submodule update --init libs/config | |
git submodule update --init libs/math | |
git submodule update --init libs/multiprecision | |
- uses: ilammy/msvc-dev-cmd@v1 | |
with: | |
toolset: 14.2 | |
- name: bootstrap-boost | |
working-directory: ${{ runner.workspace }}/boost-root | |
run: | | |
./bootstrap.bat | |
./b2 headers | |
- name: msvc-release-x64-vs2022 | |
shell: cmd | |
working-directory: ./ | |
run: | | |
set INCLUDE=%cd% | |
set INCLUDE=${{ runner.workspace }}\boost-root;%INCLUDE% | |
MSBuild -m wide_decimal_vs2022.sln -p:useenv=true -p:Configuration=wide-decimal-release -p:Platform=x64 /t:Rebuild | |
dir %cd%\wide-decimal-release-x64\wide-decimal-release-x64.exe | |
%cd%\wide-decimal-release-x64\wide-decimal-release-x64.exe | |
mingw-winhost-x64: | |
runs-on: windows-latest | |
defaults: | |
run: | |
shell: msys2 {0} | |
strategy: | |
fail-fast: false | |
matrix: | |
compiler: [ g++ ] | |
standard: [ c++14, c++20 ] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: '0' | |
- uses: msys2/setup-msys2@v2 | |
with: | |
msystem: UCRT64 | |
update: true | |
install: git mingw-w64-ucrt-x86_64-gcc | |
- name: clone-submods-bootstrap-headers-boost-develop | |
run: | | |
git clone -b develop --depth 1 https://github.com/boostorg/boost.git ../boost-root | |
cd ../boost-root | |
git submodule update --init tools | |
git submodule update --init libs/config | |
git submodule update --init libs/math | |
git submodule update --init libs/multiprecision | |
./bootstrap.sh | |
./b2 headers | |
- name: msys2-winhost-x64 | |
working-directory: ./ | |
run: | | |
echo compile ./wide_decimal.exe | |
${{ matrix.compiler }} -v | |
${{ matrix.compiler }} -fno-exceptions -fno-rtti -finline-functions -m64 -O3 -Wall -Wextra -Wpedantic -Wconversion -Wsign-conversion -Wshadow -Wunused-parameter -Wuninitialized -Wunreachable-code -Winit-self -Wzero-as-null-pointer-constant -std=${{ matrix.standard }} -I. -I../boost-root -pthread -lpthread test/test.cpp test/test_decwide_t_algebra.cpp test/test_decwide_t_algebra_edge.cpp test/test_decwide_t_examples.cpp examples/example000a_multiply_pi_squared.cpp examples/example000_multiply_nines.cpp examples/example001_roots_sqrt.cpp examples/example001a_roots_seventh.cpp examples/example001b_roots_almost_integer.cpp examples/example001c_roots_sqrt_limb08.cpp examples/example001d_pow2_from_list.cpp examples/example001e_algebra_and_constexpr.cpp examples/example002_pi.cpp examples/example002a_pi_small_limb.cpp examples/example002b_pi_100k.cpp examples/example002c_pi_quintic.cpp examples/example002d_pi_limb08.cpp examples/example003_zeta.cpp examples/example004_bessel_recur.cpp examples/example005_polylog_series.cpp examples/example006_logarithm.cpp examples/example007_catalan_series.cpp examples/example008_bernoulli_tgamma.cpp examples/example009_boost_math_standalone.cpp examples/example009a_boost_math_standalone.cpp examples/example009b_boost_math_standalone.cpp examples/example010_hypergeometric_2f1.cpp examples/example010a_hypergeometric_1f1.cpp examples/example011_trig_trapezoid_integral.cpp examples/example012_rational_floor_ceil.cpp examples/example013_embeddable_sqrt.cpp examples/example013a_embeddable_agm.cpp -o wide_decimal.exe | |
ls -la ./wide_decimal.exe | |
./wide_decimal.exe | |
cygwin-winhost-x64: | |
runs-on: windows-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
compiler: [ g++ ] | |
standard: [ c++17, c++20 ] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: '0' | |
- name: clone-submods-boost-develop | |
run: | | |
git clone -b develop --depth 1 https://github.com/boostorg/boost.git ../boost-root | |
cd ../boost-root | |
git submodule update --init tools | |
git submodule update --init libs/config | |
git submodule update --init libs/math | |
git submodule update --init libs/multiprecision | |
- uses: cygwin/cygwin-install-action@master | |
with: | |
check-sig: false | |
site: https://ftp.fau.de/cygwin/ | |
packages: gcc-core gcc-g++ | |
- name: boost-bootstrap | |
run: bash -l -c 'cd $(cygpath -u "$GITHUB_WORKSPACE")/../boost-root && ./bootstrap.sh' | |
- name: boost-generate-headers | |
run: bash -l -c 'cd $(cygpath -u "$GITHUB_WORKSPACE")/../boost-root && ./b2 headers' | |
- name: query-gcc-version | |
run: bash -l -c 'cd $(cygpath -u "$GITHUB_WORKSPACE") && echo print-compiler-version && ${{ matrix.compiler }} -v' | |
- name: wide-decimal-compile | |
run: bash -l -c 'cd $(cygpath -u "$GITHUB_WORKSPACE") && ${{ matrix.compiler }} -m64 -O2 -Werror -Wall -Wextra -Wpedantic -Wconversion -Wsign-conversion -Wshadow -Wunused-parameter -Wuninitialized -Wunreachable-code -Winit-self -Wzero-as-null-pointer-constant -std=${{ matrix.standard }} -I. -I../boost-root -pthread -lpthread test/test.cpp test/test_decwide_t_algebra.cpp test/test_decwide_t_algebra_edge.cpp test/test_decwide_t_examples.cpp examples/example000a_multiply_pi_squared.cpp examples/example000_multiply_nines.cpp examples/example001_roots_sqrt.cpp examples/example001a_roots_seventh.cpp examples/example001b_roots_almost_integer.cpp examples/example001c_roots_sqrt_limb08.cpp examples/example001d_pow2_from_list.cpp examples/example001e_algebra_and_constexpr.cpp examples/example002_pi.cpp examples/example002a_pi_small_limb.cpp examples/example002b_pi_100k.cpp examples/example002c_pi_quintic.cpp examples/example002d_pi_limb08.cpp examples/example003_zeta.cpp examples/example004_bessel_recur.cpp examples/example005_polylog_series.cpp examples/example006_logarithm.cpp examples/example007_catalan_series.cpp examples/example008_bernoulli_tgamma.cpp examples/example009_boost_math_standalone.cpp examples/example009a_boost_math_standalone.cpp examples/example009b_boost_math_standalone.cpp examples/example010_hypergeometric_2f1.cpp examples/example010a_hypergeometric_1f1.cpp examples/example011_trig_trapezoid_integral.cpp examples/example012_rational_floor_ceil.cpp examples/example013_embeddable_sqrt.cpp examples/example013a_embeddable_agm.cpp -o wide_decimal.exe' | |
- name: wide-decimal-run | |
run: bash -l -c 'cd $(cygpath -u "$GITHUB_WORKSPACE") && ./wide_decimal.exe' | |
gcc-arm-none-eabi: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
shell: bash | |
strategy: | |
fail-fast: false | |
matrix: | |
example: [ example013_embeddable_sqrt, example013a_embeddable_agm ] | |
standard: [ c++14, c++2a ] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: '0' | |
- name: update-tools | |
run: sudo apt install gcc-arm-none-eabi | |
- id: upcase_my_example | |
uses: ASzc/change-string-case-action@v6 | |
with: | |
string: ${{ matrix.example }} | |
- name: gcc-arm-none-eabi | |
run: | | |
mkdir bin | |
echo ${{ steps.upcase_my_example.outputs.uppercase }} | |
echo 'compile examples/${{ matrix.example }}.cpp with:' | |
echo 'query arm-none-eabi-g++ version' | |
arm-none-eabi-g++ -v | |
echo 'arm-none-eabi-g++ -x c++ -std=${{ matrix.standard }} -Os -Werror -Wall -Wextra -Wpedantic -Wpedantic -Wmain -Wconversion -Wsign-conversion -Wunused-parameter -Wuninitialized -Wmissing-declarations -Wshadow -Wunreachable-code -Wswitch-default -Wswitch-enum -Wcast-align -Wmissing-include-dirs -Winit-self -Wfloat-equal -Wdouble-promotion -Wno-psabi -mcpu=cortex-m4 -mtune=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -ffast-math -mno-unaligned-access -mno-long-calls -finline-functions -finline-limit=32 -g -gdwarf-2 -fno-exceptions -ffunction-sections -fdata-sections -fno-rtti -fno-use-cxa-atexit -fno-exceptions -fno-threadsafe-statics -fno-enforce-eh-specs -ftemplate-depth=32 -Wzero-as-null-pointer-constant -I. -DWIDE_DECIMAL_STANDALONE_${{ steps.upcase_my_example.outputs.uppercase }} examples/${{ matrix.example }}.cpp -Wl,--gc-sections -Wl,-Map,./bin/${{ matrix.example }}.map --specs=nano.specs --specs=nosys.specs -o bin/${{ matrix.example }}.elf' | |
arm-none-eabi-g++ -x c++ -std=${{ matrix.standard }} -Os -Werror -Wall -Wextra -Wpedantic -Wpedantic -Wmain -Wconversion -Wsign-conversion -Wunused-parameter -Wuninitialized -Wmissing-declarations -Wshadow -Wunreachable-code -Wswitch-default -Wswitch-enum -Wcast-align -Wmissing-include-dirs -Winit-self -Wfloat-equal -Wdouble-promotion -Wno-psabi -mcpu=cortex-m4 -mtune=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -ffast-math -mno-unaligned-access -mno-long-calls -finline-functions -finline-limit=32 -g -gdwarf-2 -fno-exceptions -ffunction-sections -fdata-sections -fno-rtti -fno-use-cxa-atexit -fno-exceptions -fno-threadsafe-statics -fno-enforce-eh-specs -ftemplate-depth=32 -Wzero-as-null-pointer-constant -I. -DWIDE_DECIMAL_STANDALONE_${{ steps.upcase_my_example.outputs.uppercase }} examples/${{ matrix.example }}.cpp -Wl,--gc-sections -Wl,-Map,./bin/${{ matrix.example }}.map --specs=nano.specs --specs=nosys.specs -o bin/${{ matrix.example }}.elf | |
echo | |
echo 'run objcopy with:' | |
echo 'arm-none-eabi-objcopy bin/${{ matrix.example }}.elf -O ihex bin/${{ matrix.example }}.hex' | |
arm-none-eabi-objcopy bin/${{ matrix.example }}.elf -O ihex bin/${{ matrix.example }}.hex | |
echo | |
echo 'ls -la bin/${{ matrix.example }}.elf bin/${{ matrix.example }}.map bin/${{ matrix.example }}.hex' | |
ls -la bin/${{ matrix.example }}.elf bin/${{ matrix.example }}.map bin/${{ matrix.example }}.hex | |
working-directory: ./ | |
gcc-avr: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
shell: bash | |
strategy: | |
fail-fast: false | |
matrix: | |
example: [ example013_embeddable_sqrt, example013a_embeddable_agm ] | |
standard: [ c++14 ] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: '0' | |
- name: update-tools | |
run: sudo apt install gcc-avr avr-libc | |
- name: clone-real-time-cpp | |
run: | | |
git clone -b master --depth 1 https://github.com/ckormanyos/real-time-cpp.git ../real-time-cpp-root | |
working-directory: ./ | |
- id: upcase_my_example | |
uses: ASzc/change-string-case-action@v6 | |
with: | |
string: ${{ matrix.example }} | |
- name: gcc-avr | |
run: | | |
mkdir bin | |
echo ${{ steps.upcase_my_example.outputs.uppercase }} | |
echo 'query avr-gcc version' | |
avr-g++ -v | |
echo 'compile examples/${{ matrix.example }}.cpp with:' | |
echo 'avr-g++ -x c++ -std=${{ matrix.standard }} -Os -Werror -Wall -Wextra -Wpedantic -Wpedantic -Wmain -Wconversion -Wsign-conversion -Wunused-parameter -Wuninitialized -Wmissing-declarations -Wshadow -Wunreachable-code -Wswitch-default -Wswitch-enum -Wcast-align -Wmissing-include-dirs -Winit-self -Wfloat-equal -Wdouble-promotion -mmcu=atmega328p -mrelax -finline-functions -finline-limit=32 -fsigned-char -g -gdwarf-2 -fno-exceptions -ffunction-sections -fdata-sections -fno-rtti -fno-use-cxa-atexit -fno-exceptions -fno-threadsafe-statics -fno-enforce-eh-specs -ftemplate-depth=32 -Wzero-as-null-pointer-constant -I. -I../real-time-cpp-root/ref_app/src -I../real-time-cpp-root/ref_app/src/util/STL -DWIDE_DECIMAL_STANDALONE_${{ steps.upcase_my_example.outputs.uppercase }} examples/${{ matrix.example }}.cpp util/stdcpp/stdcpp_patch.cpp -Wl,--gc-sections -Wl,-Map,./bin/${{ matrix.example }}.map -o bin/${{ matrix.example }}.elf' | |
avr-g++ -x c++ -std=${{ matrix.standard }} -Os -Werror -Wall -Wextra -Wpedantic -Wpedantic -Wmain -Wconversion -Wsign-conversion -Wunused-parameter -Wuninitialized -Wmissing-declarations -Wshadow -Wunreachable-code -Wswitch-default -Wswitch-enum -Wcast-align -Wmissing-include-dirs -Winit-self -Wfloat-equal -Wdouble-promotion -mmcu=atmega328p -mrelax -finline-functions -finline-limit=32 -fsigned-char -g -gdwarf-2 -fno-exceptions -ffunction-sections -fdata-sections -fno-rtti -fno-use-cxa-atexit -fno-exceptions -fno-threadsafe-statics -fno-enforce-eh-specs -ftemplate-depth=32 -Wzero-as-null-pointer-constant -I. -I../real-time-cpp-root/ref_app/src -I../real-time-cpp-root/ref_app/src/util/STL -DWIDE_DECIMAL_STANDALONE_${{ steps.upcase_my_example.outputs.uppercase }} examples/${{ matrix.example }}.cpp util/stdcpp/stdcpp_patch.cpp -Wl,--gc-sections -Wl,-Map,./bin/${{ matrix.example }}.map -o bin/${{ matrix.example }}.elf | |
echo | |
echo 'run objcopy with:' | |
echo 'avr-objcopy bin/${{ matrix.example }}.elf -O ihex bin/${{ matrix.example }}.hex' | |
avr-objcopy bin/${{ matrix.example }}.elf -O ihex bin/${{ matrix.example }}.hex | |
echo | |
echo 'ls -la bin/${{ matrix.example }}.elf bin/${{ matrix.example }}.map bin/${{ matrix.example }}.hex' | |
ls -la bin/${{ matrix.example }}.elf bin/${{ matrix.example }}.map bin/${{ matrix.example }}.hex | |
working-directory: ./ | |
gcc-arm-none-eabi-example008-stm32f429-qemu: | |
runs-on: ubuntu-22.04 | |
defaults: | |
run: | |
shell: bash | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: '0' | |
- name: update-tools | |
run: | | |
sudo apt install libncurses5 libpython2.7 | |
mkdir -p emu_env && cd emu_env | |
wget --no-check-certificate https://armkeil.blob.core.windows.net/developer/Files/downloads/gnu-rm/10.3-2021.10/gcc-arm-none-eabi-10.3-2021.10-x86_64-linux.tar.bz2 | |
tar -xvf gcc-arm-none-eabi-10.3-2021.10-x86_64-linux.tar.bz2 | |
wget --no-check-certificate https://github.com/xpack-dev-tools/qemu-arm-xpack/releases/download/v7.1.0-1/xpack-qemu-arm-7.1.0-1-linux-x64.tar.gz | |
tar -xvzf xpack-qemu-arm-7.1.0-1-linux-x64.tar.gz | |
working-directory: ./ | |
- name: build-example-stm32f429 | |
run: | | |
mkdir -p bin | |
emu_env/gcc-arm-none-eabi-10.3-2021.10/bin/arm-none-eabi-g++ -std=c++20 -Werror -Wall -Wextra -Wpedantic -Wpedantic -O2 -g -gdwarf-2 -ffunction-sections -fdata-sections -x c++ -fno-rtti -fno-use-cxa-atexit -fno-exceptions -fno-nonansi-builtins -fno-threadsafe-statics -fno-enforce-eh-specs -ftemplate-depth=32 -mcpu=cortex-m4 -mtune=cortex-m4 -mthumb -mfloat-abi=soft -mno-unaligned-access -mno-long-calls -I. -DWIDE_DECIMAL_STANDALONE_EXAMPLE008_BERNOULLI_TGAMMA ./examples/example008_bernoulli_tgamma.cpp ./target/micros/stm32f429/make/single/crt.cpp -nostartfiles -Wl,--gc-sections -Wl,-Map,./bin/example008_bernoulli_tgamma.map -T ./target/micros/stm32f429/make/stm32f429.ld --specs=nano.specs --specs=nosys.specs -o ./bin/example008_bernoulli_tgamma.elf | |
emu_env/gcc-arm-none-eabi-10.3-2021.10/bin/arm-none-eabi-objcopy ./bin/example008_bernoulli_tgamma.elf -O ihex ./bin/example008_bernoulli_tgamma.hex | |
ls -la ./bin/example008_bernoulli_tgamma.elf ./bin/example008_bernoulli_tgamma.hex ./bin/example008_bernoulli_tgamma.map | |
working-directory: ./ | |
- name: emulate-target-stm32f429 | |
run: | | |
./emu_env/xpack-qemu-arm-7.1.0-1/bin/qemu-system-gnuarmeclipse --verbose --mcu STM32F429ZI --nographic --gdb tcp::9999 -d unimp,guest_errors & | |
working-directory: ./ | |
- name: run-test-on-target | |
run: | | |
./emu_env/gcc-arm-none-eabi-10.3-2021.10/bin/arm-none-eabi-gdb-py ./bin/example008_bernoulli_tgamma.elf -x ./target/build/test_examples_emulator.py | |
qemu_result=$? | |
echo "qemu_result" "$qemu_result" | |
echo "qemu_result" "$qemu_result" | grep 'qemu_result 0' | |
working-directory: ./ | |
gcc-clang-high-precision: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
shell: bash | |
strategy: | |
fail-fast: false | |
matrix: | |
standard: [ c++14 ] | |
compiler: [ g++, clang++ ] | |
suite: [ test_high_precision_exp, test_high_precision_log ] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: '0' | |
- name: clone-submods-bootstrap-headers-boost-develop | |
run: | | |
git clone -b develop --depth 1 https://github.com/boostorg/boost.git ../boost-root | |
cd ../boost-root | |
git submodule update --init tools | |
git submodule update --init libs/config | |
git submodule update --init libs/math | |
git submodule update --init libs/multiprecision | |
./bootstrap.sh | |
./b2 headers | |
- name: update-tools | |
run: sudo apt install libgmp-dev libmpfr-dev | |
- name: gcc-clang-high-precision | |
run: | | |
echo "compile ./${{ matrix.suite }}.exe" | |
${{ matrix.compiler }} -v | |
${{ matrix.compiler }} -finline-functions -march=native -mtune=native -O3 -Werror -Wall -Wextra -Wpedantic -Wconversion -Wsign-conversion -Wshadow -Wunused-parameter -Wuninitialized -Wunreachable-code -Winit-self -Wzero-as-null-pointer-constant -std=${{ matrix.standard }} -DWIDE_DECIMAL_NAMESPACE=ckormanyos -I. -I../boost-root test/${{ matrix.suite }}.cpp -pthread -lmpfr -lgmp -lpthread -o ${{ matrix.suite }}.exe | |
ls -la ./${{ matrix.suite }}.exe | |
./${{ matrix.suite }}.exe | |
gcc-clang-mixed: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
shell: bash | |
strategy: | |
fail-fast: false | |
matrix: | |
standard: [ c++20 ] | |
compiler: [ g++, clang++ ] | |
suite: [ test_mixed_wide_decimal_wide_integer_b2n ] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: '0' | |
- name: clone-wide_integer | |
run: | | |
git clone -b master --depth 1 https://github.com/ckormanyos/wide-integer.git ../wide-integer-root | |
- name: gcc-clang-mixed | |
run: | | |
echo "compile ./${{ matrix.suite }}.exe" | |
${{ matrix.compiler }} -v | |
${{ matrix.compiler }} -finline-functions -march=native -mtune=native -O3 -Werror -Wall -Wextra -Wpedantic -Wconversion -Wsign-conversion -Wshadow -Wunused-parameter -Wuninitialized -Wunreachable-code -Winit-self -Wzero-as-null-pointer-constant -std=${{ matrix.standard }} -I. -I../wide-integer-root test/${{ matrix.suite }}.cpp -o ${{ matrix.suite }}.exe | |
ls -la ./${{ matrix.suite }}.exe | |
./${{ matrix.suite }}.exe | |
gcc-valgrind: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
shell: bash | |
strategy: | |
fail-fast: false | |
matrix: | |
standard: [ c++20 ] | |
compiler: [ g++ ] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: '0' | |
- name: clone-submods-bootstrap-headers-boost-develop | |
run: | | |
git clone -b develop --depth 1 https://github.com/boostorg/boost.git ../boost-root | |
cd ../boost-root | |
git submodule update --init tools | |
git submodule update --init libs/config | |
git submodule update --init libs/math | |
git submodule update --init libs/multiprecision | |
./bootstrap.sh | |
./b2 headers | |
- name: update-tools | |
run: | | |
sudo apt-get update -y | |
sudo apt-get install -y valgrind | |
- name: gcc-valgrind | |
run: | | |
echo "compile" | |
${{ matrix.compiler }} -v | |
${{ matrix.compiler }} -m64 -O2 -Werror -Wall -Wextra -Wpedantic -Wconversion -Wsign-conversion -Wshadow -Wunused-parameter -Wuninitialized -Wunreachable-code -Winit-self -Wzero-as-null-pointer-constant -std=c++14 -DWIDE_DECIMAL_HAS_COVERAGE -I. -I../boost-root -pthread -lpthread test/test.cpp test/test_decwide_t_algebra.cpp test/test_decwide_t_algebra_edge.cpp test/test_decwide_t_examples.cpp examples/example000a_multiply_pi_squared.cpp examples/example000_multiply_nines.cpp examples/example001_roots_sqrt.cpp examples/example001a_roots_seventh.cpp examples/example001b_roots_almost_integer.cpp examples/example001c_roots_sqrt_limb08.cpp examples/example001d_pow2_from_list.cpp examples/example001e_algebra_and_constexpr.cpp examples/example002_pi.cpp examples/example002a_pi_small_limb.cpp examples/example002b_pi_100k.cpp examples/example002c_pi_quintic.cpp examples/example002d_pi_limb08.cpp examples/example003_zeta.cpp examples/example004_bessel_recur.cpp examples/example005_polylog_series.cpp examples/example006_logarithm.cpp examples/example007_catalan_series.cpp examples/example008_bernoulli_tgamma.cpp examples/example009_boost_math_standalone.cpp examples/example009a_boost_math_standalone.cpp examples/example009b_boost_math_standalone.cpp examples/example010_hypergeometric_2f1.cpp examples/example010a_hypergeometric_1f1.cpp examples/example011_trig_trapezoid_integral.cpp examples/example012_rational_floor_ceil.cpp examples/example013_embeddable_sqrt.cpp examples/example013a_embeddable_agm.cpp -o wide_decimal.exe | |
valgrind --leak-check=yes --log-file=wide_decimal_valgrind.txt ./wide_decimal.exe | |
grep '0 bytes in 0 blocks' wide_decimal_valgrind.txt | |
grep '0 errors from 0 contexts' wide_decimal_valgrind.txt |