File tree Expand file tree Collapse file tree 3 files changed +11
-9
lines changed Expand file tree Collapse file tree 3 files changed +11
-9
lines changed Original file line number Diff line number Diff line change 5555 - name : Build macOS
5656 if : runner.os == 'macOS'
5757 run : ./build.libgit2.sh
58- - name : Setup QEMU
59- if : matrix.name == 'linux-musl-arm' || matrix.name == 'linux-musl-arm64'
60- run : docker run --rm --privileged multiarch/qemu-user-static:register --reset
6158 - name : Build Linux
6259 if : runner.os == 'Linux'
6360 run : ./dockerbuild.sh
Original file line number Diff line number Diff line change 1- ARG ARCH='amd64'
2- FROM multiarch/alpine:${ARCH}-v3.13
3- RUN apk add --no-cache bash build-base cmake
1+ FROM --platform=$BUILDPLATFORM tonistiigi/xx AS xx
2+
3+ FROM --platform=$BUILDPLATFORM alpine
4+
5+ RUN apk add cmake clang lld
46
57WORKDIR /nativebinaries
68COPY . /nativebinaries/
79
10+ ARG TARGETPLATFORM
11+ RUN xx-apk musl-dev gcc
12+
813CMD ["/bin/bash", "-c", "./build.libgit2.sh"]
Original file line number Diff line number Diff line change @@ -6,9 +6,9 @@ echo "building for $RID"
66if [[ $RID =~ arm64 ]]; then
77 arch=" arm64"
88elif [[ $RID =~ arm ]]; then
9- arch=" armhf "
9+ arch=" arm/v7 "
1010elif [[ $RID =~ ppc64le ]]; then
11- arch=" powerpc64le "
11+ arch=" ppc64le "
1212else
1313 arch=" amd64"
1414fi
1919 dockerfile=" Dockerfile.linux"
2020fi
2121
22- docker buildx build -t $RID -f $dockerfile --build-arg ARCH= $arch .
22+ docker buildx build -t $RID -f $dockerfile --platform=linux/ $arch .
2323
2424docker run -t -e RID=$RID --name=$RID $RID
2525
You can’t perform that action at this time.
0 commit comments