git-lfs/appveyor.yml

55 lines
1.6 KiB
YAML
Raw Normal View History

image: Visual Studio 2017
skip_branch_with_pr: true
2016-09-11 19:17:18 +00:00
environment:
GIT_LFS_NO_TEST_COUNT: 1
GIT_LFS_LOCK_ACQUIRE_DISABLED: 1
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
install:
2017-04-10 14:34:43 +00:00
- rd C:\Go /s /q
- rd C:\Perl /s /q
- refreshenv
- 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
- C:\go\bin\go version
- cd %USERPROFILE%\src
- C:\go\bin\go get github.com/josephspurrier/goversioninfo/cmd/goversioninfo
- cd %USERPROFILE%\src\git-lfs
- cinst InnoSetup -y
- cinst strawberryperl -y
- refreshenv
- cinst make
- refreshenv
- set PATH=%GOPATH%\bin;%PATH%
- 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
build_script:
- bash --login -c 'make GOARCH=386 -B'
- mv bin\git-lfs.exe git-lfs-x86.exe
- bash --login -c 'make GOARCH=amd64 -B'
- mv bin\git-lfs.exe git-lfs-x64.exe
after_build:
- iscc script\windows-installer\inno-setup-git-lfs-installer.iss
2016-09-11 19:17:18 +00:00
test_script:
- bash --login script/cibuild
artifacts:
- path: git-lfs-x86.exe
- path: git-lfs-x64.exe
- path: git-lfs-windows-*.exe