relax version check #696
|
@ -91,6 +91,8 @@ jobs:
|
||||||
build-system-dynamic:
|
build-system-dynamic:
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
libgit2: [ '1.1.0' ]
|
||||||
name: Go (system-wide, dynamic)
|
name: Go (system-wide, dynamic)
|
||||||
|
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
|
@ -103,10 +105,10 @@ jobs:
|
||||||
id: go
|
id: go
|
||||||
- name: Check out code into the Go module directory
|
- name: Check out code into the Go module directory
|
||||||
uses: actions/checkout@v1
|
uses: actions/checkout@v1
|
||||||
- name: Build libgit2
|
- name: Build libgit2 ${{ matrix.libgit2 }}
|
||||||
run: |
|
run: |
|
||||||
git submodule update --init
|
git submodule update --init
|
||||||
sudo ./script/build-libgit2.sh --dynamic --system
|
sudo env BUILD_LIBGIT_REF=v${{ matrix.libgit2 }} ./script/build-libgit2.sh --dynamic --system
|
||||||
- name: Test
|
- name: Test
|
||||||
run: make test
|
run: make 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
|
#if LIBGIT2_VER_MAJOR != 1 || LIBGIT2_VER_MINOR < 1 || LIBGIT2_VER_MINOR > 1
|
||||||
# error "Invalid libgit2 version; this git2go supports libgit2 v1.1"
|
# error "Invalid libgit2 version; this git2go supports libgit2 between v1.1.0 and v1.1.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
|
#if LIBGIT2_VER_MAJOR != 1 || LIBGIT2_VER_MINOR < 1 || LIBGIT2_VER_MINOR > 1
|
||||||
# error "Invalid libgit2 version; this git2go supports libgit2 v1.1"
|
# error "Invalid libgit2 version; this git2go supports libgit2 between v1.1.0 and v1.1.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
|
#if LIBGIT2_VER_MAJOR != 1 || LIBGIT2_VER_MINOR < 1 || LIBGIT2_VER_MINOR > 1
|
||||||
# error "Invalid libgit2 version; this git2go supports libgit2 v1.1"
|
# error "Invalid libgit2 version; this git2go supports libgit2 between v1.1.0 and v1.1.0"
|
||||||
#endif
|
#endif
|
||||||
*/
|
*/
|
||||||
import "C"
|
import "C"
|
||||||
|
|
|
@ -46,6 +46,11 @@ if [ -z "${BUILD_SHARED_LIBS}" ]; then
|
||||||
usage
|
usage
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ -n "${BUILD_LIBGIT_REF}" ]; then
|
||||||
|
git -C "${VENDORED_PATH}" checkout "${BUILD_LIBGIT_REF}"
|
||||||
|
trap "git submodule update --init" EXIT
|
||||||
|
fi
|
||||||
|
|
||||||
if [ "${BUILD_SYSTEM}" = "ON" ]; then
|
if [ "${BUILD_SYSTEM}" = "ON" ]; then
|
||||||
BUILD_INSTALL_PREFIX=${SYSTEM_INSTALL_PREFIX-"/usr"}
|
BUILD_INSTALL_PREFIX=${SYSTEM_INSTALL_PREFIX-"/usr"}
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue