From a365fb3ede8479bc9df9d78b31211650b854a6e2 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Tue, 28 Jan 2020 14:31:10 +0300 Subject: Travis: lint the config --- .travis.yml | 59 +++++++++++++++++++++++------------------------------------ 1 file 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 -- cgit v1.2.3