Add cleanup checks to CI pipeline
cover Add cleanup checks to CI pipeline
Run make clean after building kernel and Xenomai and check whether no stale files exist.
This allows also testing the --reverse feature of prepare-kernel.sh.
Since build artefacts are not used after building, at least as I understand the current pipelines, make clean can get executed right in the build stage.
Richard Weinberger (5):
gitlab-ci.yml: Use CI_PROJECT_DIR variable gitlab-ci.yml: Clean and check kernel build Refactor .gitignore file
doxygen: Remove generated config file up make clean gitlab-ci.yml: Clean and check xenomai build
.gitignore | 56 +++++++++++++++++++++++++++++------------ .gitlab-ci.yml | 11 +++++--- doc/doxygen/Makefile.am | 1 + 3 files changed, 48 insertions(+), 20 deletions(-)
Signature · 1 line
2.35.3
PATCH 1/5 gitlab-ci.yml: Use CI_PROJECT_DIR variable
Using CI_PROJECT_DIR we can reduce the amount of directory changes and configure the kernel relative to the Xenomai project directory.
--- .gitlab-ci.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
.gitlab-ci.yml +2 -4
@@ -70,7 +70,7 @@ variables: - export PATH=/usr/lib/ccache:$PATH - ${CROSS_COMPILE}gcc --version script: - - export CCACHE_DIR=$(pwd)/.ccache + - export CCACHE_DIR=${CI_PROJECT_DIR}/.ccache - pushd ${KDIR} - make -j $(nproc) ${KERNEL_DEFCONFIG} # Generic settings
@@ -168,9 +168,7 @@ variables: - ./scripts/config -e XENO_DRIVERS_SPI_SUN6I - ./scripts/config -e XENO_DRIVERS_SPI_OMAP2_MCSPI_RT - ./scripts/config -e XENO_DRIVERS_SPI_DEBUG - - popd - - scripts/prepare-kernel.sh --linux=${KDIR} - - pushd ${KDIR} + - ${CI_PROJECT_DIR}/scripts/prepare-kernel.sh - make -j $(nproc) olddefconfig - make -j $(nproc) all - popd
Signature · 1 line
2.35.3
PATCH 2/5 gitlab-ci.yml: Clean and check kernel build
In reply to Richard WeinbergerMake sure that after cleaning the build none of our changes are left behind.
--- .gitlab-ci.yml | 3 +++ 1 file changed, 3 insertions(+)
.gitlab-ci.yml +3 -0
@@ -171,6 +171,9 @@ variables: - ${CI_PROJECT_DIR}/scripts/prepare-kernel.sh - make -j $(nproc) olddefconfig - make -j $(nproc) all + - make clean + - ${CI_PROJECT_DIR}/scripts/prepare-kernel.sh --reverse + - git status --short | grep . && exit 1 - popd - scripts/bootstrap - ./configure ${CONFIGURE_OPTS}
Signature · 1 line
2.35.3
PATCH 3/5 Refactor .gitignore file
In reply to Richard WeinbergerAdd C and autoconf specific artefacts.
--- .gitignore | 56 ++++++++++++++++++++++++++++++++++++++---------------- 1 file changed, 40 insertions(+), 16 deletions(-)
.gitignore +40 -16
@@ -1,17 +1,41 @@ +# Regular C artifacts +*.a +*.la +*.lo +*.o +*.s +*.so + +# autoconf specific +/aclocal.m4 +/autom4te.cache +/config.log +/config.status +/config/compile +/config/config.guess +/config/config.sub +/config/depcomp +/config/install-sh +/config/libtool.m4 +/config/ltmain.sh +/config/ltoptions.m4 +/config/ltsugar.m4 +/config/ltversion.m4 +/config/lt~obsolete.m4 +/config/missing +/configure +/include/stamp-h? +/libtool +/include/xeno_config.h +/include/xeno_config.h.in* +/.ccache +.deps +.libs +.dirstamp +Makefile Makefile.in -include/xeno_config.h.in* -config/compile -config/config.guess -config/config.sub -config/depcomp -config/install-sh -config/libtool.m4 -config/ltmain.sh -config/ltoptions.m4 -config/ltsugar.m4 -config/ltversion.m4 -config/lt~obsolete.m4 -config/missing -configure -aclocal.m4 -autom4te.cache +# They are part of AC_CONFIG_FILES +/utils/net/rtnet +/utils/net/rtnet.conf +/scripts/xeno +/scripts/xeno-config
Signature · 1 line
2.35.3
PATCH 4/5 doxygen: Remove generated config file up make clean
In reply to Richard Weinberger--- doc/doxygen/Makefile.am | 1 + 1 file changed, 1 insertion(+)
doc/doxygen/Makefile.am +1 -0
@@ -1,6 +1,7 @@ HTML_DOCS = html/xeno3prm html/xeno3prm/search PDF_DOCS = xeno3prm.pdf EXTRA_DIST = xeno3prm-common.conf.in xeno3prm-html.conf.in xeno3prm-latex.conf.in +CLEANFILES = xeno3prm-common.conf xeno3prm-html.conf xeno3prm-latex.conf if XENO_BUILD_DOC
Signature · 1 line
2.35.3
PATCH 5/5 gitlab-ci.yml: Clean and check xenomai build
In reply to Richard WeinbergerLike for the kernel build, make sure make clean leaves no auto generated files behind.
If this check fails in future, either clean rules are missing or .gitignore patterns need an update.
--- .gitlab-ci.yml | 2 ++ 1 file changed, 2 insertions(+)
.gitlab-ci.yml +2 -0
@@ -178,6 +178,8 @@ variables: - scripts/bootstrap - ./configure ${CONFIGURE_OPTS} - make -j $(nproc) + - make clean + - git status --short | grep . && exit 1 - ccache -s interruptible: true cache:
Signature · 1 line
2.35.3
Jan Kiszka
AppliedQuoted 14 lines · Richard Weinberger
Run make clean after building kernel and Xenomai and check whether no stale files exist.
This allows also testing the --reverse feature ofprepare-kernel.sh.Since build artefacts are not used after building, at least as I understand the current pipelines, make clean can get executed right in the build stage.
Richard Weinberger (5):
gitlab-ci.yml: UseCI_PROJECT_DIRvariable gitlab-ci.yml: Clean and check kernel build Refactor .gitignore file
doxygen: Remove generated config file up make clean gitlab-ci.yml: Clean and check xenomai build
Quoted 5 lines
.gitignore | 56 +++++++++++++++++++++++++++++------------ .gitlab-ci.yml | 11 +++++--- doc/doxygen/Makefile.am | 1 + 3 files changed, 48 insertions(+), 20 deletions(-)
Thanks, applied.
Jan
Signature · 2 lines
Siemens AG, Technology Linux Expert Center