Skip to content

Commit 18bf999

Browse files
authored
Build native libs for linux-musl-arm and linux-musl-arm64 (#133)
1 parent 8250287 commit 18bf999

12 files changed

+41
-59
lines changed

.github/workflows/ci.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@ jobs:
3131
name: linux-musl-x64
3232
- os: ubuntu-20.04
3333
name: linux-arm64
34+
- os: ubuntu-20.04
35+
name: linux-musl-arm
36+
- os: ubuntu-20.04
37+
name: linux-musl-arm64
3438
- os: ubuntu-20.04
3539
name: linux-arm
3640
- os: macos-10.15
@@ -49,6 +53,9 @@ jobs:
4953
- name: Build macOS
5054
if: runner.os == 'macOS'
5155
run: ./build.libgit2.sh
56+
- name: Setup QEMU
57+
run: docker run --rm --privileged multiarch/qemu-user-static:register --reset
58+
if: matrix.name == 'linux-musl-arm' || matrix.name == 'linux-musl-arm64'
5259
- name: Build Linux
5360
if: runner.os == 'Linux'
5461
run: ./dockerbuild.sh

CMakeLists.arm.txt

Lines changed: 0 additions & 6 deletions
This file was deleted.

CMakeLists.arm64.txt

Lines changed: 0 additions & 6 deletions
This file was deleted.

Dockerfile.linux

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
FROM multiarch/crossbuild
2+
ARG ARCH='amd64'
3+
ENV CROSS_TRIPLE=${ARCH}
4+
RUN apt update && apt -y install pkg-config
5+
6+
WORKDIR /nativebinaries
7+
COPY . /nativebinaries/
8+
9+
CMD ["/bin/bash", "-c", "./build.libgit2.sh"]

Dockerfile.linux-arm

Lines changed: 0 additions & 9 deletions
This file was deleted.

Dockerfile.linux-arm64

Lines changed: 0 additions & 9 deletions
This file was deleted.

Dockerfile.linux-musl

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
ARG ARCH='amd64'
2+
FROM multiarch/alpine:${ARCH}-v3.12
3+
RUN apk add --no-cache bash build-base cmake
4+
5+
WORKDIR /nativebinaries
6+
COPY . /nativebinaries/
7+
8+
CMD ["/bin/bash", "-c", "./build.libgit2.sh"]

Dockerfile.linux-musl-x64

Lines changed: 0 additions & 7 deletions
This file was deleted.

Dockerfile.linux-x64

Lines changed: 0 additions & 9 deletions
This file was deleted.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ the following platforms:
1111

1212
- Windows (x86, x64, arm64)
1313
- macOS (x64, arm64)
14-
- Linux (arm, arm64, x64)
14+
- Linux (arm, arm64, x64, musl-x64, linux-musl-arm, linux-musl-arm64)
1515

1616
[lg2s-nb]: https://www.nuget.org/packages/LibGit2Sharp.NativeBinaries
1717
[lg2]: https://libgit2.github.com/

0 commit comments

Comments
 (0)