Gitlab CI using ROOT


I usually do CI/CD using the following .gitlab-ci.yml file:

1.37 KiB
image: alpine
- apk update
- apk add git ttf-freefont graphviz
- apk add gcc g++ doxygen cmake make gtest-dev
#- apk add root # <-- I just tried adding this

I need to add root for testing purpose. Is there an easy way to get the last root version installed ?

Running with gitlab-runner 16.5.0 (853330f9)
  on runners-k8s-default-runners-558b67d576-7tdkz PDEkew5D, system ID: r_3Erd1pVFayX8
Resolving secrets
Preparing the "kubernetes" executor
Using Kubernetes namespace: gitlab
Using Kubernetes executor with image alpine ...
Using attach strategy to execute scripts...
Preparing environment
Using FF_USE_POD_ACTIVE_DEADLINE_SECONDS, the Pod activeDeadlineSeconds will be set to the job timeout: 1h0m0s...
WARNING: Advanced Pod Spec configuration enabled, merging the provided PodSpec to the generated one. This is an alpha feature and is subject to change. Feedback is collected in this issue: ...
Waiting for pod gitlab/runner-pdekew5d-project-175290-concurrent-0-q9lds4r3 to be running, status is Pending
Waiting for pod gitlab/runner-pdekew5d-project-175290-concurrent-0-q9lds4r3 to be running, status is Pending
	ContainersNotReady: "containers with unready status: [build helper]"
	ContainersNotReady: "containers with unready status: [build helper]"
