This section explains how to add a package MyPackage
to the homalg CI. It assumes some basic knowledge about
makefiles in general and
writing makefile rules in particular.
This basic idea of the CI is the following: The CI calls make ci-test
in the homalg_project
main directory.
The make target ci-test
depends on other make targets of the form ci-test_MyPackage
.
ci-test_MyPackage
then actually executes the tests of MyPackage
and exits with an nonzero exit code iff errors occur during the tests.
Note: In what follows, all references to files are relative to the homalg_project
main directory and prefixed with ./
.
- If
MyPackage
is not part ofhomalg_project
: Download (and if necessary extract) it in./ci_prepare
. Note: IfMyPackage
is available underhomalg-project
on GitHub, it suffices to addMyPackage
to the listPACKAGES_TO_CLONE
in./ci_prepare
. - If
MyPackage
requires a build:- Add a suitable make target
build_MyPackage
in./makefile
. - Add
build_MyPackage
to the prerequisites of the make targetbuild
in./makefile
.
- Add a suitable make target
- Add a make target
ci-test_MyPackage
in./makefile
which executes the tests ofMyPackage
and exits with an nonzero exit code iff an error occurs during the test.- For example, if
MyPackage
already has a make targetci-test
, simply execute it. - If
MyPackage
is not part ofhomalg_project
, add the make targetci-prepare
to the prerequisites ofci-test_MyPackage
. - If
MyPackage
requires a build, addbuild_MyPackage
to the prerequisites ofci-test_MyPackage
. - If the tests of
MyPackage
depend on Singular, Maple, etc., wrap the call of the tests inifneq ($(SINGULAR_PATH),)
,ifneq ($(MAPLE_PATH),)
, etc. (see existing make targets for details).
- For example, if
- Add
ci-test_MyPackage
to the prerequisites of the make targetci-test
in./makefile
. - If performance data should be made available in Jenkins:
- Prepend the call of the tests of
MyPackage
with/usr/bin/time --quiet --format="%U %S\n%e" --output=performance.out
. For example, ifMyPackage
already has a make targetci-test
callinggap ...
, simply replace this call by/usr/bin/time --quiet --format="%U %S\n%e" --output=performance.out gap ...
. - Note: the output file
performance.out
must be generated inside the directoryMyPackage
, so adjust the path in the call to/usr/bin/time
if necessary. - Add
MyPackage
to the listtests
in./Jenkinsfile
.
- Prepend the call of the tests of
- Add your repository to the file
clone_repos.sh
in the repositoryhomalg_stats
. - Execute
cumlated_stats.py
(requiresgnuplot
). - View
lines_of_code.png
and compare it with the upstream file. If any unexpected jumps etc. occur, seek help.