Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
bording committed Nov 23, 2024
1 parent ad7caf7 commit a68443d
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,6 @@ jobs:
- name: Build macOS
if: runner.os == 'macOS'
run: ./build.libgit2.sh
- name: Setup QEMU
if: matrix.name == 'linux-musl-arm' || matrix.name == 'linux-musl-arm64'
run: docker run --rm --privileged multiarch/qemu-user-static:register --reset
- name: Build Linux
if: runner.os == 'Linux'
run: ./dockerbuild.sh
Expand Down
11 changes: 8 additions & 3 deletions Dockerfile.linux-musl
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
ARG ARCH='amd64'
FROM multiarch/alpine:${ARCH}-v3.13
RUN apk add --no-cache bash build-base cmake
FROM --platform=$BUILDPLATFORM tonistiigi/xx AS xx

FROM --platform=$BUILDPLATFORM alpine

RUN apk add cmake clang lld

WORKDIR /nativebinaries
COPY . /nativebinaries/

ARG TARGETPLATFORM
RUN xx-apk musl-dev gcc

CMD ["/bin/bash", "-c", "./build.libgit2.sh"]
6 changes: 3 additions & 3 deletions dockerbuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ echo "building for $RID"
if [[ $RID =~ arm64 ]]; then
arch="arm64"
elif [[ $RID =~ arm ]]; then
arch="armhf"
arch="arm/v7"
elif [[ $RID =~ ppc64le ]]; then
arch="powerpc64le"
arch="ppc64le"
else
arch="amd64"
fi
Expand All @@ -19,7 +19,7 @@ else
dockerfile="Dockerfile.linux"
fi

docker buildx build -t $RID -f $dockerfile --build-arg ARCH=$arch .
docker buildx build -t $RID -f $dockerfile --platform=linux/$arch .

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

Expand Down

0 comments on commit a68443d

Please sign in to comment.