Have GIT run becnhmarks to prior to accepting code changes

Dear developer,

I came to understand that the ASPECT repository runs benchmarks prior to accepting any code change. I am working on another geophysical code, and we have been running nightly tests for a year, but that still could allow erroneous code to enter the repository, giving extra work on having to fix this, so I would like to set something up like what you guys are running. Particularly now that multiple people will be contributing to the code. However, this turns out to be an enigma to me.

I have first tried to use a pre-commit hook on the local repository, but then, the code change is not yet present, so i cannot be tested, and also the benchmarks take a few hours to run, which is annoying for every tiny commit, so I tried a pre-push hook, but then I learned that hooks are not cloned along when cloning a local repository, so every contributor would have to make a pre-push hook every time the remote repository is cloned, which people are likely to forget.

So I tried to use a hook on the remote repository, but there is only pre-receive and update, which are executed when the changes are not yet in, and post-receive, which appears not to be able to revert a push.

So… How have you done this?

Thanks a lot for your time and expertise!

Lukas

You are looking for “continuous integration” with integration in github.com. There are many providers that include limited free options (travis ci, gitlab, drone, appveyor, etc.). For ASPECT we are using our own machines running https://jenkins.io/.

Thank you, Timo!

We want to keep our own remote repository, and not make use of a web service (yet). I will definitely have a look at Jenkins.

I am not sure what that means. You can “keep” your git repository wherever you want and you can mirror it somewhere online (like github, bitbucket, gitlab).

You can either use a free web service (limited CPU times), pay for a webservice, or run stuff by yourself.

Sorry for being unclear. I meant we do not yet want to make the code publicly available on github. I was not aware that Github offers private repositories. I will follow your advice!

Thanks again!
Lukas