Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide builds for linux/arm/v7 #1377

Merged
merged 2 commits into from
Nov 8, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
ARG VERSION
ARG COMMIT
ARG RACEFLAG

FROM golang:1.19.3 AS build

WORKDIR /src
ADD . .
ENV CGO_ENABLED=1
ENV GORACE=halt_on_error=1,history_size=2

# split into several commands for better logging on GitHub Actions
RUN go mod download
RUN go build -v -o=bin/ferretdb -trimpath -tags=ferretdb_testcover,ferretdb_tigris -race ./cmd/ferretdb
RUN go test -c -o=bin/ferretdb -trimpath -tags=ferretdb_testcover,ferretdb_tigris -race -coverpkg=./... ./cmd/ferretdb
RUN go build -v -o=bin/ferretdb -trimpath -tags=ferretdb_testcover,ferretdb_tigris ${RACEFLAG} ./cmd/ferretdb
RUN go test -c -o=bin/ferretdb -trimpath -tags=ferretdb_testcover,ferretdb_tigris ${RACEFLAG} -coverpkg=./... ./cmd/ferretdb

FROM golang:1.19.3

Expand Down
6 changes: 4 additions & 2 deletions Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ vars:
BENCHTIME: 5s
FUZZTIME: 15s
FUZZCORPUS: ../fuzz-corpus
RACEFLAG: -race={{ne OS "windows"}}
RACEFLAG: -race={{and (ne OS "windows") (ne ARCH "arm")}}
BUILDTAGS: ferretdb_tigris

tasks:
Expand Down Expand Up @@ -329,6 +329,7 @@ tasks:
docker buildx build --builder=ferretdb
--build-arg VERSION={{.VERSION}}
--build-arg COMMIT={{.COMMIT}}
--build-arg RACEFLAG={{.RACEFLAG}}
--tag=ferretdb-local
--load .
vars:
Expand All @@ -345,7 +346,8 @@ tasks:
docker buildx build --builder=ferretdb
--build-arg VERSION={{.VERSION}}
--build-arg COMMIT={{.COMMIT}}
--platform=linux/arm64,linux/amd64
--build-arg RACEFLAG={{.RACEFLAG}}
--platform=linux/arm/v7,linux/arm64,linux/amd64
--tag={{.DOCKER_IMAGE}}
--push .
vars:
Expand Down