|
1 | | -# ------------------------------------------------------------------------------ |
2 | | -# Copyright Christopher Kormanyos 2022 - 2024. |
| 1 | +# ------------------------------------------------------------------------------ |
| 2 | +# Copyright Christopher Kormanyos 2022 - 2025. |
3 | 3 | # Distributed under the Boost Software License, |
4 | 4 | # Version 1.0. (See accompanying file LICENSE_1_0.txt |
5 | 5 | # or copy at http://www.boost.org/LICENSE_1_0.txt) |
|
13 | 13 | pull_request: |
14 | 14 | types: [opened, synchronize, reopened] |
15 | 15 | jobs: |
16 | | - build: |
17 | | - name: sonar-gcc-native |
| 16 | + sonar-gcc-native: |
18 | 17 | runs-on: ubuntu-latest |
19 | | - env: |
20 | | - SONAR_SCANNER_VERSION: 5.0.1.3006 |
21 | | - SONAR_SERVER_URL: "https://sonarcloud.io" |
22 | | - BUILD_WRAPPER_OUT_DIR: build_wrapper_output_directory # Directory where build-wrapper output will be placed |
23 | 18 | steps: |
24 | | - - uses: actions/checkout@v4 |
25 | | - with: |
26 | | - fetch-depth: 0 |
27 | | - - name: clone-submods-bootstrap-headers-boost-develop |
28 | | - run: | |
29 | | - git clone -b develop --depth 1 https://github.com/boostorg/boost.git ../boost-root |
30 | | - cd ../boost-root |
31 | | - git submodule update --init tools |
32 | | - git submodule update --init libs/config |
33 | | - git submodule update --init libs/multiprecision |
34 | | - ./bootstrap.sh |
35 | | - ./b2 headers |
36 | | - - name: Set up JDK 17 |
37 | | - uses: actions/setup-java@v4 |
38 | | - with: |
39 | | - distribution: 'temurin' |
40 | | - java-version: '17' |
41 | | - overwrite-settings: true |
42 | | - - name: Download and set up sonar-scanner |
43 | | - env: |
44 | | - SONAR_SCANNER_DOWNLOAD_URL: https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-${{ env.SONAR_SCANNER_VERSION }}-linux.zip |
45 | | - run: | |
46 | | - mkdir -p $HOME/.sonar |
47 | | - curl -sSLo $HOME/.sonar/sonar-scanner.zip ${{ env.SONAR_SCANNER_DOWNLOAD_URL }} |
48 | | - unzip -o $HOME/.sonar/sonar-scanner.zip -d $HOME/.sonar/ |
49 | | - echo "$HOME/.sonar/sonar-scanner-${{ env.SONAR_SCANNER_VERSION }}-linux/bin" >> $GITHUB_PATH |
50 | | - - name: Download and set up build-wrapper |
51 | | - env: |
52 | | - BUILD_WRAPPER_DOWNLOAD_URL: ${{ env.SONAR_SERVER_URL }}/static/cpp/build-wrapper-linux-x86.zip |
53 | | - run: | |
54 | | - curl -sSLo $HOME/.sonar/build-wrapper-linux-x86.zip ${{ env.BUILD_WRAPPER_DOWNLOAD_URL }} |
55 | | - unzip -o $HOME/.sonar/build-wrapper-linux-x86.zip -d $HOME/.sonar/ |
56 | | - echo "$HOME/.sonar/build-wrapper-linux-x86" >> $GITHUB_PATH |
57 | | - - name: Run build-wrapper |
58 | | - run: | |
59 | | - java -version |
60 | | - build-wrapper-linux-x86-64 --out-dir ${{ env.BUILD_WRAPPER_OUT_DIR }} 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 |
61 | | - - name: Run sonar-scanner |
62 | | - env: |
63 | | - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
64 | | - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} |
65 | | - run: | |
66 | | - java -version |
67 | | - sonar-scanner --define sonar.host.url="${{ env.SONAR_SERVER_URL }}" --define sonar.cfamily.build-wrapper-output="${{ env.BUILD_WRAPPER_OUT_DIR }}" |
| 19 | + - uses: actions/checkout@v4 |
| 20 | + with: |
| 21 | + fetch-depth: 0 |
| 22 | + - name: clone-submods-bootstrap-headers-boost-develop |
| 23 | + run: | |
| 24 | + git clone -b develop --depth 1 https://github.com/boostorg/boost.git ../boost-root |
| 25 | + cd ../boost-root |
| 26 | + git submodule update --init tools |
| 27 | + git submodule update --init libs/config |
| 28 | + git submodule update --init libs/multiprecision |
| 29 | + ./bootstrap.sh |
| 30 | + ./b2 headers |
| 31 | + - name: Install Build Wrapper |
| 32 | + uses: SonarSource/sonarqube-scan-action/[email protected] |
| 33 | + env: |
| 34 | + SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} |
| 35 | + - name: Run Build Wrapper |
| 36 | + run: | |
| 37 | + 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 |
| 38 | + - name: SonarQube Scan |
| 39 | + uses: SonarSource/[email protected] |
| 40 | + env: |
| 41 | + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} |
| 42 | + SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} |
| 43 | + with: |
| 44 | + args: > |
| 45 | + --define sonar.cfamily.compile-commands=${{ runner.workspace }}/build_wrapper_output_directory/compile_commands.json |
0 commit comments