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: travis_boost_version=1.71.0 jobs: - configuration=Debug platform=x86 - configuration=Release platform=x86 - configuration=Debug platform=x64 - configuration=Release platform=x64 before_script: - >- ./cmake/boost/build/ci/travis.py --link static -- --with-filesystem --with-program_options --with-regex --with-test script: - >- ./cmake/cmake/build/ci/travis.py --install "$HOME/install" -- -D "CMAKE_TOOLCHAIN_FILE=cmake/cmake/toolchains/gcc-$platform.cmake" -D "BOOST_ROOT=$HOME/boost_1_71_0" -D "BOOST_LIBRARYDIR=$HOME/boost_1_71_0/stage/$platform/$configuration/lib" -D ENABLE_TESTS=ON - "$HOME/install/bin/math-server-unit-tests" - "$HOME/install/bin/math-server-benchmarks" jobs: fast_finish: true # Clear irrelevant matrix build settings: _clear: &clear addons: {apt: {packages: []}} before_script: [] script: [] include: - <<: *clear name: Run clang-format if: branch = master language: shell addons: apt: packages: - clang-format-9 sources: - sourceline: 'deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-9 main' key_url: 'https://apt.llvm.org/llvm-snapshot.gpg.key' script: ./cmake/tools/clang-format.py --clang-format clang-format-9 - &docker <<: *clear stage: deploy name: 'Docker: build native images' language: shell services: [docker] script: make docker/build - <<: *docker name: 'Docker: build native images using Compose' script: make compose/build - &buildx <<: *clear stage: deploy name: 'Docker: build multi-arch images' if: branch != master language: shell 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' 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 script: make buildx/create && make buildx/build - <<: *buildx name: 'Docker: build & publish multi-arch images' if: branch = master script: make login && make buildx/create && make buildx/push