|
1 | 1 | name: Main Workflow
|
2 | 2 | on: [push, pull_request]
|
3 | 3 | env:
|
4 |
| - LLVM_VERSION: 15 |
| 4 | + LLVM_VERSION: 19 |
5 | 5 | jobs:
|
6 | 6 | test:
|
7 | 7 | if: github.event_name == 'push'
|
@@ -39,78 +39,12 @@ jobs:
|
39 | 39 | - working-directory: ${{github.workspace}}/build
|
40 | 40 | run: make test
|
41 | 41 |
|
42 |
| - sonarcloud: |
43 |
| - if: > |
44 |
| - github.event_name == 'pull_request' || |
45 |
| - contains(github.ref, '/master') || |
46 |
| - contains(github.ref, '/release') || |
47 |
| - contains(github.event.head_commit.message, '#sonar') |
48 |
| - runs-on: ubuntu-latest |
49 |
| - env: |
50 |
| - SONAR_SCANNER_VERSION: 5.0.1.3006 |
51 |
| - SONAR_SERVER_URL: "https://sonarcloud.io" |
52 |
| - BUILD_WRAPPER_OUT_DIR: build_wrapper_output_directory |
53 |
| - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
54 |
| - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} |
55 |
| - CC: gcc |
56 |
| - CXX: g++ |
57 |
| - steps: |
58 |
| - - uses: actions/checkout@v4 |
59 |
| - with: |
60 |
| - fetch-depth: 0 |
61 |
| - - run: sudo apt install g++ g++-multilib gcc-multilib |
62 |
| - - uses: actions/setup-java@v4 |
63 |
| - with: |
64 |
| - java-version: 17 |
65 |
| - distribution: zulu |
66 |
| - - uses: actions/cache@v4 |
67 |
| - with: |
68 |
| - path: ~/.sonar/cache |
69 |
| - key: ${{ runner.os }}-sonar |
70 |
| - restore-keys: ${{ runner.os }}-sonar |
71 |
| - - name: Download and set up sonar-scanner |
72 |
| - env: |
73 |
| - SONAR_SCANNER_DOWNLOAD_URL: https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-${{ env.SONAR_SCANNER_VERSION }}-linux.zip |
74 |
| - run: | |
75 |
| - mkdir -p $HOME/.sonar |
76 |
| - curl -sSLo $HOME/.sonar/sonar-scanner.zip ${{ env.SONAR_SCANNER_DOWNLOAD_URL }} |
77 |
| - unzip -o $HOME/.sonar/sonar-scanner.zip -d $HOME/.sonar/ |
78 |
| - echo "$HOME/.sonar/sonar-scanner-${{ env.SONAR_SCANNER_VERSION }}-linux/bin" >> $GITHUB_PATH |
79 |
| - - name: Download and set up build-wrapper |
80 |
| - env: |
81 |
| - BUILD_WRAPPER_DOWNLOAD_URL: ${{ env.SONAR_SERVER_URL }}/static/cpp/build-wrapper-linux-x86.zip |
82 |
| - run: | |
83 |
| - curl -sSLo $HOME/.sonar/build-wrapper-linux-x86.zip ${{ env.BUILD_WRAPPER_DOWNLOAD_URL }} |
84 |
| - unzip -o $HOME/.sonar/build-wrapper-linux-x86.zip -d $HOME/.sonar/ |
85 |
| - echo "$HOME/.sonar/build-wrapper-linux-x86" >> $GITHUB_PATH |
86 |
| - # Pass NDEBUG to exclude assert() from coverage; see https://github.com/pavel-kirienko/o1heap/issues/9 |
87 |
| - - name: Run build-wrapper |
88 |
| - run: | |
89 |
| - cmake tests -DCMAKE_BUILD_TYPE=Debug -DNO_STATIC_ANALYSIS=1 -DCMAKE_C_FLAGS='-DNDEBUG=1' |
90 |
| - build-wrapper-linux-x86-64 --out-dir ${{ env.BUILD_WRAPPER_OUT_DIR }} make all |
91 |
| - make test |
92 |
| - gcov --preserve-paths --long-file-names $(find CMakeFiles/test_general_cov.dir -name '*.gcno') |
93 |
| - gcov --preserve-paths --long-file-names $(find CMakeFiles/test_private_cov.dir -name '*.gcno') |
94 |
| - # https://community.sonarsource.com/t/analyzing-a-header-only-c-library/51468 |
95 |
| - - if: env.SONAR_TOKEN != '' |
96 |
| - run: > |
97 |
| - sonar-scanner |
98 |
| - --define sonar.projectKey="pavel-kirienko_o1heap" |
99 |
| - --define sonar.organization="pavel-kirienko" |
100 |
| - --define sonar.sources="o1heap/" |
101 |
| - --define sonar.sourceEncoding="UTF-8" |
102 |
| - --define sonar.cfamily.gcov.reportsPath="." |
103 |
| - --define sonar.cfamily.build-wrapper-output="${{ env.BUILD_WRAPPER_OUT_DIR }}" |
104 |
| - --define sonar.host.url="${{ env.SONAR_SERVER_URL }}" |
105 |
| - --define sonar.login=${{ secrets.SONAR_TOKEN }} |
106 |
| - $([ -z "$GITHUB_BASE_REF" ] && echo "--define sonar.branch.name=${GITHUB_REF##*/}" || true) |
107 |
| -
|
108 | 42 | style_check:
|
109 | 43 | if: github.event_name == 'push'
|
110 | 44 | runs-on: ubuntu-latest
|
111 | 45 | steps:
|
112 | 46 | - uses: actions/checkout@v4
|
113 |
| - - uses: DoozyX/clang-format-lint-action@v0.15 |
| 47 | + - uses: DoozyX/clang-format-lint-action@v0.20 |
114 | 48 | with:
|
115 | 49 | source: './o1heap ./tests'
|
116 | 50 | exclude: './tests/catch'
|
|
0 commit comments