File tree Expand file tree Collapse file tree 3 files changed +22
-3
lines changed
.github/actions/run-tests Expand file tree Collapse file tree 3 files changed +22
-3
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ FROM golang:1.15-alpine
22
33# Add any build or testing essential system packages
44RUN apk add --no-cache build-base git pkgconf
5- RUN apk add --no-cache --repository http://dl-cdn.alpinelinux.org/alpine/edge/community libgit2-dev=1.1.0-r1
5+ RUN apk add --no-cache --repository http://dl-cdn.alpinelinux.org/alpine/edge/community libgit2-dev~ =1.1.0
66
77# Use the GitHub Actions uid:gid combination for proper fs permissions
88RUN addgroup -g 116 -S test && adduser -u 1001 -S -g test test
Original file line number Diff line number Diff line change @@ -43,6 +43,25 @@ brew install libgit2
4343pacman -S libgit2
4444```
4545
46+ ** Building from source**
47+
48+ 1 . Ensure [ ` cmake ` ] ( https://cmake.org ) is available on your system.
49+ 1 . Download and unarchive [ the right ` libgit2 ` version] ( https://github.com/libgit2/git2go#which-go-version-to-use )
50+ for our current ` git2go ` dependency:
51+
52+ ``` console
53+ $ LIBGIT2_VER=1.1.0
54+ $ curl -L https://github.com/libgit2/libgit2/releases/download/v$LIBGIT2_VER/libgit2-$LIBGIT2_VER.tar.gz -o /tmp/libgit2.tar.gz
55+ $ tar -xvf /tmp/libgit2.tar.gz -C /tmp/libgit2-$LIBGIT2_VER
56+ ```
57+ 1 . Build and install the library on your system:
58+
59+ ``` console
60+ $ mkdir /tmp/libgit2-$LIBGIT2_VER/build && cd /tmp/libgit2-$LIBGIT2_VER/build
61+ $ cmake .. -DCMAKE_INSTALL_PREFIX=/usr
62+ $ sudo cmake --build . --target install
63+ ```
64+
4665### How to run the test suite
4766
4867You can run the unit tests by simply doing
Original file line number Diff line number Diff line change 22FROM golang:1.15-alpine as builder
33
44RUN apk add gcc pkgconfig libc-dev
5- RUN apk add --no-cache --repository http://dl-cdn.alpinelinux.org/alpine/edge/community libgit2-dev=1.1.0-r1
5+ RUN apk add --no-cache --repository http://dl-cdn.alpinelinux.org/alpine/edge/community libgit2-dev~ =1.1.0
66
77WORKDIR /workspace
88
@@ -31,7 +31,7 @@ FROM alpine:3.12
3131LABEL org.opencontainers.image.source="https://github.com/fluxcd/source-controller"
3232
3333RUN apk add --no-cache ca-certificates tini
34- RUN apk add --no-cache --repository http://dl-cdn.alpinelinux.org/alpine/edge/community libgit2=1.1.0-r1
34+ RUN apk add --no-cache --repository http://dl-cdn.alpinelinux.org/alpine/edge/community libgit2-dev~ =1.1.0
3535
3636COPY --from=builder /workspace/source-controller /usr/local/bin/
3737
You can’t perform that action at this time.
0 commit comments