Commit e0ccf1aa authored by Federico Vaga's avatar Federico Vaga

ci: add WBGEN2 generated file to distributed file

Signed-off-by: Federico Vaga's avatarFederico Vaga <federico.vaga@cern.ch>
parent a174a79e
......@@ -9,6 +9,10 @@ variables:
DIST_PATH: distribution
BUILD_PATH: ${DIST_PATH}/build
before_script:
- git clone https://ohwr.org/project/wishbone-gen.git ~/git/wbgen2
- export WBGEN2=~/git/wbgen2/wbgen2
stages:
- static-analysis
- build
......@@ -28,8 +32,8 @@ build:
stage: build
script:
- yum install -y kernel-devel lua git
- git clone https://ohwr.org/project/wishbone-gen.git ~/git/wbgen2
- WBGEN2=~/git/wbgen2/wbgen2 LINUX=/usr/src/kernels/*/ make
- export LINUX=/usr/src/kernels/*/
- make
artifacts:
paths:
- include/
......@@ -39,7 +43,8 @@ build_srpm:
stage: srpm
script:
- yum-builddep -y ${DIST_PATH}/*.spec
- LINUX=/usr/src/kernels/*/ make -C distribution srpm
- export LINUX=/usr/src/kernels/*/
- make -C distribution srpm
artifacts:
paths:
- distribution/build/SRPMS/${CI_PROJECT_NAME}*src.rpm
......
......@@ -104,12 +104,20 @@ devel-rpm: userspace-tar
.PHONY: dkmstree dkms-add kernel-dkms-tar userspace-dir userspace-spec userspace-tar userspace-rpm tools-rpm lib-static-rpm lib-rpm
sources-tar:
mkdir -p $(SOURCES)
cd $(TRTL) && $(GIT) archive --format=tar.gz -o $(SOURCES)/$(DIR_NAME).tar.gz --prefix=$(DIR_NAME)/ HEAD
@mkdir -p $(SOURCES)
@cd $(TRTL) && $(GIT) archive --format=tar -o $(SOURCES)/$(DIR_NAME).tar --prefix=$(DIR_NAME)/ HEAD
sources: sources-tar
sources-tar-replace-autogen: sources-tar wbgen2-headers
@tar -rf $(SOURCES)/$(DIR_NAME).tar --transform "s,^,"$(DIR_NAME)"/," $(TRTL_SW)/include/mockturtle/hw/mockturtle_cpu_lr.h $(TRTL_SW)/include/mockturtle/hw/mockturtle_cpu_csr.h
@tar --delete -f $(SOURCES)/$(DIR_NAME).tar $(DIR_NAME)/software/include/mockturtle/hw/Makefile
sources-tar-gz: sources-tar sources-tar-replace-autogen
@gzip $(SOURCES)/$(DIR_NAME).tar
sources: sources-tar-gz
@tar -C $(SOURCES) -xvf $(SOURCES)/$(DIR_NAME).tar.gz $(DIR_NAME)/CHANGELOG.rst
@mv $(SOURCES)/$(DIR_NAME)/CHANGELOG.rst $(SOURCES)/CHANGELOG
@rmdir $(SOURCES)/$(DIR_NAME)
srpm-changelog: sources
$(eval $@_pattern := ^\[([0-9]+\.[0-9]+\.[0-9]+)\]\s-\s([0-9]{4}-[0-9]{2}-[0-9]{2})$)
......@@ -136,3 +144,6 @@ endif
clean:
@rm -rf $(BUILD) $(SOURCES) *.tar.gz $(RPM_SPEC)
.PHONY: sources-tar-reeplace-autogen sources-tar sources-tar-gz sources srpm-changelog rpm-spec srpm-changelog srpm
......@@ -5,11 +5,16 @@
PREFIX ?= /
INCLUDEDESTDIR ?= $(PREFIX)/usr/local/include
all:
ifneq ($(wildcard ./mockturtle/hw/Makefile),) # Removed during distribution
$(MAKE) -C mockturtle/hw
endif
clean:
ifneq ($(wildcard ./mockturtle/hw/Makefile),) # Removed during distribution
$(MAKE) -C mockturtle/hw clean
endif
install: all
install -d $(INCLUDEDESTDIR)/mockturtle
......@@ -23,3 +28,5 @@ uninstall:
rm -f $(INCLUDEDESTDIR)/mockturtle/*
rmdir --ignore-fail-on-non-empty $(INCLUDEDESTDIR)/mockturtle
rmdir --ignore-fail-on-non-empty $(INCLUDEDESTDIR)
.PHONY: all clean install uninstall
......@@ -47,7 +47,7 @@ all modules: hw_header
hw_header:
ifeq ($(DKMS), 0)
$(MAKE) -C $(TRTL_SW)/include/mockturtle/hw/
$(MAKE) -C $(TRTL_SW)/include/
endif
install: modules_install
......
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