Commit 1284b236 authored by Federico Vaga's avatar Federico Vaga

Merge branch '18-use-project-evergreen-s-template-for-build-and-validation' into 'master'

Resolve "Use project evergreen's template for build and validation"

Closes #18

See merge request be-cem-edl/fec/hardware-modules/spec!7
parents 8bea55ab 1f748891
......@@ -19,35 +19,21 @@ cppcheck:
script:
- make -C software cppcheck
.script_fetch_kernel_dep: &script_fetch_kernel_dep
- git clone --depth 1 https://gitlab.cern.ch/fvaga/fpga-manager.git ~/git/fpga-mgr
- export FPGA_MGR=~/git/fpga-mgr
- git clone -b v1.1.5 --depth 1 https://ohwr.org/project/fmc-sw.git ~/git/fmc
- export FMC=~/git/fmc
- git clone --depth 1 https://ohwr.org/project/general-cores.git ~/git/general-cores/
- export SPI=~/git/general-cores/software/spi-ocores
- export I2C=~/git/general-cores/software/i2c-ocores
.script_build_kernel_dep: &script_build_kernel_dep
- make -C $FPGA_MGR all
- make -C $FMC/drivers/fmc all
- export FPGA_MGR="/opt/fpga-mgr"
- git clone --depth 1 https://gitlab.cern.ch/fvaga/fpga-manager.git "$FPGA_MGR"
- make -C "$FPGA_MGR" all
build-centos-7:
stage: build
kernel_build_cc7:
extends: .kernel_build_cc7
variables:
CONFIG_FPGA_MGR_BACKPORT: y
KERNELSRC: /usr/src/kernels/*/
image:
name: gitlab-registry.cern.ch/coht/common-containers/build-centos-7:latest
EDL_CI_KBUILD_PATHS: software/kernel
before_script:
- *script_fetch_kernel_dep
- *script_build_kernel_dep
script:
- make -C software
kernel_build_validation:
extends: .kernel_build_validation
before_script:
- export CONFIG_FPGA_MGR_BACKPORT=n
- *script_fetch_kernel_dep
- *script_build_kernel_dep
- |
echo "Checking Dependencies"
if [ "$FMC_BUILDS" != "0" ]; then echo 'FMC did not build successfully. Exiting'; exit 1; fi
......@@ -22,9 +22,12 @@ I2C ?= $(REPO_PARENT)/general-cores/software/i2c-ocores/
SPI ?= $(REPO_PARENT)/general-cores/software/spi-ocores/
endif
ifeq ($(CONFIG_FPGA_MGR_BACKPORT),y)
ifndef FPGA_MGR
$(error "Missing FPGA_MGR environment variable")
endif
endif
ifndef FMC
$(error "Missing FMC environment variable")
endif
......@@ -47,7 +50,7 @@ all: modules
.PHONY: all modules clean help install modules_install coccicheck spec-core-fpga.h cppcheck
help coccicheck:
@$(MAKE) -C $(LINUX) M=$(shell pwd) $@
@$(MAKE) -C $(KERNELSRC) M=$(shell pwd) $@
headers:
$(MAKE) -C $(HDR_DIR) $@
......@@ -65,14 +68,14 @@ modules: headers
install: modules_install
modules_install: modules
@$(MAKE) -C $(LINUX) M=$(shell pwd) \
@$(MAKE) -C $(KERNELSRC) M=$(shell pwd) \
INSTALL_MOD_PATH=$(INSTALL_MOD_PATH) \
INSTALL_MOD_DIR=$(INSTALL_MOD_DIR) \
$@
clean:
@rm -f spec-core-fpga.h
@$(MAKE) -C $(LINUX) M=$(shell pwd) $@
@$(MAKE) -C $(KERNELSRC) M=$(shell pwd) $@
INCLUDE := -I./
......
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