File tree Expand file tree Collapse file tree 5 files changed +15
-8
lines changed Expand file tree Collapse file tree 5 files changed +15
-8
lines changed Original file line number Diff line number Diff line change 91
91
build-system-dynamic :
92
92
strategy :
93
93
fail-fast : false
94
+ matrix :
95
+ libgit2 : [ '1.1.0' ]
94
96
name : Go (system-wide, dynamic)
95
97
96
98
runs-on : ubuntu-20.04
@@ -103,10 +105,10 @@ jobs:
103
105
id : go
104
106
- name : Check out code into the Go module directory
105
107
uses : actions/checkout@v1
106
- - name : Build libgit2
108
+ - name : Build libgit2 ${{ matrix.libgit2 }}
107
109
run : |
108
110
git submodule update --init
109
- sudo ./script/build-libgit2.sh --dynamic --system
111
+ sudo env BUILD_LIBGIT_REF=v${{ matrix.libgit2 }} ./script/build-libgit2.sh --dynamic --system
110
112
- name : Test
111
113
run : make test
112
114
Original file line number Diff line number Diff line change @@ -9,8 +9,8 @@ package git
9
9
#cgo CFLAGS: -DLIBGIT2_STATIC
10
10
#include <git2.h>
11
11
12
- #if LIBGIT2_VER_MAJOR != 1 || LIBGIT2_VER_MINOR != 1
13
- # error "Invalid libgit2 version; this git2go supports libgit2 v1.1"
12
+ #if LIBGIT2_VER_MAJOR != 1 || LIBGIT2_VER_MINOR < 1 || LIBGIT2_VER_MINOR > 1
13
+ # error "Invalid libgit2 version; this git2go supports libgit2 between v1.1.0 and v1.1.0 "
14
14
#endif
15
15
*/
16
16
import "C"
Original file line number Diff line number Diff line change @@ -7,8 +7,8 @@ package git
7
7
#cgo CFLAGS: -DLIBGIT2_DYNAMIC
8
8
#include <git2.h>
9
9
10
- #if LIBGIT2_VER_MAJOR != 1 || LIBGIT2_VER_MINOR != 1
11
- # error "Invalid libgit2 version; this git2go supports libgit2 v1.1"
10
+ #if LIBGIT2_VER_MAJOR != 1 || LIBGIT2_VER_MINOR < 1 || LIBGIT2_VER_MINOR > 1
11
+ # error "Invalid libgit2 version; this git2go supports libgit2 between v1.1.0 and v1.1.0 "
12
12
#endif
13
13
*/
14
14
import "C"
Original file line number Diff line number Diff line change @@ -7,8 +7,8 @@ package git
7
7
#cgo CFLAGS: -DLIBGIT2_STATIC
8
8
#include <git2.h>
9
9
10
- #if LIBGIT2_VER_MAJOR != 1 || LIBGIT2_VER_MINOR != 1
11
- # error "Invalid libgit2 version; this git2go supports libgit2 v1.1"
10
+ #if LIBGIT2_VER_MAJOR != 1 || LIBGIT2_VER_MINOR < 1 || LIBGIT2_VER_MINOR > 1
11
+ # error "Invalid libgit2 version; this git2go supports libgit2 between v1.1.0 and v1.1.0 "
12
12
#endif
13
13
*/
14
14
import "C"
Original file line number Diff line number Diff line change @@ -46,6 +46,11 @@ if [ -z "${BUILD_SHARED_LIBS}" ]; then
46
46
usage
47
47
fi
48
48
49
+ if [ -n " ${BUILD_LIBGIT_REF} " ]; then
50
+ git -C " ${VENDORED_PATH} " checkout " ${BUILD_LIBGIT_REF} "
51
+ trap " git submodule update --init" EXIT
52
+ fi
53
+
49
54
if [ " ${BUILD_SYSTEM} " = " ON" ]; then
50
55
BUILD_INSTALL_PREFIX=${SYSTEM_INSTALL_PREFIX-" /usr" }
51
56
else
You can’t perform that action at this time.
0 commit comments