Skip to content

Commit

Permalink
Add clang-analyzer to CI
Browse files Browse the repository at this point in the history
Fixes #842
  • Loading branch information
ojab committed Jul 10, 2023
1 parent 7b2d2ca commit b68370d
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -136,3 +136,19 @@ jobs:
- name: Run build with gcc-analyzer enabled
run: |
CFLAGS='-fanalyzer' bundle exec rake compile
clang-analyzer:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: head
bundler-cache: true
- name: Install clang-analyzer
run: sudo apt-get install -y clang-tools
- name: Run build with clang-analyzer
run: |
scan-build bundle exec rake compile 2>&1 | tee /tmp/scan_build_output.log
grep -q 'scan-build: No bugs found.' /tmp/scan_build_output.log

0 comments on commit b68370d

Please sign in to comment.