Skip to content

Commit

Permalink
Tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
bording committed Nov 23, 2024
1 parent d5926f0 commit f5836b9
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 17 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@ jobs:
name: linux-arm
- os: ubuntu-24.04
name: linux-ppc64le
- os: ubuntu-24.04
name: linux-musl-ppc64le
- os: macos-13
name: osx-x64
- os: macos-13
Expand Down
5 changes: 2 additions & 3 deletions Dockerfile.linux
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
FROM bording/crossbuild
ARG ARCH='amd64'
ARG CC_ARCH='amd64'
ENV CROSS_TRIPLE=${CC_ARCH}
ENV CROSS_TRIPLE=${ARCH}
RUN apt update && apt -y install pkg-config

WORKDIR /nativebinaries
COPY . /nativebinaries/

CMD ["/bin/bash", "-c", "./build.libgit2.sh"]
CMD ["/bin/bash", "-c", "./build.libgit2.sh"]
2 changes: 1 addition & 1 deletion Dockerfile.linux-musl
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ RUN apk add --no-cache bash build-base cmake
WORKDIR /nativebinaries
COPY . /nativebinaries/

CMD ["/bin/bash", "-c", "./build.libgit2.sh"]
CMD ["/bin/bash", "-c", "./build.libgit2.sh"]
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ the following platforms:

- Windows (x86, x64, arm64)
- macOS (x64, arm64)
- Linux (x64, arm, arm64, ppc64le) for both musl and glibc
- Linux
- glibc: (x64, arm, arm64, ppc64le)
- musl: (x64, arm, arm64)

[lg2s-nb]: https://www.nuget.org/packages/LibGit2Sharp.NativeBinaries
[lg2]: https://libgit2.github.com/
Expand Down
13 changes: 3 additions & 10 deletions dockerbuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,12 @@ echo "building for $RID"

if [[ $RID =~ arm64 ]]; then
arch="arm64"
cc_arch="arm64"
elif [[ $RID =~ arm ]]; then
arch="armhf"
cc_arch="armhf"
elif [[ $RID == linux-ppc64le ]]; then
arch="ppc64le"
cc_arch="powerpc64le"
elif [[ $RID == linux-musl-ppc64le ]]; then
arch="ppc64le"
cc_arch="ppc64le"
elif [[ $RID =~ ppc64le ]]; then
arch="powerpc64le"
else
arch="amd64"
cc_arch="amd64"
fi

if [[ $RID == linux-musl* ]]; then
Expand All @@ -26,7 +19,7 @@ else
dockerfile="Dockerfile.linux"
fi

docker buildx build -t $RID -f $dockerfile --build-arg ARCH=$arch --build-arg CC_ARCH=$cc_arch .
docker buildx build -t $RID -f $dockerfile --build-arg ARCH=$arch

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

Expand Down

0 comments on commit f5836b9

Please sign in to comment.