# This is a sample build configuration for C++ – Make.
# Check our guides at https://confluence.atlassian.com/x/5Q4SMw for more examples.
# Only use spaces to indent your .yml configuration.
# -----
# You can specify a custom docker image from Docker Hub as your build environment.
#image: gcc:6.5

pipelines:
  custom:
    all:
    - parallel:

# obsolete OS
#      - step:
#          name: Build on root-centos "remoteonly"
#          image: rootproject/root-centos
#          script:
#            - gcc -v
#            - which root-config
#            - root-config --version
#            - root-config --cflags
#            - root-config --features
#            - git submodule update --init
#            - make remoteonly

# cmake 3.11
#      - step:
#          name: Build on root-centos
#          image: rootproject/root-centos
#          script:
#            - gcc -v
#            - which root-config
#            - root-config --version
#            - root-config --cflags
#            - root-config --features
#            - git submodule update --init
#            - make cmake
#            - make test

# cmake 3.11
#      - step:
#          name: Build on CentOS-8
#          image: centos:centos8
#          script:
#            - yum -y install diffutils make gcc gcc-c++ cmake git zlib-devel openssl-devel curl-devel
#            - gcc -v
#            - cmake --version
#            - git submodule update --init
#            - make cmake
#            - make test

# cmake 3.11
#      - step:
#          name: Build on Ubuntu LTS 18.04
#          image: ubuntu:18.04
#          script:
#            - apt-get update
#            - apt-get -y install gcc g++ cmake git libssl-dev libz-dev libcurl4-gnutls-dev sqlite3 libsqlite3-dev
#            - gcc -v
#            - cmake --version
#            - git submodule update --init
#            - make cmake
#            - make test

      - step:
          name: Build on Ubuntu LTS 20.04
          image: ubuntu:20.04
          script:
            - apt-get update
            - DEBIAN_FRONTEND=noninteractive apt-get -y install gcc g++ cmake git python3-all libssl-dev libz-dev libcurl4-gnutls-dev sqlite3 libsqlite3-dev
            - gcc -v
            - cmake --version
            - git submodule update --init --recursive
            - make cmake
            - make remoteonly
            - make test

      - step:
          name: Build on Ubuntu LTS 22.04
          image: ubuntu:22.04
          script:
            - apt-get update
            - DEBIAN_FRONTEND=noninteractive apt-get -y install gcc g++ cmake git python3-all libssl-dev libz-dev libcurl4-gnutls-dev sqlite3 libsqlite3-dev
            - gcc -v
            - cmake --version
            - git submodule update --init --recursive
            - make cmake
            - make remoteonly
            - make test

      - step:
          name: Build on Ubuntu LTS 24.04
          image: ubuntu:24.04
          script:
            - apt-get update
            - DEBIAN_FRONTEND=noninteractive apt-get -y install gcc g++ cmake git python3-all libssl-dev libz-dev libcurl4-gnutls-dev sqlite3 libsqlite3-dev
            - gcc -v
            - cmake --version
            - git submodule update --init --recursive
            - make cmake
            - make remoteonly
            - make test

      - step:
          name: Build on AlmaLinux 9
          image: almalinux:9
          script:
            - dnf install -y gcc g++ cmake git zlib-devel openssl-devel curl-devel diffutils
            - gcc -v
            - cmake --version
            - git submodule update --init --recursive
            - make cmake
            - make remoteonly
            - make test

#    - step:
#        name: Build on el6 CERN SLC6
#        #image: cern/slc6-base # no gcc
#        image: centos:centos6
#        script:
#          - gcc -v
#          - git clone https://bitbucket.org/tmidas/mxml.git
#          - git clone https://bitbucket.org/tmidas/mscb.git
#          - make

    test:
    - parallel:

      - step:
          name: Build on AlmaLinux 9
          image: almalinux:9
          script:
            - dnf install -y gcc g++ cmake git zlib-devel openssl-devel curl-devel diffutils
            - gcc -v
            - cmake --version
            - git submodule update --init --recursive
            - make cmake
            - make remoteonly
            - make test

