-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.gitlab-ci.yml
72 lines (66 loc) · 2.28 KB
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
variables:
# Default ctest model. Warning : overwritten if set in schedules variables (as we expect)
CTEST_BUILD_MODEL: Continuous
# Default behavior regarding cdash submission
CDASH_SUBMIT: 0
# Name of the docker image used to run examples. Default = master.
# Set by CI in siconos project for "triggered" examples.
SICONOS_DOCKER_NAME: siconoslab-master
# -- Template for examples build-test-install jobs --
# - Pull an image (possibly from siconos-tutorials registry)
# named IMAGE_NAME
.examples-build:
image:
name: $IMAGE_NAME
entrypoint: [""]
stage: test
script:
- env
- sh ci_gitlab/build_and_run_examples.sh
artifacts:
paths:
- build/
expire_in: 3 days
reports:
junit: $CI_PROJECT_DIR/build-examples/test_results.xml
# Examples, executed on a "ready-to-use" image containing a
# full Siconos installation, based on the last version
# of a branch with the same name as the current example branch.
# Run only when a push has been done to this project.
run-examples:
variables:
IMAGE_NAME: $CI_REGISTRY_IMAGE/siconoslab-occ-$CI_COMMIT_REF_SLUG
CDASH_SUBMIT: 1
extends: .examples-build
rules:
- if: '$CI_PIPELINE_SOURCE == "push"'
when: always
- when: never
# Examples, executed on a "ready-to-use" image containing a
# full Siconos installation, based on the last version
# of a branch with the same name as the current example branch.
# - Run only when triggered from siconos project
# - Run on a docker image $LAB_NAME-$CI_COMMIT_REF_SLUG
# LAB_NAME comes from parent pipeline and $CI_COMMIT_REF_SLUG
# is the current branch name in lowercase
# This job runs in multi-project pipelines only
# Required: same branch name in siconos and siconos-tutorials
triggered-examples:
variables:
IMAGE_NAME: $CI_REGISTRY_IMAGE/$LAB_NAME-$CI_COMMIT_REF_SLUG
CDASH_SUBMIT: 1
BUILD_DIR: ${CI_PROJECT_DIR}/build-examples
extends: .examples-build
rules:
- if: '$CI_PIPELINE_SOURCE == "pipeline"'
when: always
- when: never
# examples, with a standard (default) Siconos installation
# with version from release 4.5 (latest)
# Triggered manualy.
run-examples:release:
variables:
IMAGE_NAME: $CI_REGISTRY_IMAGE/siconos-release-4.5
CDASH_SUBMIT: 1
extends: .examples-build
when: manual