From 3e3bd05c7980d75f0fe3dfc263b2d1b9de9a9a6e Mon Sep 17 00:00:00 2001 From: Quentin McGaw Date: Sat, 2 Jan 2021 23:46:30 +0000 Subject: [PATCH] CI: Only test and lint on amd64 builds --- Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 3ffcc2d3..df5fe16c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,7 +5,7 @@ FROM golang:${GO_VERSION}-alpine${ALPINE_VERSION} AS builder RUN apk --update add git ENV CGO_ENABLED=0 ARG GOLANGCI_LINT_VERSION=v1.34.1 -RUN wget -O- -nv https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s ${GOLANGCI_LINT_VERSION} +RUN [ "$(uname -m)" != "x86_64" ] || wget -O- -nv https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s ${GOLANGCI_LINT_VERSION} WORKDIR /tmp/gobuild COPY .golangci.yml . COPY go.mod go.sum ./ @@ -15,8 +15,8 @@ ARG BUILD_DATE="an unknown date" ARG COMMIT=unknown COPY cmd/gluetun/main.go . COPY internal/ ./internal/ -RUN go test ./... -RUN golangci-lint run --timeout=10m +RUN [ "$(uname -m)" != "x86_64" ] || go test ./... +RUN [ "$(uname -m)" != "x86_64" ] || golangci-lint run --timeout=10m RUN go build -trimpath -ldflags="-s -w \ -X 'main.version=$VERSION' \ -X 'main.buildDate=$BUILD_DATE' \