From 93616eab020de691c9df3c6010c635a43d58adca Mon Sep 17 00:00:00 2001 From: Pavel Kirienko Date: Wed, 10 Apr 2024 12:07:21 +0300 Subject: [PATCH] Update CI #sonar --- .github/workflows/main.yml | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 2afd98b..1286b61 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -18,7 +18,7 @@ jobs: c-compiler: clang cxx-compiler: clang++ steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - run: | wget https://apt.llvm.org/llvm.sh chmod +x llvm.sh @@ -47,7 +47,7 @@ jobs: contains(github.event.head_commit.message, '#sonar') runs-on: ubuntu-latest env: - SONAR_SCANNER_VERSION: 4.8.0.2856 + SONAR_SCANNER_VERSION: 5.0.1.3006 SONAR_SERVER_URL: "https://sonarcloud.io" BUILD_WRAPPER_OUT_DIR: build_wrapper_output_directory GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -55,15 +55,15 @@ jobs: CC: gcc CXX: g++ steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 - run: sudo apt install g++ g++-multilib gcc-multilib - - uses: actions/setup-java@v3 + - uses: actions/setup-java@v4 with: - java-version: 11 + java-version: 17 distribution: zulu - - uses: actions/cache@v3 + - uses: actions/cache@v4 with: path: ~/.sonar/cache key: ${{ runner.os }}-sonar @@ -92,7 +92,8 @@ jobs: gcov --preserve-paths --long-file-names $(find CMakeFiles/test_general_cov.dir -name '*.gcno') gcov --preserve-paths --long-file-names $(find CMakeFiles/test_private_cov.dir -name '*.gcno') # https://community.sonarsource.com/t/analyzing-a-header-only-c-library/51468 - - run: > + - if: env.SONAR_TOKEN != '' + run: > sonar-scanner --define sonar.projectKey="pavel-kirienko_o1heap" --define sonar.organization="pavel-kirienko" @@ -108,7 +109,7 @@ jobs: if: github.event_name == 'push' runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: DoozyX/clang-format-lint-action@v0.15 with: source: './o1heap ./tests'