Ver Fonte

Attempt at parallelism

Carl Tashian há 6 anos atrás
pai
commit
998162392b
2 ficheiros alterados com 22 adições e 19 exclusões
  1. 18 13
      .travis.yml
  2. 4 6
      make/docker.mk

+ 18 - 13
.travis.yml

@@ -1,27 +1,32 @@
 language: go
 dist: focal
 services:
-- docker
+  - docker
 go:
-- 1.14.x
+  - 1.14.x
 addons:
   apt:
     packages:
-    - debhelper
-    - fakeroot
-    - bash-completion
-    - libpcsclite-dev
+      - debhelper
+      - fakeroot
+      - bash-completion
+      - libpcsclite-dev
 env:
   global:
-  - V=1
+    - V=1
 before_script:
-- make bootstrap
-script:
-- make
-- make artifacts
+  - make bootstrap
+jobs:
+  include:
+    - script: make lint
+    - script: make test
+    - stage: build
+      script:
+        - make build
+        - make artifacts
 after_success:
-- bash <(curl -s https://codecov.io/bash) -t "$CODECOV_TOKEN" || echo "Codecov did
-  not collect coverage reports"
+  - bash <(curl -s https://codecov.io/bash) -t "$CODECOV_TOKEN" || echo "Codecov did
+    not collect coverage reports"
 notifications:
   email: false
 deploy:

+ 4 - 6
make/docker.mk

@@ -6,9 +6,6 @@
 # binary is copied to a new image that is optimized for size.
 #########################################
 
-# Testing: output images to out/ with -o out, like this:
-# docker buildx build . --progress plain -t step-ca:master  -f docker/Dockerfile --platform linux/amd64,linux/arm/v7,linux/386,linux/arm64 -o out
-
 ifeq (, $(shell which docker))
 	DOCKER_CLIENT_OS := linux
 else
@@ -33,7 +30,7 @@ endif
 
 	# Called directly instead of via `docker buildx` because
 	# Travis runs a pre-19.03 Docker that doesn't support plugin discovery
-	$$HOME/.docker/cli-plugins/docker-buildx create --use --name mybuilder --platform="$(DOCKER_PLATFORMS)" || true
+	docker buildx create --use --name mybuilder --platform="$(DOCKER_PLATFORMS)" || true
 
 .PHONY: docker-prepare
 
@@ -58,11 +55,12 @@ docker-login:
 define DOCKER_BUILDX
 	# $(1) -- Image Tag
 	# $(2) -- Push (empty is no push | --push will push to dockerhub)
-	$$HOME/.docker/cli-plugins/docker-buildx build . --progress plain -t $(DOCKER_IMAGE_NAME):$(1) -f docker/Dockerfile.step-ca --platform="$(DOCKER_PLATFORMS)" $(2)
+	docker buildx build . --progress plain -t $(DOCKER_IMAGE_NAME):$(1) -f docker/Dockerfile.step-ca --platform="$(DOCKER_PLATFORMS)" $(2)
 endef
 
 # For non-master builds don't build the docker containers.
-docker-branch:
+docker-branch: docker-prepare
+	$(call DOCKER_BUILDX,$(VERSION),)
 
 # For master builds don't build the docker containers.
 docker-master: