Skip to content

Commit a68443d

Browse files
committed
WIP
1 parent ad7caf7 commit a68443d

File tree

3 files changed

+11
-9
lines changed

3 files changed

+11
-9
lines changed

.github/workflows/ci.yml

-3
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,6 @@ jobs:
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

Dockerfile.linux-musl

+8-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
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

57
WORKDIR /nativebinaries
68
COPY . /nativebinaries/
79

10+
ARG TARGETPLATFORM
11+
RUN xx-apk musl-dev gcc
12+
813
CMD ["/bin/bash", "-c", "./build.libgit2.sh"]

dockerbuild.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ echo "building for $RID"
66
if [[ $RID =~ arm64 ]]; then
77
arch="arm64"
88
elif [[ $RID =~ arm ]]; then
9-
arch="armhf"
9+
arch="arm/v7"
1010
elif [[ $RID =~ ppc64le ]]; then
11-
arch="powerpc64le"
11+
arch="ppc64le"
1212
else
1313
arch="amd64"
1414
fi
@@ -19,7 +19,7 @@ else
1919
dockerfile="Dockerfile.linux"
2020
fi
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

2424
docker run -t -e RID=$RID --name=$RID $RID
2525

0 commit comments

Comments
 (0)