git-lfs/.circleci/config.yml

94 lines
3.0 KiB
YAML
Raw Normal View History

version: 2
jobs:
bootstrap:
macos:
xcode: "9.2.0"
all: use Go Modules instead of Glide 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>
2018-08-28 20:53:57 +00:00
working_directory: ~/src/git-lfs
steps:
- checkout
- run: brew update
- run: brew upgrade go || brew install go
- run: brew upgrade git || brew install git
- run: brew upgrade gettext || brew install gettext
- run:
command: git clone https://github.com/git/git.git git-source
all: use Go Modules instead of Glide 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>
2018-08-28 20:53:57 +00:00
working_directory: ~/src/git-lfs
- run: echo "export GOPATH=$HOME/go" >> $BASH_ENV
- save_cache:
key: git-lfs-{{ .Branch }}-{{ .Revision }}
paths:
- /usr/local/Cellar
all: use Go Modules instead of Glide 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>
2018-08-28 20:53:57 +00:00
- ~/src/git-lfs
- ~/go
2016-11-15 18:06:25 +00:00
build_with_system_git:
macos:
xcode: "9.2.0"
all: use Go Modules instead of Glide 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>
2018-08-28 20:53:57 +00:00
working_directory: ~/src/git-lfs
environment:
GIT_SOURCE_REPO: https://github.com/git/git.git
steps:
- restore_cache:
key: git-lfs-{{ .Branch }}-{{ .Revision }}
2018-03-20 20:13:56 +00:00
- run: echo go gettext | xargs brew link --force
- run: echo "export GOPATH=$HOME/go" >> $BASH_ENV
- run: echo "export PATH=$HOME/bin:$GOPATH/bin:$PATH" >> $BASH_ENV
- run: echo "export GIT_LFS_TEST_DIR=$HOME/git-lfs-tests" >> $BASH_ENV
- run: script/cibuild
2016-11-15 19:41:33 +00:00
build_with_earliest_supported_git:
macos:
xcode: "9.2.0"
all: use Go Modules instead of Glide 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>
2018-08-28 20:53:57 +00:00
working_directory: ~/src/git-lfs
environment:
GIT_EARLIEST_SUPPORTED_VERSION: v2.0.0
GIT_SOURCE_REPO: https://github.com/git/git.git
steps:
- restore_cache:
key: git-lfs-{{ .Branch }}-{{ .Revision }}
2018-03-20 20:13:56 +00:00
- run: echo go gettext | xargs brew link --force
- run:
command: ./script/install-git-source "$GIT_EARLIEST_SUPPORTED_VERSION"
environment:
NO_OPENSSL: YesPlease
APPLE_COMMON_CRYPTO: YesPlease
- run: echo "export GOPATH=$HOME/go" >> $BASH_ENV
- run: echo "export PATH=$HOME/bin:$GOPATH/bin:$PATH" >> $BASH_ENV
- run: echo "export GIT_LFS_TEST_DIR=$HOME/git-lfs-tests" >> $BASH_ENV
- run: script/cibuild
2016-11-15 18:06:25 +00:00
build_with_latest_git:
macos:
xcode: "9.2.0"
all: use Go Modules instead of Glide 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>
2018-08-28 20:53:57 +00:00
working_directory: ~/src/git-lfs
environment:
GIT_LATEST_SOURCE_BRANCH: master
GIT_SOURCE_REPO: https://github.com/git/git.git
steps:
- restore_cache:
key: git-lfs-{{ .Branch }}-{{ .Revision }}
2018-03-20 20:13:56 +00:00
- run: echo go gettext | xargs brew link --force
- run:
command: ./script/install-git-source "$GIT_LATEST_SOURCE_BRANCH"
environment:
NO_OPENSSL: YesPlease
APPLE_COMMON_CRYPTO: YesPlease
- run: echo "export GOPATH=$HOME/go" >> $BASH_ENV
- run: echo "export PATH=$HOME/bin:$GOPATH/bin:$PATH" >> $BASH_ENV
- run: echo "export GIT_LFS_TEST_DIR=$HOME/git-lfs-tests" >> $BASH_ENV
- run: script/cibuild
workflows:
version: 2
build:
jobs:
- bootstrap
- build_with_earliest_supported_git:
requires:
- bootstrap
- build_with_latest_git:
requires:
- bootstrap
- build_with_system_git:
requires:
- bootstrap