Running on runner-pdekew5d-project-175290-concurrent-0-q9lds4r3 via runners-k8s-default-runners-558b67d576-7tdkz...
Getting source from Git repository
Fetching changes with git depth set to 20...
Initialized empty Git repository in /builds/igwn/templates/root-library/.git/
Created fresh repository.
Checking out f28797ac as detached HEAD (ref is master)...
Skipping Git submodules setup
Executing "step_script" stage of the job script
$ # INFO: Lowering limit of file descriptors for backwards compatibility. ffi: # collapsed multi-line command
$ apk update
v3.18.5-6-ge41a5c49bb2 []
v3.18.5-8-gc2380318d28 []
OK: 20069 distinct packages available
$ apk add git ttf-freefont graphviz
(1/54) Installing ca-certificates (20230506-r0)
(2/54) Installing brotli-libs (1.0.9-r14)
(3/54) Installing libunistring (1.1-r1)
(4/54) Installing libidn2 (2.3.4-r1)
(5/54) Installing nghttp2-libs (1.57.0-r0)
(6/54) Installing libcurl (8.4.0-r0)
(7/54) Installing libexpat (2.5.0-r1)
(8/54) Installing pcre2 (10.42-r1)
(9/54) Installing git (2.40.1-r0)
(10/54) Installing libxau (1.0.11-r2)
(11/54) Installing libmd (1.0.4-r2)
(12/54) Installing libbsd (0.11.7-r1)
(13/54) Installing libxdmcp (1.1.4-r2)
(14/54) Installing libxcb (1.15-r1)
(15/54) Installing libx11 (1.8.7-r0)
(16/54) Installing libxext (1.3.5-r2)
(17/54) Installing libxrender (0.9.11-r3)
(18/54) Installing libbz2 (1.0.8-r5)
(19/54) Installing libpng (1.6.39-r3)
(20/54) Installing freetype (2.13.0-r5)
(21/54) Installing fontconfig (2.14.2-r3)
(22/54) Installing pixman (0.42.2-r1)
(23/54) Installing cairo (1.17.8-r1)
(24/54) Installing graphviz-libs (8.0.5-r1)
(25/54) Installing libgcc (12.2.1_git20220924-r10)
(26/54) Installing libice (1.1.1-r2)
(27/54) Installing libuuid (2.38.1-r8)
(28/54) Installing libsm (1.2.4-r1)
(29/54) Installing libxt (1.3.0-r2)
(30/54) Installing libxpm (3.5.16-r1)
(31/54) Installing aom-libs (3.6.1-r0)
(32/54) Installing libdav1d (1.2.1-r0)
(33/54) Installing libwebp (1.3.2-r0)
(34/54) Installing libavif (0.11.1-r2)
(35/54) Installing libjpeg-turbo (
(36/54) Installing zstd-libs (1.5.5-r4)
(37/54) Installing tiff (4.5.1-r0)
(38/54) Installing libgd (2.3.3-r7)
(39/54) Installing libffi (3.4.4-r2)
(40/54) Installing libintl (0.21.1-r7)
(41/54) Installing libblkid (2.38.1-r8)
(42/54) Installing libmount (2.38.1-r8)
(43/54) Installing glib (2.76.4-r0)
(44/54) Installing libxft (2.3.8-r1)
(45/54) Installing fribidi (1.0.13-r0)
(46/54) Installing graphite2 (1.3.14-r5)
(47/54) Installing harfbuzz (7.3.0-r0)
(48/54) Installing pango (1.50.14-r1)
(49/54) Installing libstdc++ (12.2.1_git20220924-r10)
(50/54) Installing graphviz (8.0.5-r1)
(51/54) Installing encodings (1.0.7-r1)
(52/54) Installing libfontenc (1.1.7-r2)
(53/54) Installing mkfontscale (1.2.2-r3)
(54/54) Installing font-freefont (20120503-r4)
Executing busybox-1.36.1-r5.trigger
Executing ca-certificates-20230506-r0.trigger
Executing fontconfig-2.14.2-r3.trigger
Executing glib-2.76.4-r0.trigger
Executing graphviz-8.0.5-r1.trigger
Executing mkfontscale-1.2.2-r3.trigger
OK: 58 MiB in 69 packages
$ apk add gcc g++ doxygen cmake make gtest-dev
(1/28) Installing libacl (2.3.1-r3)
(2/28) Installing lz4-libs (1.9.4-r4)
(3/28) Installing xz-libs (5.4.3-r0)
(4/28) Installing libarchive (3.7.2-r0)
(5/28) Installing ncurses-terminfo-base (6.4_p20230506-r0)
(6/28) Installing libncursesw (6.4_p20230506-r0)
(7/28) Installing libformw (6.4_p20230506-r0)
(8/28) Installing rhash-libs (1.4.3-r2)
(9/28) Installing libuv (1.44.2-r2)
(10/28) Installing cmake (3.26.5-r0)
(11/28) Installing doxygen (1.9.6-r1)
(12/28) Installing libstdc++-dev (12.2.1_git20220924-r10)
(13/28) Installing binutils (2.40-r7)
(14/28) Installing libgomp (12.2.1_git20220924-r10)
(15/28) Installing libatomic (12.2.1_git20220924-r10)
(16/28) Installing gmp (6.2.1-r3)
(17/28) Installing isl26 (0.26-r1)
(18/28) Installing mpfr4 (4.2.0_p12-r0)
(19/28) Installing mpc1 (1.3.1-r1)
(20/28) Installing gcc (12.2.1_git20220924-r10)
(21/28) Installing musl-dev (1.2.4-r2)
(22/28) Installing libc-dev (0.7.2-r5)
(23/28) Installing g++ (12.2.1_git20220924-r10)
(24/28) Installing gtest (1.13.0-r1)
(25/28) Installing gmock (1.13.0-r1)
(26/28) Installing pkgconf (1.9.5-r0)
(27/28) Installing gtest-dev (1.13.0-r1)
(28/28) Installing make (4.4.1-r1)
Executing busybox-1.36.1-r5.trigger
OK: 355 MiB in 97 packages
$ apk add root
ERROR: unable to select packages:
  root (no such package):
    required by: world[root]
Cleaning up project directory and file based variables
ERROR: Job failed: command terminated with exit code 1

I also though about loading CVMFS, but what would be your recommendation ?

I don’t know where apk is taking the packages from, and for CVMFS, I’ll let @jblomer give some hints

Thank you for the input. I don’t have personal reason to use alpine and apk.
Would you have maybe some suggestions about the image I could use to make it easier and get an easy access to a precompiled root ?

See the pre-built versions Releases - ROOT and Release 63002 - ROOT

I meant gitlab image. I have difficulties to run have a precompiled root to compile my librairies and run tests

Oh, sorry, I’ll ask if someone knows…

I am sorry if I am overlooking something but some public examples on how to setup a root environment for gitlab ci/cd would actually really be great.

I have tried many combinations but couldn’t get CVMFS working nor conda (but not so much experienced with conda environments and containers) On the other hand, eigen3 and many other scientific packages seem well distributed and easy to include in gitlab-ci is it because it is rather “heavy” package ?

You can use a docker image. See Installing ROOT - ROOT

1 Like

Here are my two cents contribution !

Is there any chance to add a Gitlab section in this install page of ROOT ? It would have spare me some time :slight_smile: Hope it would be useful for anybody that have the same issue here

image: rootproject/root:latest 

  stage: build
    - echo "CERN CVMFS repository"
    - ls -ls /cvmfs/
    - cvmfs

  stage: build
    - echo -ne "ROOT Version "
    - which root
    - echo "ROOT Features"
    - root-config --features

1 Like

Here is the pull request for adding the Gitlab section in the install page: Add a Gitlab CI/CD section by bellenot · Pull Request #943 · root-project/web · GitHub

1 Like

@meyerma could you please see my comments in the PR? I don’t understand the combination of the ROOT docker image and cvmfs.

:+1:. .

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.