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: ...@@ -19,35 +19,21 @@ cppcheck:
script: script:
- make -C software cppcheck - 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 .script_build_kernel_dep: &script_build_kernel_dep
- make -C $FPGA_MGR all - export FPGA_MGR="/opt/fpga-mgr"
- make -C $FMC/drivers/fmc all - git clone --depth 1 https://gitlab.cern.ch/fvaga/fpga-manager.git "$FPGA_MGR"
- make -C "$FPGA_MGR" all
build-centos-7: kernel_build_cc7:
stage: build extends: .kernel_build_cc7
variables: variables:
CONFIG_FPGA_MGR_BACKPORT: y EDL_CI_KBUILD_PATHS: software/kernel
KERNELSRC: /usr/src/kernels/*/
image:
name: gitlab-registry.cern.ch/coht/common-containers/build-centos-7:latest
before_script: before_script:
- *script_fetch_kernel_dep
- *script_build_kernel_dep - *script_build_kernel_dep
script:
- make -C software
kernel_build_validation: kernel_build_validation:
extends: .kernel_build_validation extends: .kernel_build_validation
before_script: before_script:
- export CONFIG_FPGA_MGR_BACKPORT=n - |
- *script_fetch_kernel_dep echo "Checking Dependencies"
- *script_build_kernel_dep 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/ ...@@ -22,9 +22,12 @@ I2C ?= $(REPO_PARENT)/general-cores/software/i2c-ocores/
SPI ?= $(REPO_PARENT)/general-cores/software/spi-ocores/ SPI ?= $(REPO_PARENT)/general-cores/software/spi-ocores/
endif endif
ifeq ($(CONFIG_FPGA_MGR_BACKPORT),y)
ifndef FPGA_MGR ifndef FPGA_MGR
$(error "Missing FPGA_MGR environment variable") $(error "Missing FPGA_MGR environment variable")
endif endif
endif
ifndef FMC ifndef FMC
$(error "Missing FMC environment variable") $(error "Missing FMC environment variable")
endif endif
...@@ -47,7 +50,7 @@ all: modules ...@@ -47,7 +50,7 @@ all: modules
.PHONY: all modules clean help install modules_install coccicheck spec-core-fpga.h cppcheck .PHONY: all modules clean help install modules_install coccicheck spec-core-fpga.h cppcheck
help coccicheck: help coccicheck:
@$(MAKE) -C $(LINUX) M=$(shell pwd) $@ @$(MAKE) -C $(KERNELSRC) M=$(shell pwd) $@
headers: headers:
$(MAKE) -C $(HDR_DIR) $@ $(MAKE) -C $(HDR_DIR) $@
...@@ -65,14 +68,14 @@ modules: headers ...@@ -65,14 +68,14 @@ modules: headers
install: modules_install install: modules_install
modules_install: modules modules_install: modules
@$(MAKE) -C $(LINUX) M=$(shell pwd) \ @$(MAKE) -C $(KERNELSRC) M=$(shell pwd) \
INSTALL_MOD_PATH=$(INSTALL_MOD_PATH) \ INSTALL_MOD_PATH=$(INSTALL_MOD_PATH) \
INSTALL_MOD_DIR=$(INSTALL_MOD_DIR) \ INSTALL_MOD_DIR=$(INSTALL_MOD_DIR) \
$@ $@
clean: clean:
@rm -f spec-core-fpga.h @rm -f spec-core-fpga.h
@$(MAKE) -C $(LINUX) M=$(shell pwd) $@ @$(MAKE) -C $(KERNELSRC) M=$(shell pwd) $@
INCLUDE := -I./ 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