diff --git a/.gitignore b/.gitignore index 8dbe798f4eb67e9104f9f584eb06b9fb6a7f300a..cc96cbea76d75c6ec5dfc0cb35d08f0e1f9af590 100644 --- a/.gitignore +++ b/.gitignore @@ -16,3 +16,7 @@ flamegraph.txt benchs-value.csv bench_clone + +# .sarif reports are produced as CI artifacts, but we do not want to version +# them, due to their size and the redundancy w.r.t. Eva logs. +*.sarif diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000000000000000000000000000000000000..ebb62a057df72287adf03ed49ff63cbb6a213e05 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,13 @@ +default: + image: framac/frama-c:dev + +build: + tags: + - docker + script: + - make -B all >/dev/null + - git diff --exit-code + - make sarif + artifacts: + paths: + - "*/.frama-c/*.sarif" diff --git a/Makefile b/Makefile index 015449b5bab58399bdaabd2222216dc2009e5b4f..b4891dc2f9a6ccfbeb701a6e9d8473b30d1832ca 100644 --- a/Makefile +++ b/Makefile @@ -111,6 +111,11 @@ parse: $(addsuffix .parse,$(TARGETS)) stats: $(addsuffix .stats,$(TARGETS)) +%.sarif: + $(MAKE) -C $*/.frama-c sarif + +sarif: $(addsuffix .sarif,$(TARGETS)) + display-targets: @echo $(foreach target,$(TARGETS),\ $(addprefix $(target)/,\ diff --git a/Makefile.common b/Makefile.common index 4ae62e66d8d11729b55005601fdb1e3b5c6f570b..9bf7b07fe8822ebf117d9ca7ecb98d8678676ab8 100644 --- a/Makefile.common +++ b/Makefile.common @@ -1,3 +1,11 @@ # Makefile optionally included by each GNUmakefile in the target directories. # Note: it must be included at the end of the makefiles, # to ensure e.g. TARGETS and other variables are properly defined. + +### Extra targets for SARIF report +# '-noautoload-plugins -load-module eva,markdown_report' minimize loading time +# of several dozens of calls to Frama-C +%.sarif: %.eva + $(FRAMAC) -no-autoload-plugins -load-module eva,markdown_report -load $^/framac.sav -mdr-gen sarif -mdr-no-print-libc -mdr-sarif-deterministic -mdr-out $@ + +sarif: $(TARGETS:%.eva=%.sarif) diff --git a/frama-c b/frama-c index 292964f3767f94f2e4a45e347aa33fde15a225d1..186247381f19703b1572dba997865645cd80d5e9 160000 --- a/frama-c +++ b/frama-c @@ -1 +1 @@ -Subproject commit 292964f3767f94f2e4a45e347aa33fde15a225d1 +Subproject commit 186247381f19703b1572dba997865645cd80d5e9