.gitlab-ci.yml 3.93 KB
Newer Older
Ghislain MARY's avatar
Ghislain MARY committed
1 2
variables:
  GIT_SUBMODULE_STRATEGY: recursive
3
  MAKEFILE_JOBS: 5
4
  CCACHE_SIZE: 2G
5
  DEFAULT_LINUX_CMAKE_OPTIONS: -DENABLE_NON_FREE_CODECS=YES -DENABLE_OPENH264=YES
6 7
  DEFAULT_MACOS_CMAKE_OPTIONS: -DCMAKE_OSX_DEPLOYMENT_TARGET=10.11 -DENABLE_UPDATE_CHECK=YES
  DEFAULT_WINDOWS_CMAKE_OPTIONS: -DENABLE_NON_FREE_CODECS=YES -DENABLE_OPENH264=YES -DENABLE_UPDATE_CHECK=YES
Ghislain MARY's avatar
Ghislain MARY committed
8 9


10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
.linux-ccache:

  cache:
    key: $CI_JOB_NAME
    paths:
      - ccache/

  before_script:
    - mkdir -p ccache
    - echo "max_size = $CCACHE_SIZE" > ccache/ccache.conf
    - export CCACHE_BASEDIR=${PWD}
    - export CCACHE_DIR=${PWD}/ccache
    - ccache -s

  after_script:
    - export CCACHE_DIR=${PWD}/ccache
    - ccache -s


29
.job-linux-desktop:
Ghislain MARY's avatar
Ghislain MARY committed
30

31
  extends: .linux-ccache
Ghislain MARY's avatar
Ghislain MARY committed
32 33 34 35

  script:
    - export CC=$CC
    - export CXX=$CXX
36
    - ./prepare.py -G "$CMAKE_GENERATOR" -cc $DEFAULT_LINUX_CMAKE_OPTIONS $CMAKE_OPTIONS
37
    - cmake --build WORK/desktop/cmake -- $ADDITIONAL_BUILD_OPTIONS
Ghislain MARY's avatar
Ghislain MARY committed
38

39 40 41 42 43 44 45 46 47 48

.scheduled-job-linux-desktop:

  extends: .job-linux-desktop
  only:
    - schedules


job-debian9-makefile-gcc:

49
  tags: [ "docker-debian9" ]
50 51 52 53 54
  image: gitlab.linphone.org:4567/bc/public/linphone-sdk/bc-dev-debian:9
  variables:
    CMAKE_GENERATOR: Unix Makefiles
    CC: gcc
    CXX: g++
55
    ADDITIONAL_BUILD_OPTIONS: -j$MAKEFILE_JOBS
56 57 58 59 60
  extends: .scheduled-job-linux-desktop


job-debian9-makefile-clang:

61
  tags: [ "docker-debian9" ]
62 63 64 65 66
  image: gitlab.linphone.org:4567/bc/public/linphone-sdk/bc-dev-debian:9
  variables:
    CMAKE_GENERATOR: Unix Makefiles
    CC: clang
    CXX: clang++
67
    ADDITIONAL_BUILD_OPTIONS: -j$MAKEFILE_JOBS
68
  extends: .scheduled-job-linux-desktop
Ghislain MARY's avatar
Ghislain MARY committed
69 70 71 72


job-debian9-ninja-gcc:

73
  tags: [ "docker-debian9" ]
Ghislain MARY's avatar
Ghislain MARY committed
74 75 76 77 78
  image: gitlab.linphone.org:4567/bc/public/linphone-sdk/bc-dev-debian:9
  variables:
    CMAKE_GENERATOR: Ninja
    CC: gcc
    CXX: g++
79
  extends: .job-linux-desktop
Ghislain MARY's avatar
Ghislain MARY committed
80 81 82 83


job-debian9-ninja-clang:

84
  tags: [ "docker-debian9" ]
Ghislain MARY's avatar
Ghislain MARY committed
85 86 87 88 89
  image: gitlab.linphone.org:4567/bc/public/linphone-sdk/bc-dev-debian:9
  variables:
    CMAKE_GENERATOR: Ninja
    CC: clang
    CXX: clang++
90
  extends: .job-linux-desktop
Ghislain MARY's avatar
Ghislain MARY committed
91 92


93
.job-macosx:
Ghislain MARY's avatar
Ghislain MARY committed
94 95 96 97 98 99 100

  tags: [ "macosx" ]

  script:
    - ccache -s
    - export Qt5_DIR=/usr/local/opt/qt/lib/cmake
    - export PATH=$PATH:/usr/local/opt/qt/bin
101
    - python prepare.py -G "$CMAKE_GENERATOR" -cc --package $DEFAULT_MACOS_CMAKE_OPTIONS $CMAKE_OPTIONS
102
    - cmake --build WORK/desktop/cmake -- $ADDITIONAL_BUILD_OPTIONS
Ghislain MARY's avatar
Ghislain MARY committed
103 104 105 106 107 108 109 110 111 112
    - ccache -s

  artifacts:
    paths:
      - WORK/desktop/Build/linphone_package/Linphone-*.dmg
      - WORK/desktop/Build/linphone_package/linphone-sdk-*-mac.zip
    when: always
    expire_in: 1 week


113 114 115 116 117 118 119 120 121 122 123
.scheduled-job-macosx:

  extends: .job-macosx
  only:
    - schedules


job-macosx-makefile:

  variables:
    CMAKE_GENERATOR: Unix Makefiles
124
    ADDITIONAL_BUILD_OPTIONS: -j$MAKEFILE_JOBS
125 126 127
  extends: .scheduled-job-macosx


Ghislain MARY's avatar
Ghislain MARY committed
128 129 130 131
job-macosx-ninja:

  variables:
    CMAKE_GENERATOR: Ninja
132
  extends: .job-macosx
Ghislain MARY's avatar
Ghislain MARY committed
133 134 135 136


job-macosx-xcode:

137 138 139 140 141 142 143
  tags: [ "macosx" ]

  only:
    - schedules
  script:
    - export Qt5_DIR=/usr/local/opt/qt/lib/cmake
    - export PATH=$PATH:/usr/local/opt/qt/bin
144
    - python prepare.py -G Xcode -cc --package $DEFAULT_MACOS_CMAKE_OPTIONS $CMAKE_OPTIONS
145 146 147 148 149 150 151 152
    - cmake --build WORK/desktop/cmake -- -IDEBuildOperationMaxNumberOfConcurrentCompileTasks=`sysctl -n hw.ncpu`

  artifacts:
    paths:
      - WORK/desktop/Build/linphone_package/Linphone-*.dmg
      - WORK/desktop/Build/linphone_package/linphone-sdk-*-mac.zip
    when: always
    expire_in: 1 week
Ghislain MARY's avatar
Ghislain MARY committed
153 154 155 156 157 158 159 160 161


job-windows-vs2015:

  tags: [ "windows" ]

  script:
    - echo %Qt5_DIR%
    - echo %PATH%
162
    - if DEFINED WINDOWS_SIGNING_DIRECTORY ( xcopy /I /Y "%WINDOWS_SIGNING_DIRECTORY%" "cmake_builder\\linphone_package\\sign" )
163
    - python prepare.py -G "Visual Studio 14 2015" --package %DEFAULT_WINDOWS_CMAKE_OPTIONS% %CMAKE_OPTIONS%
Ghislain MARY's avatar
Ghislain MARY committed
164 165 166 167 168 169
    - cmake --build WORK/desktop/cmake --config Release -- /maxcpucount

  artifacts:
    paths:
      - WORK/desktop/Build/linphone_package/Linphone-*-win32.exe
    expire_in: 1 week