Once your aliBuild setup is complete it is not necessary to run aliBuild
command each time the code is modified. The development process looks like this (using AliceO2 as an example):
- Load environment:
alienv load O2/latest
- Modify some code
- Go to the build directory:
cd sw/BUILD/O2-latest/O2
- Rebuild:
cmake --build . --target install
- Once you are happy with your changes, create a Pull Request (see the section below)
Of course the same process works with any other repository, e.g. QualityControl or Readout.
To develop on top of a CVFMS or RPMs installation, see here.
Contribute
Since O² uses the Git version control system it is recommended you follow our AliPhysics Git tutorial to learn its rudiments.
Remember to fork the AliceO2 project on GitHub and please follow the coding guidelines, given that most of them are enforced by automatic checks.
Pull request flow
Once you have some code change ready, you can open a pull request (PR) to the relevant AliceO2 repository. If you are a member of the AliceO2Group organization or a long time contributor to it, your pull request will be automatically tested. If you are a first time contributor, you will have to wait for someone to review and approve your PR.
Draft (WIP) Pull requests
In case you are not ready for a PR to be reviewed, you can mark it as “Draft”. This will prevent notifying the reviewers and running the tests.
DEPRECATED: You can also start the PR title with either WIP
or [WIP]
and it will have the same effect. Notice this is deprecated and will be removed at some point in the future.
Run the tests the same way as the CI
When a test is failing in a PR it can be useful to run it ourselves in a similar environment. One needs to install docker first.
docker pull alisw/slc7-builder
# or you can also fetch another builder obviously, but slc7-builder is convenient since there are precompiled binaries so it is fast. It is the one used for build/O2/alidistdocker run -ti alisw/slc7-builder /bin/bash
pip install alibuild
aliBuild init O2@dev
aliBuild --defaults o2 init whateverpackage@whateveryoulike
ALIBUILD_O2_TESTS=1 aliBuild --defaults o2 build whateverpackage --debug