• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

dockerfiles/H03-May-2022-526442

siconos_confs/H07-Sep-2021-797648

ctest_driver_install_siconos.cmakeH A D07-Sep-20217.9 KiB244201

ctest_siconos.shH A D07-Sep-20212.1 KiB4914

ctest_tools.cmakeH A D07-Sep-20215.1 KiB147125

docker-manual.ymlH A D07-Sep-20211.2 KiB5342

docker_local.shH A D07-Sep-2021328 76

gitlab-ci-siconos-templates.ymlH A D07-Sep-20219.3 KiB271243

install_siconos_centos.shH A D07-Sep-20211.9 KiB408

make_siconos_doc.shH A D07-Sep-20211.1 KiB275

readme.mdH A D07-Sep-20215.1 KiB12275

siconos-with-oce.ymlH A D07-Sep-20212.3 KiB7765

readme.md

1# Continuous integration setup
2[[_TOC_]]
3
4## Driving the continuous integration process
5
6The behavior of the CI (which jobs are created and launched) depends on the content of the last commit message and on the targeted branch as summarized in the table below.
7
8Job type are:
9
10* [A] Those to **Prepare docker images**: jobs used to build and save docker images with all the dependencies required to install siconos.
11
12    * Docker images are saved in the project registry, in 'sources',  see https://gricad-gitlab.univ-grenoble-alpes.fr/nonsmooth/siconos/container_registry.
13    * The images are built from Dockerfiles saved in [ci_gitlab/dockerfiles](./ci_gitlab/dockerfiles)
14
15* [B] Those to configure, build or test Siconos
16
17    * They are executed on one of the images saved in the registry.
18    * Build and tests results are published on [siconos-dashboard](http://siconos-dashboard.univ-grenoble-alpes.fr:8080/index.php?project=siconos).
19
20* [C] Those to generate a docker image with a fully functionnal install of Siconos.
21
22    * Based on the results of a previous job of type [B]
23    * The image is saved in the registry, https://gricad-gitlab.univ-grenoble-alpes.fr/nonsmooth/siconos/
24    * The image is usually named siconos-<CI_COMMIT_REF_NAME>-<osname>, eg siconos-master-ubuntu20
25
26
27| Commit starts with ...   |  [skip ci]  | [docker-build]                          | [all-jobs] | any other message |
28| ---                      |  ------     |----------------                         |---------------------------------------|-------------------|
29| push to master           |   :x:       | :white_check_mark: all [A]<br>:white_check_mark: all [B] (debian, ubuntu ...)<br>:white_check_mark: [C] on ubuntu20.04 |useless| :white_check_mark: all [A] <br>:white_check_mark: [C] on ubuntu20.04 |
30| push to any other branch |   :x:       | :white_check_mark: all [A]<br>:white_check_mark: [B] on ubuntu20.04<br>:white_check_mark: [C] on ubuntu20.04 | :white_check_mark: all [A] (debian, ubuntu ...)<br>:white_check_mark: [C] on ubuntu20.04 | :white_check_mark: [B] on ubuntu20.04<br>:white_check_mark: [C] on ubuntu20.04|
31
32* "bridge examples" job: when the commit message contains "[with examples], the push will triggered the CI process in siconos-tutorials project and
33run all examples with the version of Siconos (MR or branch or master) corresponding to the current push. It will be executed on the docker image
34built and saved during the current CI pipeline (named siconos-<branch-name> and saved in siconos-tutorials registries).
35
36* Some jobs are optional and must be started directly by clicking on the little gear next to the job name on gitlab CI interface (e.g. siconos with oce, documentation ...). They look like ![manual_ci.jpg](./manual_ci.jpg)
37
38To check the complete pipeline, see https://gricad-gitlab.univ-grenoble-alpes.fr/nonsmooth/siconos/-/pipelines.
39
40
41
42## CI configuration
43
44The directory [ci_gitlab](./) contains cmake/ctest and script files used in .gitlab-ci.yml
45for CI on gricad-gitlab, with:
46
47* [ctest_siconos.sh](./ctest_siconos.sh) is the file call in CI jobs to run ctest (from configure to tests)
48* [siconos_conf](./siconos_conf): contains setup files to be used to configure siconos in CI jobs,
49as in
50
51```
52cmake -DUSER_OPTIONS_FILE=<path-to-siconos>/ci_gitlab/siconos_confs/siconos_no_python.cmake
53```
54
55
56* [dockerfiles](./dockerfiles): contains directories (with Dockerfiles and some other
57required files) used to build Docker images "ready-to-use" for Siconos install.
58
59Examples of usage :
60
61```
62# build a docker image named some_name with all required deps for Siconos
63docker build -t <some_name> dockerfiles/ubuntu18.04-fclib
64```
65
66
67```
68start a docker container based on this image.
69docker run -ti some_name /bin/bash
70```
71
72All these dockerfiles directories are used on gricad-gitlab to build images used in CI process for Siconos.
73
74The list of already built images is here:
75https://gricad-gitlab.univ-grenoble-alpes.fr/nonsmooth/siconos/container_registry
76
77To download and run an image, try for example:
78
79```
80docker login gricad-registry.univ-grenoble-alpes.fr/nonsmooth/siconos
81docker run -ti gricad-registry.univ-grenoble-alpes.fr/nonsmooth/siconos/ubuntu18.04 /bin/bash
82```
83
84## Predefined environment variables
85
86### gitlab-ci
87
88https://docs.gitlab.com/ee/ci/variables/predefined_variables.html
89
90### Travis
91
92https://docs.travis-ci.com/user/environment-variables/#default-environment-variables
93
94# Running locally ...
95
96To (re)-build a docker image locally, try
97
98```
99source docker-local.sh <image-name>
100```
101
102Replace <image-name> by any name matching a directory in ci_gitlab/dockerfiles, depending on the image you need
103(e.g. ubuntu20.04).
104
105This will:
106
107- create a temporary Dockerfile in ./tmp, from the template in ci_gitlab/dockerfiles/<image-name>
108- build a docker image using this dockerfile
109
110Then, you can build a container from this image and mount the current siconos repository inside this container:
111
112```
113docker run -v $PWD:/home/siconos -ti gricad-registry.univ-grenoble-alpes.fr/nonsmooth/siconos/sources/ubuntu20-04
114```
115
116Or upload it to siconos registries on gricad-gitlab:
117
118```
119docker push gricad-registry.univ-grenoble-alpes.fr/nonsmooth/siconos/sources/ubuntu20-04
120```
121
122