aboutsummaryrefslogblamecommitdiffstatshomepage
path: root/.travis.yml
blob: da019f07327a85a5d4c8a7c26d18011656fa7d80 (plain) (tree)
1
2
3
4
5
6
7
8
9



             



                
             
                    


                                                                          
 

         
                        
       

                                        

                                        
 
                                                                      

                                                      
              
            
      
                                      
      



                          

       
      
                                      

                             

                      
                                              
                                              
                          

     
                   
 

                                           
                   



                                 








                                                      
          

                            
                         

             

                            

                                                                         
                 
                                         
                               


                                                       
                                
 
                 
                    

                                                       

             
                                                     

                       


                                                                                                    
                                                                  
language: cpp
os: linux
dist: bionic

addons:
  apt:
    update: true
    packages:
      - cmake
      - g++-multilib
    sources:
      - sourceline: 'deb https://apt.kitware.com/ubuntu/ bionic main'
        key_url: 'https://apt.kitware.com/keys/kitware-archive-latest.asc'

env:
  global:
    boost_version=1.67.0
  jobs:
    - configuration=Debug   platform=x86
    - configuration=Release platform=x86
    - configuration=Debug   platform=x64
    - configuration=Release platform=x64

# Bionic repositories have Boost 1.65, but 1.66 or higher is required.
# Tests fail to compile w/ Boost 1.66 also:
# https://lists.boost.org/boost-bugs/2018/01/49711.php
before_script:
  - cd cmake
  - >-
    python3 -m project.ci.travis.boost
    --
    --with-filesystem
    --with-program_options
    --with-regex
    --with-test

script:
  - >-
    python3 -m project.ci.travis.cmake
    --install "$HOME/install"
    --
    -D ENABLE_TESTS=ON

  - "$HOME/install/bin/math-server-unit-tests"
  - "$HOME/install/bin/math-server-benchmarks"
  - ../test/stress_test.sh

jobs:
  fast_finish: true

  # Clear irrelevant matrix build settings:
  _clear: &clear
    language: shell
    addons: {apt: {packages: []}}
    before_script: []
    script: []

  _docker: &docker
    <<: *clear
    services: [docker]
    install:
      # GCR & BuildKit don't play nice together, e.g.:
      # https://github.com/moby/buildkit/issues/606
      - echo '{}' | sudo tee /etc/docker/daemon.json
      - sudo systemctl restart docker

  include:
    - <<: *clear
      name: Run clang-format
      if: branch = master
      addons:
        apt:
          packages:
            - clang-format-9
      script: ./cmake/tools/clang-format.py --clang-format clang-format-9

    - <<: *docker
      name: 'Docker: build native images'
      script: make docker/build

    - <<: *docker
      name: 'Docker: build native images using Compose'
      script: make compose/build

    - <<: *docker
      stage: publish
      name: 'Docker: build & publish multi-arch images'
      if: branch = master
      addons:
        apt:
          # Newer docker for BuildKit/buildx support:
          packages:
            - docker-ce
          sources:
            - key_url: 'https://download.docker.com/linux/ubuntu/gpg'
              sourceline: 'deb https://download.docker.com/linux/ubuntu "$(lsb_release -cs)" stable'
      script: make login && make buildx/create && make buildx/push