114e85c200
Since we are now building on Go 1.11 (as of 074a2d4f (all: use Go 1.11 in CI, 2018-08-28)) and Go 1.11 supports Go Modules [1], let's stop using Glide, and begin using Go Modules. This involves a few things: * Teach the Makefile how to build go.sum files instead of glide.lock files. * Teach continuous integration services to build Git LFS in a non-$GOPATH environment, since (without setting GO111MODULE=on explicitly, which we choose not to do), this will break compiling Git LFS, because Go 1.11 will ignore modules present in a Go checkout beneath $GOPATH. * In order to do the above, let's also make sure that we are un-setting $GOCACHE in the environment, as this causes Go to work without modules support [2]. * Because we're no longer building in a `$GOPATH`-based location, let's instruct the CircleCI base image to archive the new location, too. * Similarly, teach the RPM spec to build in a non-$GOPATH location. * By contrast, since we use dh_golang to build git-lfs binaries on Debian, let's wait until the upstream dh_golang package is released with support for Go 1.11 module support explicitly. Therefore, force GO111MODULE to be on so that we can build a copy of Git LFS whose checkout is within a $GOPATH. Although the go.mod versions match the glide.yaml ones, the diff attached is large because Go Modules do not vendor `_test.go` files, whereas Glide does. [1]: https://golang.org/doc/go1.11#modules [2]: `GOCACHE=on` will be deprecated in Go 1.12, so this change makes sense for that reason, too. Co-authored-by: brian m. carlson <bk2204@github.com>
64 lines
1.4 KiB
YAML
64 lines
1.4 KiB
YAML
# http://docs.travis-ci.com/user/languages/go/
|
|
language: go
|
|
|
|
go: 1.11
|
|
|
|
os:
|
|
- linux
|
|
|
|
env:
|
|
global:
|
|
- GIT_LFS_SRC_DIR="$HOME/src/git-lfs"
|
|
- GIT_LFS_TEST_DIR="$HOME/git-lfs-tests"
|
|
- GIT_SOURCE_REPO="https://github.com/git/git.git"
|
|
- GIT_EARLIEST_SUPPORTED_VERSION="v2.0.0
|
|
- GIT_LATEST_SOURCE_BRANCH="master"
|
|
- GIT_ASKPASS=""
|
|
|
|
matrix:
|
|
fast_finish: true
|
|
include:
|
|
- env: git-latest-master-from-source
|
|
os: linux
|
|
before_script:
|
|
- >
|
|
cd "$GIT_LFS_SRC_DIR";
|
|
git clone $GIT_SOURCE_REPO git-source;
|
|
cd git-source;
|
|
git checkout $GIT_LATEST_SOURCE_BRANCH;
|
|
make --jobs=2;
|
|
make install;
|
|
cd ..;
|
|
- env: git-earliest-supported-version-from-source
|
|
os: linux
|
|
before_script:
|
|
- >
|
|
cd "$GIT_LFS_SRC_DIR";
|
|
git clone $GIT_SOURCE_REPO git-source;
|
|
cd git-source;
|
|
git checkout $GIT_EARLIEST_SUPPORTED_VERSION;
|
|
make --jobs=2;
|
|
make install;
|
|
cd ..;
|
|
- env: git-latest
|
|
os: linux
|
|
addons:
|
|
apt:
|
|
sources:
|
|
- git-core
|
|
packages:
|
|
- git
|
|
|
|
before_install:
|
|
- >
|
|
mkdir -p "$(dirname "$GIT_LFS_SRC_DIR")";
|
|
mv "$TRAVIS_BUILD_DIR" "$GIT_LFS_SRC_DIR";
|
|
export TRAVIS_BUILD_DIR="$GIT_LFS_SRC_DIR";
|
|
|
|
install: true
|
|
|
|
script: script/cibuild
|
|
|
|
notifications:
|
|
email: false
|