Skip to content
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
6 changes: 4 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,9 @@ jobs:
strategy:
fail-fast: false
matrix:
libgit2: [ '1.1.0' ]
libgit2:
- 'v1.1.0'
- 'v1.2.0'
name: Go (system-wide, dynamic)

runs-on: ubuntu-20.04
Expand All @@ -78,7 +80,7 @@ jobs:
run: |
git submodule update --init
sudo apt-get install -y --no-install-recommends libssh2-1-dev
sudo env BUILD_LIBGIT_REF=v${{ matrix.libgit2 }} ./script/build-libgit2.sh --dynamic --system
sudo env BUILD_LIBGIT_REF=${{ matrix.libgit2 }} ./script/build-libgit2.sh --dynamic --system
- name: Test
run: make TEST_ARGS=-test.v test

Expand Down
4 changes: 2 additions & 2 deletions Build_bundled_static.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ package git
#cgo CFLAGS: -DLIBGIT2_STATIC
#include <git2.h>

#if LIBGIT2_VER_MAJOR != 1 || LIBGIT2_VER_MINOR < 1 || LIBGIT2_VER_MINOR > 1
# error "Invalid libgit2 version; this git2go supports libgit2 between v1.1.0 and v1.1.0"
#if LIBGIT2_VER_MAJOR != 1 || LIBGIT2_VER_MINOR < 1 || LIBGIT2_VER_MINOR > 2
# error "Invalid libgit2 version; this git2go supports libgit2 between v1.1.0 and v1.2.0"
#endif
*/
import "C"
4 changes: 2 additions & 2 deletions Build_system_dynamic.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ package git
#cgo CFLAGS: -DLIBGIT2_DYNAMIC
#include <git2.h>

#if LIBGIT2_VER_MAJOR != 1 || LIBGIT2_VER_MINOR < 1 || LIBGIT2_VER_MINOR > 1
# error "Invalid libgit2 version; this git2go supports libgit2 between v1.1.0 and v1.1.0"
#if LIBGIT2_VER_MAJOR != 1 || LIBGIT2_VER_MINOR < 1 || LIBGIT2_VER_MINOR > 2
# error "Invalid libgit2 version; this git2go supports libgit2 between v1.1.0 and v1.2.0"
#endif
*/
import "C"
4 changes: 2 additions & 2 deletions Build_system_static.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ package git
#cgo CFLAGS: -DLIBGIT2_STATIC
#include <git2.h>

#if LIBGIT2_VER_MAJOR != 1 || LIBGIT2_VER_MINOR < 1 || LIBGIT2_VER_MINOR > 1
# error "Invalid libgit2 version; this git2go supports libgit2 between v1.1.0 and v1.1.0"
#if LIBGIT2_VER_MAJOR != 1 || LIBGIT2_VER_MINOR < 1 || LIBGIT2_VER_MINOR > 2
# error "Invalid libgit2 version; this git2go supports libgit2 between v1.1.0 and v1.2.0"
#endif
*/
import "C"
5 changes: 4 additions & 1 deletion script/build-libgit2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,11 @@ if [ -n "${BUILD_LIBGIT_REF}" ]; then
trap "git submodule update --init" EXIT
fi

BUILD_DEPRECATED_HARD="ON"
if [ "${BUILD_SYSTEM}" = "ON" ]; then
BUILD_INSTALL_PREFIX=${SYSTEM_INSTALL_PREFIX-"/usr"}
# Most system-wide installations won't intentionally omit deprecated symbols.
BUILD_DEPRECATED_HARD="OFF"
else
BUILD_INSTALL_PREFIX="${BUILD_PATH}/install"
mkdir -p "${BUILD_PATH}/install/lib"
Expand All @@ -68,7 +71,7 @@ cmake -DTHREADSAFE=ON \
-DCMAKE_BUILD_TYPE="RelWithDebInfo" \
-DCMAKE_INSTALL_PREFIX="${BUILD_INSTALL_PREFIX}" \
-DCMAKE_INSTALL_LIBDIR="lib" \
-DDEPRECATE_HARD=ON \
-DDEPRECATE_HARD="${BUILD_DEPRECATE_HARD}" \
"${VENDORED_PATH}"

if which make nproc >/dev/null && [ -f Makefile ]; then
Expand Down