Skip to content

Commit 237f42b

Browse files
committed
add "use_scan" option, and enable it only for the main CI builds.
the "clang scan" runs take a HUGE length of time. We don't need them to be run on every build of every commit. Running them only for one CI build is fine
1 parent 39faa66 commit 237f42b

3 files changed

Lines changed: 7 additions & 11 deletions

File tree

.github/actions/build-freeradius/action.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ inputs:
44
use_sanitizers:
55
description: Enable sanitizers if true
66
default: false
7+
use_scan:
8+
description: Run "clang scan" if true
9+
default: false
710
cc:
811
description: Which CC to use
912
default: gcc
@@ -162,15 +165,15 @@ runs:
162165
[ -d /opt/openssl ] && export PATH=/opt/openssl/bin:$PATH
163166
make -j `nproc`
164167
165-
# Disabled on MacOS and when fuzzing to reduce the runtime
168+
# only do this on the main CI build, it doesn't help on everything else.
166169
- name: Clang Static Analyzer
167-
if: ${{ inputs.cc == 'clang' && runner.os != 'macOS' && inputs.test_type != 'fuzzing' }}
170+
if: ${{ inputs.cc == 'clang' && inputs.use_scan = 'true' }}
168171
shell: bash
169172
run: |
170173
make -j `nproc` scan && [ "$(find build/plist/ -name *.html)" = '' ];
171174
172175
- name: "Clang Static Analyzer: Store assets on failure"
173-
if: ${{ inputs.cc == 'clang' && failure() }}
176+
if: ${{ inputs.cc == 'clang' && inputs.use_scan = 'true' && failure() }}
174177
uses: actions/upload-artifact@v6
175178
with:
176179
name: clang-scan.tgz

.github/workflows/ci-macos.yml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -192,14 +192,6 @@ jobs:
192192
run: |
193193
make -j `nproc`
194194
195-
- name: "Clang Static Analyzer: Store assets on failure"
196-
uses: actions/upload-artifact@v6
197-
with:
198-
name: clang-scan.tgz
199-
path: build/plist/**/*.html
200-
retention-days: 30
201-
if: ${{ matrix.env.CC == 'clang' && failure() }}
202-
203195
# No detect_leaks support for ASAN on macOS
204196
- name: Run basic tests (macOS)
205197
run: |

.github/workflows/ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,7 @@ jobs:
182182
uses: ./.github/actions/build-freeradius
183183
with:
184184
use_sanitizers: false
185+
use_scan: true
185186
cc: ${{ matrix.env.CC }}
186187
test_type: ${{ matrix.env.TEST_TYPE }}
187188
platform: ${{ matrix.os.imageos }}

0 commit comments

Comments
 (0)