Skip to content

Merge pull request #472 from ckormanyos/restore_sonar #485

Merge pull request #472 from ckormanyos/restore_sonar

Merge pull request #472 from ckormanyos/restore_sonar #485

# ------------------------------------------------------------------------------
# Copyright Christopher Kormanyos 2022 - 2025.
# 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_integer_sonar
on:
push:
branches:
- master
pull_request:
types: [opened, synchronize, reopened]
jobs:
sonar-gcc-native:
runs-on: ubuntu-latest
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/multiprecision
./bootstrap.sh
./b2 headers
- name: Install Build Wrapper
uses: SonarSource/sonarqube-scan-action/install-build-wrapper@v6.0.0
env:
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}
- name: Run Build Wrapper
run: |
build-wrapper-linux-x86-64 --out-dir ${{ runner.workspace }}/build_wrapper_output_directory g++ -finline-functions -m64 -O3 -Werror -Wall -Wextra -Wconversion -Wsign-conversion -std=c++14 -DWIDE_INTEGER_HAS_LIMB_TYPE_UINT64 -DWIDE_INTEGER_HAS_MUL_8_BY_8_UNROLL -I. -I../boost-root -pthread -lpthread test/test.cpp test/test_uintwide_t_boost_backend.cpp test/test_uintwide_t_edge_cases.cpp test/test_uintwide_t_examples.cpp test/test_uintwide_t_float_convert.cpp test/test_uintwide_t_int_convert.cpp test/test_uintwide_t_n_base.cpp test/test_uintwide_t_n_binary_ops_base.cpp test/test_uintwide_t_spot_values.cpp examples/example000_numeric_limits.cpp examples/example000a_builtin_convert.cpp examples/example001_mul_div.cpp examples/example001a_div_mod.cpp examples/example002_shl_shr.cpp examples/example003_sqrt.cpp examples/example003a_cbrt.cpp examples/example004_rootk_pow.cpp examples/example005_powm.cpp examples/example005a_pow_factors_of_p99.cpp examples/example006_gcd.cpp examples/example007_random_generator.cpp examples/example008_miller_rabin_prime.cpp examples/example008a_miller_rabin_prime.cpp examples/example009_timed_mul.cpp examples/example009a_timed_mul_4_by_4.cpp examples/example009b_timed_mul_8_by_8.cpp examples/example010_uint48_t.cpp examples/example011_uint24_t.cpp examples/example012_rsa_crypto.cpp examples/example013_ecdsa_sign_verify.cpp examples/example014_pi_spigot_wide.cpp -o wide_integer.exe
- name: SonarQube Scan
uses: SonarSource/sonarqube-scan-action@v6.0.0
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
with:
args: >
--define sonar.cfamily.compile-commands=${{ runner.workspace }}/build_wrapper_output_directory/compile_commands.json
-Dsonar.organization=ckormanyos
-Dsonar.projectName=wide-integer
-Dsonar.projectKey=ckormanyos_wide-integer