Declare forward-compatibility with libgit2 v1.2.0 #minor (#800)
We can't yet ship a fully libgit2 v1.2.0-compatible library due to a missing public symbol, but we can allow the v1.1.0-era codebase to link against libgit2 v1.2.0 in the meantime.
This commit is contained in:
parent
2077003fa5
commit
549706bb57
|
@ -61,7 +61,9 @@ jobs:
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
libgit2: [ '1.1.0' ]
|
libgit2:
|
||||||
|
- 'v1.1.0'
|
||||||
|
- 'v1.2.0'
|
||||||
name: Go (system-wide, dynamic)
|
name: Go (system-wide, dynamic)
|
||||||
|
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
|
@ -78,7 +80,7 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
git submodule update --init
|
git submodule update --init
|
||||||
sudo apt-get install -y --no-install-recommends libssh2-1-dev
|
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
|
- name: Test
|
||||||
run: make TEST_ARGS=-test.v test
|
run: make TEST_ARGS=-test.v test
|
||||||
|
|
||||||
|
|
|
@ -9,8 +9,8 @@ package git
|
||||||
#cgo CFLAGS: -DLIBGIT2_STATIC
|
#cgo CFLAGS: -DLIBGIT2_STATIC
|
||||||
#include <git2.h>
|
#include <git2.h>
|
||||||
|
|
||||||
#if LIBGIT2_VER_MAJOR != 1 || LIBGIT2_VER_MINOR < 1 || LIBGIT2_VER_MINOR > 1
|
#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.1.0"
|
# error "Invalid libgit2 version; this git2go supports libgit2 between v1.1.0 and v1.2.0"
|
||||||
#endif
|
#endif
|
||||||
*/
|
*/
|
||||||
import "C"
|
import "C"
|
||||||
|
|
|
@ -7,8 +7,8 @@ package git
|
||||||
#cgo CFLAGS: -DLIBGIT2_DYNAMIC
|
#cgo CFLAGS: -DLIBGIT2_DYNAMIC
|
||||||
#include <git2.h>
|
#include <git2.h>
|
||||||
|
|
||||||
#if LIBGIT2_VER_MAJOR != 1 || LIBGIT2_VER_MINOR < 1 || LIBGIT2_VER_MINOR > 1
|
#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.1.0"
|
# error "Invalid libgit2 version; this git2go supports libgit2 between v1.1.0 and v1.2.0"
|
||||||
#endif
|
#endif
|
||||||
*/
|
*/
|
||||||
import "C"
|
import "C"
|
||||||
|
|
|
@ -7,8 +7,8 @@ package git
|
||||||
#cgo CFLAGS: -DLIBGIT2_STATIC
|
#cgo CFLAGS: -DLIBGIT2_STATIC
|
||||||
#include <git2.h>
|
#include <git2.h>
|
||||||
|
|
||||||
#if LIBGIT2_VER_MAJOR != 1 || LIBGIT2_VER_MINOR < 1 || LIBGIT2_VER_MINOR > 1
|
#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.1.0"
|
# error "Invalid libgit2 version; this git2go supports libgit2 between v1.1.0 and v1.2.0"
|
||||||
#endif
|
#endif
|
||||||
*/
|
*/
|
||||||
import "C"
|
import "C"
|
||||||
|
|
|
@ -51,8 +51,11 @@ if [ -n "${BUILD_LIBGIT_REF}" ]; then
|
||||||
trap "git submodule update --init" EXIT
|
trap "git submodule update --init" EXIT
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
BUILD_DEPRECATED_HARD="ON"
|
||||||
if [ "${BUILD_SYSTEM}" = "ON" ]; then
|
if [ "${BUILD_SYSTEM}" = "ON" ]; then
|
||||||
BUILD_INSTALL_PREFIX=${SYSTEM_INSTALL_PREFIX-"/usr"}
|
BUILD_INSTALL_PREFIX=${SYSTEM_INSTALL_PREFIX-"/usr"}
|
||||||
|
# Most system-wide installations won't intentionally omit deprecated symbols.
|
||||||
|
BUILD_DEPRECATED_HARD="OFF"
|
||||||
else
|
else
|
||||||
BUILD_INSTALL_PREFIX="${BUILD_PATH}/install"
|
BUILD_INSTALL_PREFIX="${BUILD_PATH}/install"
|
||||||
mkdir -p "${BUILD_PATH}/install/lib"
|
mkdir -p "${BUILD_PATH}/install/lib"
|
||||||
|
@ -68,7 +71,7 @@ cmake -DTHREADSAFE=ON \
|
||||||
-DCMAKE_BUILD_TYPE="RelWithDebInfo" \
|
-DCMAKE_BUILD_TYPE="RelWithDebInfo" \
|
||||||
-DCMAKE_INSTALL_PREFIX="${BUILD_INSTALL_PREFIX}" \
|
-DCMAKE_INSTALL_PREFIX="${BUILD_INSTALL_PREFIX}" \
|
||||||
-DCMAKE_INSTALL_LIBDIR="lib" \
|
-DCMAKE_INSTALL_LIBDIR="lib" \
|
||||||
-DDEPRECATE_HARD=ON \
|
-DDEPRECATE_HARD="${BUILD_DEPRECATE_HARD}" \
|
||||||
"${VENDORED_PATH}"
|
"${VENDORED_PATH}"
|
||||||
|
|
||||||
if which make nproc >/dev/null && [ -f Makefile ]; then
|
if which make nproc >/dev/null && [ -f Makefile ]; then
|
||||||
|
|
Loading…
Reference in New Issue