aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/.travis.yml
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2020-01-28 14:31:10 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2020-01-28 14:31:10 +0300
commita365fb3ede8479bc9df9d78b31211650b854a6e2 (patch)
tree1023e5c6573f0e0bbff39629185db0425fd06cd9 /.travis.yml
parentREADME: update badges (diff)
downloadmath-server-a365fb3ede8479bc9df9d78b31211650b854a6e2.tar.gz
math-server-a365fb3ede8479bc9df9d78b31211650b854a6e2.zip
Travis: lint the config
Diffstat (limited to '.travis.yml')
-rw-r--r--.travis.yml59
1 files changed, 23 insertions, 36 deletions
diff --git a/.travis.yml b/.travis.yml
index 5c0b0c6..68bd509 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -43,68 +43,55 @@ script:
jobs:
fast_finish: true
+
include:
- name: Run clang-format
if: branch = master
+ language: shell
addons:
apt:
- update: true
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'
- # Clear before_script:
- before_script:
- - true
- script:
- - ./cmake/tools/clang-format.py --clang-format clang-format-9
- - name: Build and publish multi-arch images
- language: minimal
+ before_script: {}
+ script: ./cmake/tools/clang-format.py --clang-format clang-format-9
+
+ - stage: Docker
+ name: 'Docker: build (and publish) multi-arch images'
+ language: shell
addons:
apt:
- update: true
# 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'
- packages:
- - docker-ce
install:
# GCR & BuildKit don't work together, e.g.:
# https://github.com/moby/buildkit/issues/606
- echo '{}' | sudo tee /etc/docker/daemon.json
- sudo systemctl restart docker
- # Clear before_script:
- before_script:
- - true
+ before_script: []
script: |-
if [ "$TRAVIS_BRANCH" = master ]; then
make login && make builder/create && make push
else
make builder/create && make buildx
fi
- - name: Build native images using Compose
- language: minimal
- # Don't install the unnecessary dependencies:
- addons:
- apt:
- update: false
- services:
- - docker
- # Clear before_script:
- before_script:
- - true
+
+ - name: 'Docker: build native images using Compose'
+ language: shell
+ addons: {apt: {packages: []}}
+ before_script: []
+ services: [docker]
script: make compose-build
- - name: Build native images using Docker
- language: minimal
- # Don't install the unnecessary dependencies:
- addons:
- apt:
- update: false
- services:
- - docker
- # Clear before_script:
- before_script:
- - true
+
+ - name: 'Docker: build native images'
+ language: shell
+ addons: {apt: {packages: []}}
+ before_script: []
+ services: [docker]
script: make docker-build