.gitlab-ci.yml 1.43 KB
Newer Older
Guilhem Bonnefille's avatar
Guilhem Bonnefille committed
1 2 3 4 5 6 7 8 9 10
# 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.
# We have to use directly git-lfs wrappring commands to have an
# 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 12
variables:
  DOCKER_DRIVER: overlay2
13
  GIT_DEPTH: "3"
Guilhem Bonnefille's avatar
Guilhem Bonnefille committed
14
  # Disable automatic checkout to let us fetch LFS before
15
  GIT_CHECKOUT: "false"
Guilhem Bonnefille's avatar
Guilhem Bonnefille committed
16
  # The fetch strategy fails with LFS and GitLab
17
  GIT_STRATEGY: "clone"
18 19

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

stages:
  - build

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

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

43
build:ubuntu-llvm:
44
  extends: .general
Antoine Regimbeau's avatar
Antoine Regimbeau committed
45
  stage: build
46
  image: registry.orfeo-toolbox.org/gbonnefille/otb-build-env/otb-ubuntu-shark:18.04
Antoine Regimbeau's avatar
Antoine Regimbeau committed
47
  script:
Guillaume Pasero's avatar
Guillaume Pasero committed
48
    - ctest -VV -S CI/main_ci.cmake -DIMAGE_NAME:string=ubuntu-18.04-llvm-shark