Skip to content

Commit f17330e

Browse files
committed
compile for arm64
Signed-off-by: Boris Glimcher <[email protected]>
1 parent 1575bbb commit f17330e

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

.github/workflows/docker-publish.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,7 @@ jobs:
5252
uses: docker/[email protected]
5353
with:
5454
context: .
55-
#platforms: linux/amd64,linux/arm64
56-
platforms: linux/amd64
55+
platforms: linux/amd64,linux/arm64
5756
push: ${{ github.event_name != 'pull_request' }}
5857
tags: ${{ steps.meta.outputs.tags }}
5958
labels: ${{ steps.meta.outputs.labels }}

Dockerfile

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@
44
FROM docker.io/library/fedora:37 as build
55

66
ARG TAG=v23.01
7-
# Pick an arch that has at least sse 4.2 but does not require newer avx
8-
# See https://gcc.gnu.org/onlinedocs/gcc/x86-Options.html
9-
ARG ARCH=x86-64-v2
107

118
WORKDIR /root
129
RUN dnf install -y git rpm-build diffutils procps-ng pip python3-grpcio python3-grpcio-tools && dnf clean all
@@ -15,8 +12,16 @@ RUN dnf install -y git rpm-build diffutils procps-ng pip python3-grpcio python3-
1512
RUN git clone https://github.com/spdk/spdk --branch ${TAG} --depth 1 && \
1613
cd spdk && git submodule update --init --depth 1 && scripts/pkgdep.sh --rdma
1714

15+
# Pick an arch that has at least sse 4.2 but does not require newer avx
16+
# See https://gcc.gnu.org/onlinedocs/gcc/x86-Options.html
17+
1818
# hadolint ignore=DL3003
19-
RUN cd spdk && DEPS="no" LDFLAGS=" " ./rpmbuild/rpm.sh --target-arch=${ARCH} --without-uring --with-crypto \
19+
RUN if [ "$(uname -m)" = "aarch64" ]; then \
20+
ARCH="generic"; \
21+
elif [ "$(uname -m)" = "x86_64" ]; then \
22+
ARCH="x86-64-v2"; \
23+
fi; \
24+
cd spdk && DEPS="no" LDFLAGS=" " ./rpmbuild/rpm.sh --target-arch=${ARCH} --without-uring --with-crypto \
2025
--without-fio --with-raid5f --with-vhost --without-pmdk --without-rbd \
2126
--with-rdma --without-shared --with-iscsi-initiator --without-vtune --with-vfio-user
2227

0 commit comments

Comments
 (0)