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