.gitlab-ci.yml 1.43 KB
Newer Older
Guilhem Bonnefille's avatar
Guilhem Bonnefille committed
1
2
3
4
5
# WARNING!
# OTB uses Git-LFS to store the (large) tests data.
# Git-LFS is mostly transparent for the user and recent versions
# are able to use Git-LFS quite efficiently.
# But Git fails to manage efficiently numerous LFS data.
Guilhem Bonnefille's avatar
Guilhem Bonnefille committed
6
# We have to use directly git-lfs wrapping commands to have an
Guilhem Bonnefille's avatar
Guilhem Bonnefille committed
7
8
9
10
# efficient cloning step.
# Furthermore, Git-LFS and Gitlab sufer a bug preventing usage of 
# GIT_STRATEGY=fetch (https://gitlab.com/gitlab-org/gitlab-runner/issues/3318)

Sébastien Dinot's avatar
Sébastien Dinot committed
11
variables:
12
  BUILD_IMAGE_REGISTRY: $CI_REGISTRY/gbonnefille/otb-build-env
Sébastien Dinot's avatar
Sébastien Dinot committed
13
  DOCKER_DRIVER: overlay2
14
  GIT_DEPTH: "3"
Guilhem Bonnefille's avatar
Guilhem Bonnefille committed
15
  # Disable automatic checkout to let us fetch LFS before
16
  GIT_CHECKOUT: "false"
Guilhem Bonnefille's avatar
Guilhem Bonnefille committed
17
  # The fetch strategy fails with LFS and GitLab
18
  GIT_STRATEGY: "clone"
19
20

before_script:
Guilhem Bonnefille's avatar
Guilhem Bonnefille committed
21
  # Provision efficiently the local LFS cache before checkout
22
  - git lfs fetch origin $CI_COMMIT_REF_NAME
Guilhem Bonnefille's avatar
Guilhem Bonnefille committed
23
  # Checkout the expected branch
24
  - git checkout $CI_COMMIT_REF_NAME
Sébastien Dinot's avatar
Sébastien Dinot committed
25
26
27
28

stages:
  - build

29
.general:
Sébastien Dinot's avatar
Sébastien Dinot committed
30
31
32
33
34
35
  retry:
    max: 2
    when:
      - runner_system_failure
      - stuck_or_timeout_failure

Antoine Regimbeau's avatar
Typo  
Antoine Regimbeau committed
36
native-build:
37
  extends: .general
38
  only: [merge_requests]
Sébastien Dinot's avatar
Sébastien Dinot committed
39
  stage: build
40
  image: $BUILD_IMAGE_REGISTRY/otb-ubuntu-native:18.04
Sébastien Dinot's avatar
Sébastien Dinot committed
41
  script:
Antoine Regimbeau's avatar
Antoine Regimbeau committed
42
    - ctest -VV -S CI/main_ci.cmake -DIMAGE_NAME:string=ubuntu-18.04-gcc
Antoine Regimbeau's avatar
Antoine Regimbeau committed
43

44
build:ubuntu-llvm:
45
  extends: .general
Antoine Regimbeau's avatar
Antoine Regimbeau committed
46
  stage: build
47
  image: $BUILD_IMAGE_REGISTRY/otb-ubuntu-shark:18.04
Antoine Regimbeau's avatar
Antoine Regimbeau committed
48
  script:
Guillaume Pasero's avatar
Guillaume Pasero committed
49
    - ctest -VV -S CI/main_ci.cmake -DIMAGE_NAME:string=ubuntu-18.04-llvm-shark