2018-07-17 18:31:38 +00:00
|
|
|
image: Visual Studio 2017
|
|
|
|
|
2016-10-18 07:24:35 +00:00
|
|
|
skip_branch_with_pr: true
|
|
|
|
|
2016-09-11 19:17:18 +00:00
|
|
|
environment:
|
2018-07-17 18:31:38 +00:00
|
|
|
GIT_LFS_NO_TEST_COUNT: 1
|
2018-07-23 16:17:48 +00:00
|
|
|
GIT_LFS_LOCK_ACQUIRE_DISABLED: 1
|
2018-07-23 18:45:21 +00:00
|
|
|
GOPATH: C:\Users\appveyor\go
|
2016-09-11 19:17:18 +00:00
|
|
|
MSYSTEM: MINGW64
|
|
|
|
|
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
|
|
|
clone_folder: $(USERPROFILE)\src\git-lfs
|
2016-09-11 19:17:18 +00:00
|
|
|
|
2015-10-23 22:47:37 +00:00
|
|
|
install:
|
2017-04-10 14:34:43 +00:00
|
|
|
- rd C:\Go /s /q
|
2018-07-17 18:31:38 +00:00
|
|
|
- rd C:\Perl /s /q
|
|
|
|
- refreshenv
|
all: use Go 1.11 in CI
Per [1], we would like to build Git LFS on Go version 1.11, following
testing over several weeks. As is done in [2], let's upgrade the version
of Go used in continuous integration (particularly on AppVeyor and
CircleCI) to match.
Since Chocolatey has not yet shipped Go 1.11 on their default channel,
we'll continue to download the binary ourselves manually. Once the
desired version of Go is available, this should be upgraded, too.
Notably, this change does not include Go Module support (as introduced
in version 1.11), so the value for $GO111MODULE is left unset, as to
avoid breaking existing checkouts of Git LFS that reside in a $GOPATH. A
subsequent change will introduce Go Module support, at which point
existing check-outs of Git LFS will need to be relocated.
[1]: build-dockers@46040a6 (all: build against Go 1.11, 2018-08-28)
[2]: d4df80b4 ({.travis,appveyor}.yml: upgrade to Go 1.10.3, 2018-07-25)
Co-authored-by: brian m. carlson <bk2204@github.com>
2018-08-28 18:54:31 +00:00
|
|
|
- curl -sL -o go1.11.windows-amd64.zip https://storage.googleapis.com/golang/go1.11.windows-amd64.zip
|
|
|
|
- 7z x go1.11.windows-amd64.zip -oC:\ >nul
|
2018-07-25 21:47:39 +00:00
|
|
|
- C:\go\bin\go version
|
Makefile: force callers to have goversioninfo in $PATH
In 22351986 (Makefile: replace script/bootstrap with 'make', 'make all',
2018-07-19), the Makefile learned how to make binaries of git-lfs,
including invoking 'go generate' in order to generate the resource.syso,
necessary for building on Windows.
In the commit mentioned above, we taught the Makefile recipe for
'resource.syso' to 'go get' the necessary 'goversioninfo' binary before
building, if callers do not have it.
In Go 1.10.3 and earlier, this caused no change to the vendor directory
or glide.yaml file, and instead installed the project in '$GOPATH', and
built the binary in '$GOPATH/bin'.
Since we are on Go 1.11, now, and running 'go get' from inside a module
directory causes the module's go.mod (and thusly, the go.sum, too) to
change, let's make it the caller's responsibility to provide a valid
'goversioninfo' binary in '$PATH'.
This allows us to avoid the burden of cleaning up after ourselves when
running 'go get' from within a directory that is itself a Go module.
2018-08-29 16:08:23 +00:00
|
|
|
- cd %USERPROFILE%\src
|
|
|
|
- C:\go\bin\go get github.com/josephspurrier/goversioninfo/cmd/goversioninfo
|
|
|
|
- cd %USERPROFILE%\src\git-lfs
|
2016-09-06 07:11:16 +00:00
|
|
|
- cinst InnoSetup -y
|
2018-07-17 18:31:38 +00:00
|
|
|
- cinst strawberryperl -y
|
|
|
|
- refreshenv
|
2018-07-13 17:59:54 +00:00
|
|
|
- cinst make
|
2017-02-14 09:08:09 +00:00
|
|
|
- refreshenv
|
Makefile: force callers to have goversioninfo in $PATH
In 22351986 (Makefile: replace script/bootstrap with 'make', 'make all',
2018-07-19), the Makefile learned how to make binaries of git-lfs,
including invoking 'go generate' in order to generate the resource.syso,
necessary for building on Windows.
In the commit mentioned above, we taught the Makefile recipe for
'resource.syso' to 'go get' the necessary 'goversioninfo' binary before
building, if callers do not have it.
In Go 1.10.3 and earlier, this caused no change to the vendor directory
or glide.yaml file, and instead installed the project in '$GOPATH', and
built the binary in '$GOPATH/bin'.
Since we are on Go 1.11, now, and running 'go get' from inside a module
directory causes the module's go.mod (and thusly, the go.sum, too) to
change, let's make it the caller's responsibility to provide a valid
'goversioninfo' binary in '$PATH'.
This allows us to avoid the burden of cleaning up after ourselves when
running 'go get' from within a directory that is itself a Go module.
2018-08-29 16:08:23 +00:00
|
|
|
- set PATH=%GOPATH%\bin;%PATH%
|
2017-02-24 10:43:05 +00:00
|
|
|
- ps: |
|
|
|
|
echo "Go directories in machine PATH environment:"
|
|
|
|
[environment]::GetEnvironmentVariable("PATH","Machine").split(";") | Select-String -Pattern "\\go\\"
|
|
|
|
echo "Go directories in user PATH environment:"
|
|
|
|
[environment]::GetEnvironmentVariable("PATH","User").split(";") | Select-String -Pattern "\\go\\"
|
|
|
|
echo "Go directories in process PATH environment:"
|
|
|
|
[environment]::GetEnvironmentVariable("PATH","Process").split(";") | Select-String -Pattern "\\go\\"
|
|
|
|
echo "Go version information:"
|
|
|
|
go version
|
2015-10-23 22:47:37 +00:00
|
|
|
|
2016-09-06 07:11:16 +00:00
|
|
|
build_script:
|
2018-07-23 18:45:21 +00:00
|
|
|
- bash --login -c 'make GOARCH=386 -B'
|
2016-09-16 21:41:09 +00:00
|
|
|
- mv bin\git-lfs.exe git-lfs-x86.exe
|
2018-07-23 18:45:21 +00:00
|
|
|
- bash --login -c 'make GOARCH=amd64 -B'
|
2016-09-16 21:41:09 +00:00
|
|
|
- mv bin\git-lfs.exe git-lfs-x64.exe
|
2015-10-23 22:47:37 +00:00
|
|
|
|
2016-09-06 07:11:16 +00:00
|
|
|
after_build:
|
|
|
|
- iscc script\windows-installer\inno-setup-git-lfs-installer.iss
|
2015-10-23 22:47:37 +00:00
|
|
|
|
2016-09-11 19:17:18 +00:00
|
|
|
test_script:
|
|
|
|
- bash --login script/cibuild
|
|
|
|
|
2015-10-23 22:47:37 +00:00
|
|
|
artifacts:
|
2016-09-06 07:11:16 +00:00
|
|
|
- path: git-lfs-x86.exe
|
|
|
|
- path: git-lfs-x64.exe
|
|
|
|
- path: git-lfs-windows-*.exe
|