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:
file:
- 'edl-gitlab-ci.yml'
reuse:
stage: analyse
image:
name: fsfe/reuse:latest
entrypoint: [""]
script:
- reuse lint
cppcheck:
stage: analyse
image:
name: gitlab-registry.cern.ch/coht/common-containers/static-analysis:latest
allow_failure: true
script:
- make cppcheck
build-centos-7:
stage: build
variables:
KERNELSRC: /usr/src/kernels/*/
flawfinder:
stage: analyse
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:
- 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
allow_failure: true
image:
name: gitlab-registry.cern.ch/coht/common-containers/build-kernel:latest
parallel:
matrix:
- VERSION: [5.10.149, 5.15.74]
name: gitlab-registry.cern.ch/be-cem-edl/evergreen/gitlab-ci/build-fec-sw:latest
script:
- source /linux-versions.sh
- fetch $VERSION && prepare $VERSION && export LINUX=$(linux $VERSION) && export KERNELSRC=$(linux $VERSION)
- make modules
- make -C tools -j "$(nproc)"
artifacts:
paths:
- 'tools/zio-dump'
- 'tools/zio-cat-file'
- 'tools/test-dtc'
......@@ -8,22 +8,25 @@
REPO_PARENT ?= $(shell pwd)/..
-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:
$(MAKE) -C tools
all clean: $(DIRS)
clean: TARGET = clean
# this make clean is ugly, I'm aware...
clean:
$(MAKE) -C drivers/zio clean
$(MAKE) -C tools clean
$(DIRS):
$(MAKE) -C $@ $(TARGET)
cppcheck:
$(MAKE) -C drivers/zio cppcheck
$(MAKE) -C tools cppcheck
modules modules_install:
$(MAKE) -C drivers/zio $@
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)/../../..
-include $(REPO_PARENT)/parent_common.mk
CPPCHECK ?= cppcheck
FLAWFINDER ?= flawfinder
KVERSION ?= $(shell uname -r)
KERNELSRC ?= /lib/modules/$(KVERSION)/build
......@@ -35,6 +36,12 @@ modules coccicheck modules_install clean:
$(MAKE) -C $(KERNELSRC) M=$(shell /bin/pwd) $@
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 @@
# SPDX-License-Identifier: CC0-1.0
# add versions of supermodule
CPPCHECK ?= cppcheck
ifdef CONFIG_SUPER_REPO
ifdef 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
# zio-buf-kmalloc.o is now part of zio-core
obj-m = zio-buf-vmalloc.o
cppcheck:
$(CPPCHECK) -q -I. --suppress=missingIncludeSystem --enable=all *.c *.h
.PHONY: cppcheck
......@@ -3,6 +3,9 @@
# SPDX-License-Identifier: CC0-1.0
# add versions of supermodule
CPPCHECK ?= cppcheck
ifdef CONFIG_SUPER_REPO
ifdef CONFIG_SUPER_REPO_VERSION
SUBMODULE_VERSIONS += MODULE_INFO(version_$(CONFIG_SUPER_REPO),\"$(CONFIG_SUPER_REPO_VERSION)\");
......@@ -29,3 +32,9 @@ endif
ifdef CONFIG_SPI
obj-m += zio-ad788x.o
endif
cppcheck:
$(CPPCHECK) -q -I. --suppress=missingIncludeSystem --enable=all *.c *.h
.PHONY: cppcheck
......@@ -3,6 +3,9 @@
# SPDX-License-Identifier: CC0-1.0
# add versions of supermodule
CPPCHECK ?= cppcheck
ifdef CONFIG_SUPER_REPO
ifdef 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
ifdef CONFIG_HIGH_RES_TIMERS
obj-m += zio-trig-hrt.o
endif
cppcheck:
$(CPPCHECK) -q -I. --suppress=missingIncludeSystem --enable=all *.c *.h
.PHONY: cppcheck
......@@ -19,6 +19,7 @@ CFLAGS += -DGIT_VERSION=\"$(GIT_VERSION)\"
CC ?= $(CROSS_COMPILE)gcc
CPPCHECK ?= cppcheck
FLAWFINDER ?= flawfinder
progs := zio-dump
progs += zio-cat-file
......@@ -34,6 +35,9 @@ clean:
$(CC) $(CFLAGS) $^ -o $@
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