Skip to content
This repository was archived by the owner on Dec 16, 2022. It is now read-only.

Make 'USE_BUNDLED_ZLIB' configurable and revert git2go and libgit2 versions #8

Merged
merged 5 commits into from
Dec 15, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .dockerignore

This file was deleted.

4 changes: 3 additions & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,9 @@ jobs:
- 5000:5000
steps:
- name: Checkout
id: checkout
uses: actions/checkout@v2
- name: Unshallow
run: git fetch --prune --unshallow
- name: Set up QEMU
id: qemu
uses: docker/setup-qemu-action@v1
Expand Down Expand Up @@ -54,6 +55,7 @@ jobs:
key: ${{ runner.os }}-buildx-ghcache-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-ghcache-
- run: cat ./hack/Makefile
- name: Build candidate image
id: build_candidate
uses: docker/build-push-action@v2
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
FROM scratch

COPY hack/Makefile Makefile
COPY ./hack/Makefile Makefile
4 changes: 2 additions & 2 deletions Dockerfile.test
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This Dockerfile tests the hack/Makefile output against git2go.
ARG BASE_VARIANT=bullseye
ARG GO_VERSION=1.16.8
ARG GO_VERSION=1.17.5
ARG XX_VERSION=1.0.0-rc.2

FROM --platform=$BUILDPLATFORM tonistiigi/xx:${XX_VERSION} AS xx
Expand All @@ -12,7 +12,7 @@ FROM gostable AS go-linux
FROM go-${TARGETOS} AS build-base-bullseye

COPY --from=xx / /
COPY hack/Makefile /libgit2/Makefile
COPY ./hack/Makefile /libgit2/Makefile

RUN make -C /libgit2/ cmake

Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ STATIC_TEST_TAG := test
PLATFORMS ?= linux/amd64,linux/arm/v7,linux/arm64
BUILD_ARGS ?=

GIT2GO_TAG ?= v33.0.1
GIT2GO_TAG ?= v31.6.1

.PHONY: build
build:
Expand Down
8 changes: 4 additions & 4 deletions hack/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,16 @@ INSTALL_LIBDIR ?= $(INSTALL_PREFIX)/lib/$(shell xx-info triple)
endif
BUILD_TYPE ?= "RelWithDebInfo"
FLAGS ?=
USE_HTTPS ?= OFF
USE_SSH ?= OFF
USE_HTTPS ?= OpenSSL
USE_SSH ?= ON
USE_BUNDLED_ZLIB ?= OFF
BUILD_SHARED_LIBS ?= ON

# Cmake version to be installed.
CMAKE_VERSION ?= 3.21.3

# Libgit2 version to be compiled and installed.
LIBGIT2_VERSION ?= 1.3.0
LIBGIT2_VERSION ?= 1.1.1
# In some scenarios libgit2 needs to be checked out to a specific commit.
# This takes presidence over LIBGIT_VERSION if defined.
# Ref: https://github.com/libgit2/git2go/issues/834
Expand Down Expand Up @@ -127,7 +127,7 @@ $(LIBGIT2):
-DBUILD_CLAR:BOOL:BOOL=OFF \
-DTHREADSAFE:BOOL=ON \
-DBUILD_SHARED_LIBS:BOOL=$(BUILD_SHARED_LIBS) \
-DUSE_BUNDLED_ZLIB:BOOL=OFF \
-DUSE_BUNDLED_ZLIB:BOOL=$(USE_BUNDLED_ZLIB) \
-DUSE_HTTP_PARSER:STRING=builtin \
-DREGEX_BACKEND:STRING=builtin \
-DUSE_HTTPS:STRING=$(USE_HTTPS) \
Expand Down