aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/.travis.yml
blob: 658d9124413d2f3ac6c2cbf345dd93f7c3bdccef (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
language: cpp
os: linux
dist: focal

addons:
  apt:
    packages:
      - libboost-filesystem-dev
      - libboost-program-options-dev
      - libboost-regex-dev
      - libboost-test-dev

env:
  jobs:
    #- configuration=Debug   platform=x86
    #- configuration=Release platform=x86
    - configuration=Debug   platform=x64
    - configuration=Release platform=x64

script:
  - cd cmake
  - >-
    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: &clear
    language: minimal
    addons: {apt: {packages: []}}
    script: []

  _docker: &docker
    <<: *clear
    services: [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
      # buildx isn't installed on Focal.
      before_install: make buildx/install
      script: make login && make buildx/create && make buildx/push