Commit a65393e9 authored by Federico Vaga's avatar Federico Vaga

Merge branch '3-use-few-build-sw-container-to-build-zio' into 'master'

Resolve "Use few-build-sw container to build zio"

Closes #3

See merge request be-cem-edl/fec/hardware-modules/zio!3
parents b9fc69f9 0cdacf73
...@@ -10,32 +10,44 @@ include: ...@@ -10,32 +10,44 @@ include:
file: file:
- 'edl-gitlab-ci.yml' - 'edl-gitlab-ci.yml'
reuse:
stage: analyse
image:
name: fsfe/reuse:latest
entrypoint: [""]
script:
- reuse lint
cppcheck: cppcheck:
stage: analyse stage: analyse
image: image:
name: gitlab-registry.cern.ch/coht/common-containers/static-analysis:latest name: gitlab-registry.cern.ch/coht/common-containers/static-analysis:latest
allow_failure: true
script: script:
- make cppcheck - make cppcheck
build-centos-7: flawfinder:
stage: build stage: analyse
variables:
KERNELSRC: /usr/src/kernels/*/
image: image:
name: gitlab-registry.cern.ch/coht/common-containers/build-centos-7:latest name: gitlab-registry.cern.ch/coht/common-containers/static-analysis:latest
script: script:
- make modules - make flawfinder
kernel_build_cc7:
extends: .kernel_build_cc7
variables:
EDL_CI_KBUILD_PATHS: drivers/zio
kernel_build_validation:
extends: .kernel_build_validation
build-kernel: build_tools:
stage: build stage: build
allow_failure: true
image: image:
name: gitlab-registry.cern.ch/coht/common-containers/build-kernel:latest name: gitlab-registry.cern.ch/be-cem-edl/evergreen/gitlab-ci/build-fec-sw:latest
parallel:
matrix:
- VERSION: [5.10.149, 5.15.74]
script: script:
- source /linux-versions.sh - make -C tools -j "$(nproc)"
- fetch $VERSION && prepare $VERSION && export LINUX=$(linux $VERSION) && export KERNELSRC=$(linux $VERSION) artifacts:
- make modules paths:
- 'tools/zio-dump'
- 'tools/zio-cat-file'
- 'tools/test-dtc'
...@@ -8,22 +8,25 @@ ...@@ -8,22 +8,25 @@
REPO_PARENT ?= $(shell pwd)/.. REPO_PARENT ?= $(shell pwd)/..
-include $(REPO_PARENT)/parent_common.mk -include $(REPO_PARENT)/parent_common.mk
all: modules tools
modules:
$(MAKE) -C drivers/zio
C_DIRS = drivers/zio \
tools
.PHONY: tools cppcheck DIRS = $(C_DIRS) \
Documentation/core-api/zio \
Documentation/core-api/zio/img/Makefile
tools: all clean: $(DIRS)
$(MAKE) -C tools clean: TARGET = clean
# this make clean is ugly, I'm aware... $(DIRS):
clean: $(MAKE) -C $@ $(TARGET)
$(MAKE) -C drivers/zio clean
$(MAKE) -C tools clean
cppcheck: modules modules_install:
$(MAKE) -C drivers/zio cppcheck $(MAKE) -C drivers/zio $@
$(MAKE) -C tools cppcheck
flawfinder cppcheck:
for d in $(C_DIRS); do $(MAKE) -C $$d $@ || exit 1; done
.PHONY: all clean modules modules_install cppcheck flawfinder
Documentation/
\ No newline at end of file
...@@ -8,6 +8,7 @@ REPO_PARENT ?= $(shell pwd)/../../.. ...@@ -8,6 +8,7 @@ REPO_PARENT ?= $(shell pwd)/../../..
-include $(REPO_PARENT)/parent_common.mk -include $(REPO_PARENT)/parent_common.mk
CPPCHECK ?= cppcheck CPPCHECK ?= cppcheck
FLAWFINDER ?= flawfinder
KVERSION ?= $(shell uname -r) KVERSION ?= $(shell uname -r)
KERNELSRC ?= /lib/modules/$(KVERSION)/build KERNELSRC ?= /lib/modules/$(KVERSION)/build
...@@ -35,6 +36,12 @@ modules coccicheck modules_install clean: ...@@ -35,6 +36,12 @@ modules coccicheck modules_install clean:
$(MAKE) -C $(KERNELSRC) M=$(shell /bin/pwd) $@ $(MAKE) -C $(KERNELSRC) M=$(shell /bin/pwd) $@
cppcheck: cppcheck:
$(CPPCHECK) -q -I. --suppress=missingIncludeSystem --enable=all *.c *.h --error-exitcode=1 $(CPPCHECK) -q -I. --suppress=missingIncludeSystem --enable=all *.c *.h
$(MAKE) -C devices $@
$(MAKE) -C triggers $@
$(MAKE) -C buffers $@
.PHONY: all clean coccicheck cppcheck modules modules_install flawfinder:
$(FLAWFINDER) -SQDC --error-level=5 .
.PHONY: all clean coccicheck cppcheck flawfinder modules modules_install
...@@ -3,6 +3,9 @@ ...@@ -3,6 +3,9 @@
# SPDX-License-Identifier: CC0-1.0 # SPDX-License-Identifier: CC0-1.0
# add versions of supermodule # add versions of supermodule
CPPCHECK ?= cppcheck
ifdef CONFIG_SUPER_REPO ifdef CONFIG_SUPER_REPO
ifdef CONFIG_SUPER_REPO_VERSION ifdef CONFIG_SUPER_REPO_VERSION
SUBMODULE_VERSIONS += MODULE_INFO(version_$(CONFIG_SUPER_REPO),\"$(CONFIG_SUPER_REPO_VERSION)\"); SUBMODULE_VERSIONS += MODULE_INFO(version_$(CONFIG_SUPER_REPO),\"$(CONFIG_SUPER_REPO_VERSION)\");
...@@ -16,3 +19,9 @@ ccflags-$(CONFIG_ZIO_DEBUG) += -DDEBUG ...@@ -16,3 +19,9 @@ ccflags-$(CONFIG_ZIO_DEBUG) += -DDEBUG
# zio-buf-kmalloc.o is now part of zio-core # zio-buf-kmalloc.o is now part of zio-core
obj-m = zio-buf-vmalloc.o obj-m = zio-buf-vmalloc.o
cppcheck:
$(CPPCHECK) -q -I. --suppress=missingIncludeSystem --enable=all *.c *.h
.PHONY: cppcheck
...@@ -3,6 +3,9 @@ ...@@ -3,6 +3,9 @@
# SPDX-License-Identifier: CC0-1.0 # SPDX-License-Identifier: CC0-1.0
# add versions of supermodule # add versions of supermodule
CPPCHECK ?= cppcheck
ifdef CONFIG_SUPER_REPO ifdef CONFIG_SUPER_REPO
ifdef CONFIG_SUPER_REPO_VERSION ifdef CONFIG_SUPER_REPO_VERSION
SUBMODULE_VERSIONS += MODULE_INFO(version_$(CONFIG_SUPER_REPO),\"$(CONFIG_SUPER_REPO_VERSION)\"); SUBMODULE_VERSIONS += MODULE_INFO(version_$(CONFIG_SUPER_REPO),\"$(CONFIG_SUPER_REPO_VERSION)\");
...@@ -29,3 +32,9 @@ endif ...@@ -29,3 +32,9 @@ endif
ifdef CONFIG_SPI ifdef CONFIG_SPI
obj-m += zio-ad788x.o obj-m += zio-ad788x.o
endif endif
cppcheck:
$(CPPCHECK) -q -I. --suppress=missingIncludeSystem --enable=all *.c *.h
.PHONY: cppcheck
...@@ -3,6 +3,9 @@ ...@@ -3,6 +3,9 @@
# SPDX-License-Identifier: CC0-1.0 # SPDX-License-Identifier: CC0-1.0
# add versions of supermodule # add versions of supermodule
CPPCHECK ?= cppcheck
ifdef CONFIG_SUPER_REPO ifdef CONFIG_SUPER_REPO
ifdef CONFIG_SUPER_REPO_VERSION ifdef CONFIG_SUPER_REPO_VERSION
SUBMODULE_VERSIONS += MODULE_INFO(version_$(CONFIG_SUPER_REPO),\"$(CONFIG_SUPER_REPO_VERSION)\"); SUBMODULE_VERSIONS += MODULE_INFO(version_$(CONFIG_SUPER_REPO),\"$(CONFIG_SUPER_REPO_VERSION)\");
...@@ -20,3 +23,9 @@ obj-m += zio-trig-irq.o ...@@ -20,3 +23,9 @@ obj-m += zio-trig-irq.o
ifdef CONFIG_HIGH_RES_TIMERS ifdef CONFIG_HIGH_RES_TIMERS
obj-m += zio-trig-hrt.o obj-m += zio-trig-hrt.o
endif endif
cppcheck:
$(CPPCHECK) -q -I. --suppress=missingIncludeSystem --enable=all *.c *.h
.PHONY: cppcheck
...@@ -19,6 +19,7 @@ CFLAGS += -DGIT_VERSION=\"$(GIT_VERSION)\" ...@@ -19,6 +19,7 @@ CFLAGS += -DGIT_VERSION=\"$(GIT_VERSION)\"
CC ?= $(CROSS_COMPILE)gcc CC ?= $(CROSS_COMPILE)gcc
CPPCHECK ?= cppcheck CPPCHECK ?= cppcheck
FLAWFINDER ?= flawfinder
progs := zio-dump progs := zio-dump
progs += zio-cat-file progs += zio-cat-file
...@@ -34,6 +35,9 @@ clean: ...@@ -34,6 +35,9 @@ clean:
$(CC) $(CFLAGS) $^ -o $@ $(CC) $(CFLAGS) $^ -o $@
cppcheck: cppcheck:
$(CPPCHECK) -q $(INCLUDE) --suppress=missingIncludeSystem --enable=all *.c *.h --error-exitcode=1 $(CPPCHECK) -q $(INCLUDE) --suppress=missingIncludeSystem --enable=all *.c *.h
.PHONY: cppcheck flawfinder:
$(FLAWFINDER) -SQDC --error-level=4 .
.PHONY: flawfinder cppcheck
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment