aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/.travis.yml
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2020-01-28 01:40:01 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2020-01-28 01:57:59 +0300
commit4c5c8d964583080e60c56526c04a9e37a4b7949e (patch)
treed1a4bd70be1781cf0a662157eba9bc89a202c0c5 /.travis.yml
parentREADME: update (diff)
downloadmath-server-4c5c8d964583080e60c56526c04a9e37a4b7949e.tar.gz
math-server-4c5c8d964583080e60c56526c04a9e37a4b7949e.zip
docker: multi-arch builds
Diffstat (limited to '.travis.yml')
-rw-r--r--.travis.yml42
1 files changed, 39 insertions, 3 deletions
diff --git a/.travis.yml b/.travis.yml
index 02d7099..5c0b0c6 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -59,7 +59,32 @@ jobs:
- true
script:
- ./cmake/tools/clang-format.py --clang-format clang-format-9
- - name: Build Docker images
+ - name: Build and publish multi-arch images
+ language: minimal
+ addons:
+ apt:
+ update: true
+ # Newer docker for BuildKit/buildx support:
+ 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
+ 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:
@@ -70,5 +95,16 @@ jobs:
# Clear before_script:
before_script:
- true
- script:
- - docker-compose build
+ 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
+ script: make docker-build