问题
In high performance computing is crucial to have a code tested against many different architectures/compilers: from a laptop to a supercomputer.
Assuming that we have
N
testing machines/workers (each one runninggitlab-ci-runner
);M
tests,
what shall be the correct layout of .gitlab-ci.yml
to ensure that each
of the N
machines runs all the tests?
Looks to me that adding just more workers ends up in a round-robin
like assignment of the jobs.
Thanks for your help.
回答1:
You could use tags in your .gitlab-ci.yml and on the runners to distribute your tests to all mashines you want. Gitlab CI is very open to those use cases. I assume that you don't use docker for testing.
To accomplish your goal, do following steps:
- Install your gitlab-ci-multi-runners on your
N
mashines BUT if the runner ask you for tags, tag the mashine with a specifc name e.g. "MashineWithManyCPUsWhatever". Please use thegitlab-ci-multi-runner register
command to do so. You can alternatively change the tags in Gitlab on the administration view after registration. The type of the runners should be "shared" not "specific".
- When you installed and tagged every runner on your mashines, tag you jobs. Example:
Every job will now be excecuted on the specific mashine with the specific tag. For more Information see Gitlab CI Documentation
来源:https://stackoverflow.com/questions/35837678/gitlab-ci-running-the-same-set-of-tests-on-several-machines