File tree 1 file changed +27
-0
lines changed 1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -785,6 +785,33 @@ jobs:
785
785
- name : Smoke test goto-analyzer
786
786
run : docker run -v ${PWD}/.github/workflows/smoke_test_assets:/mnt/smoke -t cbmc goto-analyzer /mnt/smoke/test.goto --unreachable-functions
787
787
788
+ include-what-you-use :
789
+ runs-on : ubuntu-22.04
790
+ steps :
791
+ - uses : actions/checkout@v3
792
+ with :
793
+ submodules : recursive
794
+ - name : Fetch dependencies
795
+ env :
796
+ # This is needed in addition to -yq to prevent apt-get from asking for
797
+ # user input
798
+ DEBIAN_FRONTEND : noninteractive
799
+ run : |
800
+ sudo apt-get update
801
+ sudo apt-get install --no-install-recommends -yq cmake ninja-build gcc gdb g++ maven flex bison iwyu
802
+ - name : Configure using CMake
803
+ run : |
804
+ mkdir build
805
+ cd build
806
+ cmake .. -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=/usr/bin/gcc -DCMAKE_CXX_COMPILER=/usr/bin/g++
807
+ - name : Run include-what-you-use
808
+ run : |
809
+ iwyu_tool -p build/compile_commands.json -j2 | tee includes.txt
810
+ if sed '/minisat2-src/,/^--$/d' includes.txt | grep '^- ' -B1 ; then
811
+ echo "Unnecessary includes found. Use '// IWYU pragma: keep' to override this."
812
+ exit 1
813
+ fi
814
+
788
815
codecov-coverage-report :
789
816
runs-on : ubuntu-20.04
790
817
steps :
You can’t perform that action at this time.
0 commit comments