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

allow linux/arm64* builds #766

Merged
merged 3 commits into from
Aug 28, 2024
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
1 change: 1 addition & 0 deletions build/egress/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ ENV TARGETPLATFORM=${TARGETPLATFORM}
WORKDIR /workspace

# install go

RUN wget https://go.dev/dl/go1.22.1.linux-${TARGETARCH}.tar.gz && \
rm -rf /usr/local/go && \
tar -C /usr/local -xzf go1.22.1.linux-${TARGETARCH}.tar.gz
Expand Down
10 changes: 5 additions & 5 deletions build/test/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ WORKDIR /workspace
ARG TARGETPLATFORM

# install go
RUN if [ "$TARGETPLATFORM" = "linux/arm64" ]; then GOARCH=arm64; else GOARCH=amd64; fi && \
RUN if [[ "$TARGETPLATFORM" == linux/arm64* ]]; then GOARCH=arm64; else GOARCH=amd64; fi && \
wget https://go.dev/dl/go1.22.1.linux-${GOARCH}.tar.gz && \
rm -rf /usr/local/go && \
tar -C /usr/local -xzf go1.22.1.linux-${GOARCH}.tar.gz
Expand All @@ -41,10 +41,10 @@ COPY --from=livekit/egress-templates workspace/build/ cmd/server/templates/
COPY --from=livekit/egress-templates workspace/build/ test/templates/

# build (service tests will need to launch the handler)
RUN if [ "$TARGETPLATFORM" = "linux/arm64" ]; then GOARCH=arm64; else GOARCH=amd64; fi && \
RUN if [[ "$TARGETPLATFORM" == linux/arm64* ]]; then GOARCH=arm64; else GOARCH=amd64; fi && \
CGO_ENABLED=1 GOOS=linux GOARCH=${GOARCH} GO111MODULE=on GODEBUG=disablethp=1 go build -a -o egress ./cmd/server

RUN if [ "$TARGETPLATFORM" = "linux/arm64" ]; then GOARCH=arm64; else GOARCH=amd64; fi && \
RUN if [[ "$TARGETPLATFORM" == linux/arm64* ]]; then GOARCH=arm64; else GOARCH=amd64; fi && \
CGO_ENABLED=1 GOOS=linux GOARCH=${GOARCH} GO111MODULE=on go test -c -v -race --tags=integration ./test


Expand All @@ -66,7 +66,7 @@ RUN apt-get update && \
gstreamer1.0-plugins-base-

# install go
RUN if [ "$TARGETPLATFORM" = "linux/arm64" ]; then GOARCH=arm64; else GOARCH=amd64; fi && \
RUN if [[ "$TARGETPLATFORM" == linux/arm64* ]]; then GOARCH=arm64; else GOARCH=amd64; fi && \
wget https://go.dev/dl/go1.22.1.linux-${GOARCH}.tar.gz && \
rm -rf /usr/local/go && \
tar -C /usr/local -xzf go1.22.1.linux-${GOARCH}.tar.gz
Expand All @@ -80,7 +80,7 @@ RUN /chrome-installer/install-chrome "$TARGETPLATFORM"
RUN rm -rf /var/lib/apt/lists/*

# install rtsp server
RUN if [ "$TARGETPLATFORM" = "linux/arm64" ]; then ARCH=arm64v8; else ARCH=amd64; fi && \
RUN if [[ "$TARGETPLATFORM" == linux/arm64* ]]; then ARCH=arm64v8; else ARCH=amd64; fi && \
wget https://github.com/bluenviron/mediamtx/releases/download/v1.8.1/mediamtx_v1.8.1_linux_${ARCH}.tar.gz && \
tar -zxvf mediamtx_v1.8.1_linux_${ARCH}.tar.gz && \
rm mediamtx_v1.8.1_linux_${ARCH}.tar.gz && \
Expand Down
Loading