Skip to content

Commit

Permalink
try cross-compile taiko-client
Browse files Browse the repository at this point in the history
  • Loading branch information
mask-pp committed Sep 25, 2024
1 parent 9dbad24 commit a3551d4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/taiko-client--docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: "Push docker image to GAR"

on:
push:
branches: [main]
branches: [taiko_client_docker_]
tags:
- "taiko-client-v*"
paths:
Expand Down
8 changes: 4 additions & 4 deletions packages/taiko-client/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
FROM --platform=$BUILDPLATFORM golang:1.21 AS builder
FROM --platform=$BUILDPLATFORM golang:1.21-alpine AS builder
ARG TARGETOS
ARG TARGETARCH

RUN apt-get update && apt-get install -y git make g++-x86-64-linux-gnu libc6-dev-amd64-cross
RUN apk update && apk add --no-cache --update gcc musl-dev linux-headers git make build-base

WORKDIR /build

Expand All @@ -13,9 +13,9 @@ COPY packages/taiko-client/ packages/taiko-client/
WORKDIR /build/packages/taiko-client
RUN echo "TARGETOS=${TARGETOS}, TARGETARCH=${TARGETARCH}" && \
if [ "$TARGETARCH" = "amd64" ]; then \
CGO_ENABLED=1 CC=x86_64-linux-gnu-gcc GOOS=${TARGETOS} GOARCH=${TARGETARCH} make build; \
GOOS=${TARGETOS} GOARCH=${TARGETARCH} make build; \
else \
make build; \
GOOS=linux GOARCH=amd64 make build; \
fi

FROM alpine:latest
Expand Down

0 comments on commit a3551d4

Please sign in to comment.