diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 00000000..58402b1c --- /dev/null +++ b/.travis.yml @@ -0,0 +1,15 @@ +dist: trusty +sudo: required + +install: + - docker run --name buildkit --rm -d --privileged -p 1234:1234 $REPO_SLUG_ORIGIN --addr tcp://0.0.0.0:1234 + - sudo docker cp buildkit:/usr/bin/buildctl /usr/bin/ + - export BUILDKIT_HOST=tcp://0.0.0.0:1234 + +env: + global: + - PLATFORMS="linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/s390x,linux/ppc64le" + - PREFER_BUILDCTL="1" + +script: + - make binaries validate-all && TARGETPLATFORM="${PLATFORMS},darwin/amd64,windows/amd64" ./hack/cross diff --git a/Dockerfile b/Dockerfile index 7d890676..e7e339a5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,7 +10,7 @@ FROM --platform=$BUILDPLATFORM tonistiigi/xx:golang@sha256:6f7d999551dd471b58f70 FROM --platform=$BUILDPLATFORM golang:1.12-alpine AS gobase COPY --from=xgo / / -RUN apk add --no-cache file +RUN apk add --no-cache file git ENV GOFLAGS=-mod=vendor WORKDIR /src diff --git a/Makefile b/Makefile index a7751d3f..0992683e 100644 --- a/Makefile +++ b/Makefile @@ -14,7 +14,12 @@ install: binaries lint: ./hack/lint +validate-vendor: + ./hack/validate-vendor + +validate-all: lint validate-vendor + vendor: ./hack/update-vendor -.PHONY: vendor lint shell binaries install \ No newline at end of file +.PHONY: vendor lint shell binaries install binaries-cross validate-all \ No newline at end of file diff --git a/hack/dockerfiles/lint.Dockerfile b/hack/dockerfiles/lint.Dockerfile index 9e2bd3e2..73e6d384 100644 --- a/hack/dockerfiles/lint.Dockerfile +++ b/hack/dockerfiles/lint.Dockerfile @@ -5,6 +5,6 @@ RUN apk add --no-cache git RUN go get -u gopkg.in/alecthomas/gometalinter.v1 \ && mv /go/bin/gometalinter.v1 /go/bin/gometalinter \ && gometalinter --install -WORKDIR /go/src/github.com/moby/buildkit +WORKDIR /go/src/github.com/tonistiigi/buildx RUN --mount=target=/go/src/github.com/tonistiigi/buildx \ gometalinter --config=gometalinter.json ./...