Commit 118f2d20 authored by Thomas Ives's avatar Thomas Ives
Browse files

.gitlab-ci.yml: Make it work with cppTango main

cppTango main now requires omniORB 4.3 so we can no longer use a shared
template with the 9.3-backports branch.
parent 8853df3f
Loading
Loading
Loading
Loading
Loading
+54 −17
Original line number Diff line number Diff line
@@ -18,9 +18,10 @@ workflow:
    - if: $CI_COMMIT_TAG
    - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH

# Not possible with parallel, see https://gitlab.com/gitlab-org/gitlab/-/issues/254821
.build-cppTango-template: &build-cppTango-template
build-cppTango-9.3-backports:
  image: debian:bullseye
  tags:
    - docker, linux, amd64
  before_script:
    - apt-get update
    - >
@@ -43,15 +44,12 @@ workflow:
    - cmake -B /cppzmq/build -DCPPZMQ_BUILD_TESTS=OFF /cppzmq
    - make -C /cppzmq/build install
    # Clone cppTango
    - git clone -b ${BRANCH} --depth 1 https://gitlab.com/tango-controls/cppTango.git /cppTango
    - git clone -b 9.3-backports --depth 1 https://gitlab.com/tango-controls/cppTango.git /cppTango
    - >
      cmake -B /cppTango/build
      -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
      -DBUILD_TESTING=OFF
      -DTANGO_IDL_BASE=/usr/local/tango-idl
      -DIDL_BASE=/usr/local/tango-idl
      -DTANGO_USE_JPEG=OFF
      -DTANGO_USE_USING_NAMESPACE=OFF
      /cppTango
  script:
    - make -C /cppTango/build install
@@ -61,6 +59,56 @@ workflow:
    paths:
      - usr-local.tar

build-cppTango-main:
  image: debian:bullseye
  tags:
    - docker, linux, amd64
  before_script:
    - apt-get update
    - >
      apt-get install -y
      build-essential
      curl
      cmake
      git
      python3-dev
      libssl-dev
      libzmq3-dev
      pkg-config
    # Install omniORB 4.3.1
    - curl -L -o omniORB.tar.bz2 https://sourceforge.net/projects/omniorb/files/omniORB/omniORB-4.3.1/omniORB-4.3.1.tar.bz2/download
    - mkdir -p /omniorb/build
    - tar xaf omniORB.tar.bz2 --directory=/omniorb --strip-components=1
    - cd /omniorb/build
    - ../configure --prefix=/usr/local --with-openssl
    - make -j$(nproc) all
    - make install
    - cd ${CI_PROJECT_DIR}
    # Install tango-idl
    - git clone --depth 1 https://gitlab.com/tango-controls/tango-idl.git /idl
    - cmake -B /idl/build -DCMAKE_INSTALL_PREFIX=/usr/local/tango-idl /idl
    - make -j$(nproc) -C /idl/build install
    # Install cppzmq
    - git clone -b v4.7.1 --depth 1 https://github.com/zeromq/cppzmq.git /cppzmq
    - cmake -B /cppzmq/build -DCPPZMQ_BUILD_TESTS=OFF /cppzmq
    - make -j$(nproc) -C /cppzmq/build install
    # Clone cppTango
    - git clone -b main --depth 1 https://gitlab.com/tango-controls/cppTango.git /cppTango
    - >
      cmake -B /cppTango/build
      -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
      -DBUILD_TESTING=OFF
      -DTANGO_IDL_BASE=/usr/local/tango-idl
      -DTANGO_USE_JPEG=OFF
      /cppTango
  script:
    - make -j$(nproc) -C /cppTango/build install
    - tar cf usr-local.tar /usr/local
  artifacts:
    when: on_success
    paths:
      - usr-local.tar

.build-template-win:
  rules:
    - if: '$ARCH == "x64"'
@@ -116,17 +164,6 @@ build-win-32bit:
    ARCH: x86
    PLATFORM: Win32


build-cppTango-main:
  variables:
    BRANCH: main
  <<: *build-cppTango-template

build-cppTango-9.3-backports:
  variables:
    BRANCH: 9.3-backports
  <<: *build-cppTango-template

.build-template: &build-template
  image: debian:bullseye
  before_script: