From 635e54261d5126b25d43d51aede48792da41e708 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6ren=20Tempel?= Date: Sat, 28 Nov 2020 03:25:37 +0100 Subject: [PATCH] CI: Add libgit2 version matrix to build-system-dynamic job --- .github/workflows/ci.yml | 6 ++++-- script/build-libgit2.sh | 5 +++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index caa52a4..047cb4a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -91,6 +91,8 @@ jobs: build-system-dynamic: strategy: fail-fast: false + matrix: + libgit2: [ '1.1.0' ] name: Go (system-wide, dynamic) runs-on: ubuntu-20.04 @@ -103,10 +105,10 @@ jobs: id: go - name: Check out code into the Go module directory uses: actions/checkout@v1 - - name: Build libgit2 + - name: Build libgit2 ${{ matrix.libgit2 }} run: | 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 run: make test diff --git a/script/build-libgit2.sh b/script/build-libgit2.sh index dd11314..9df8c3c 100755 --- a/script/build-libgit2.sh +++ b/script/build-libgit2.sh @@ -46,6 +46,11 @@ if [ -z "${BUILD_SHARED_LIBS}" ]; then usage 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 BUILD_INSTALL_PREFIX=${SYSTEM_INSTALL_PREFIX-"/usr"} else