diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2020-01-30 23:27:45 +0300 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2020-01-30 23:39:17 +0300 |
commit | f3c259e966cbf0e4e317606a5f6ed2ed171c0d86 (patch) | |
tree | b3bbfe2578bedbe6025def62d0240d60d4225669 /.travis.yml | |
parent | AppVeyor: leaner config (diff) | |
download | math-server-f3c259e966cbf0e4e317606a5f6ed2ed171c0d86.tar.gz math-server-f3c259e966cbf0e4e317606a5f6ed2ed171c0d86.zip |
Travis: build multi-arch images only on master
They take a _really_ long time, for reasons unclear.
Diffstat (limited to '')
-rw-r--r-- | .travis.yml | 35 |
1 files changed, 14 insertions, 21 deletions
diff --git a/.travis.yml b/.travis.yml index 940a158..2b1cb1d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -46,15 +46,24 @@ jobs: # 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 - language: shell addons: apt: packages: @@ -64,24 +73,18 @@ jobs: 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 + - <<: *docker 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 + - <<: *docker stage: deploy - name: 'Docker: build multi-arch images' - if: branch != master - language: shell + name: 'Docker: build & publish multi-arch images' + if: branch = master addons: apt: # Newer docker for BuildKit/buildx support: @@ -90,14 +93,4 @@ jobs: 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 |