mirror of
https://github.com/FlipsideCrypto/dcrd.git
synced 2026-02-06 10:56:47 +00:00
travis: test go1.12
This commit is contained in:
parent
adc41abf59
commit
6dbd89322c
@ -8,6 +8,7 @@ services:
|
||||
|
||||
env:
|
||||
- GOVERSION=1.11
|
||||
- GOVERSION=1.12
|
||||
|
||||
install: true
|
||||
|
||||
|
||||
32
README.md
32
README.md
@ -108,20 +108,11 @@ https://decred.org/downloads
|
||||
|
||||
Building or updating from source requires the following build dependencies:
|
||||
|
||||
- **Go 1.10 or 1.11**
|
||||
- **Go 1.11 or 1.12**
|
||||
|
||||
Installation instructions can be found here: https://golang.org/doc/install.
|
||||
It is recommended to add `$GOPATH/bin` to your `PATH` at this point.
|
||||
|
||||
- **Vgo (Go 1.10 only)**
|
||||
|
||||
The `GO111MODULE` experiment is used to manage project dependencies and
|
||||
provide reproducible builds. The module experiment is provided by the Go 1.11
|
||||
toolchain, but the Go 1.10 toolchain does not provide any module support. To
|
||||
perform module-aware builds with Go 1.10,
|
||||
[vgo](https://godoc.org/golang.org/x/vgo) (a drop-in replacement for the go
|
||||
command) must be used instead.
|
||||
|
||||
- **Git**
|
||||
|
||||
Installation instructions can be found at https://git-scm.com or
|
||||
@ -130,16 +121,14 @@ Building or updating from source requires the following build dependencies:
|
||||
To build and install from a checked-out repo, run `go install . ./cmd/...` in
|
||||
the repo's root directory. Some notes:
|
||||
|
||||
* Set the `GO111MODULE=on` environment variable if using Go 1.11 and building
|
||||
from within `GOPATH`.
|
||||
|
||||
* Replace `go` with `vgo` when using Go 1.10.
|
||||
* Set the `GO111MODULE=on` environment variable if building from within
|
||||
`GOPATH`.
|
||||
|
||||
* The `dcrd` executable will be installed to `$GOPATH/bin`. `GOPATH`
|
||||
defaults to `$HOME/go` (or `%USERPROFILE%\go` on Windows) if unset.
|
||||
|
||||
|
||||
### Example of obtaining and building from source on Windows 10 with Go 1.11:
|
||||
### Example of obtaining and building from source on Windows 10:
|
||||
|
||||
```PowerShell
|
||||
PS> git clone https://github.com/decred/dcrd $env:USERPROFILE\src\dcrd
|
||||
@ -149,15 +138,6 @@ PS> & "$(go env GOPATH)\bin\dcrd" -V
|
||||
|
||||
```
|
||||
|
||||
### Example of obtaining and building from source on Linux with Go 1.10:
|
||||
|
||||
```bash
|
||||
$ git clone https://github.com/decred/dcrd ~/src/dcrd
|
||||
$ cd ~/src/dcrd
|
||||
$ vgo install . ./cmd/...
|
||||
$ $(vgo env GOPATH)/bin/dcrd -V
|
||||
```
|
||||
|
||||
## Docker
|
||||
|
||||
### Running dcrd
|
||||
@ -224,10 +204,10 @@ To run the tests locally without docker on the latest supported version of Go:
|
||||
./run_tests.sh
|
||||
```
|
||||
|
||||
To run the tests locally without docker on Go 1.10:
|
||||
To run the tests locally without docker on Go 1.11:
|
||||
|
||||
```
|
||||
GOVERSION=1.10 ./run_tests.sh
|
||||
GOVERSION=1.11 ./run_tests.sh
|
||||
```
|
||||
|
||||
## Contact
|
||||
|
||||
17
run_tests.sh
17
run_tests.sh
@ -1,12 +1,12 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# usage:
|
||||
# ./run_tests.sh # local, go 1.11
|
||||
# GOVERSION=1.10 ./run_tests.sh # local, go 1.10 (vgo)
|
||||
# ./run_tests.sh docker # docker, go 1.11
|
||||
# GOVERSION=1.10 ./run_tests.sh docker # docker, go 1.10 (vgo)
|
||||
# ./run_tests.sh podman # podman, go 1.11
|
||||
# GOVERSION=1.10 ./run_tests.sh podman # podman, go 1.10 (vgo)
|
||||
# ./run_tests.sh # local, go 1.12
|
||||
# GOVERSION=1.11 ./run_tests.sh # local, go 1.11
|
||||
# ./run_tests.sh docker # docker, go 1.12
|
||||
# GOVERSION=1.11 ./run_tests.sh docker # docker, go 1.11
|
||||
# ./run_tests.sh podman # podman, go 1.12
|
||||
# GOVERSION=1.11 ./run_tests.sh podman # podman, go 1.11
|
||||
|
||||
set -ex
|
||||
|
||||
@ -28,14 +28,11 @@ set -ex
|
||||
# for more details.
|
||||
|
||||
# Default GOVERSION
|
||||
[[ ! "$GOVERSION" ]] && GOVERSION=1.11
|
||||
[[ ! "$GOVERSION" ]] && GOVERSION=1.12
|
||||
REPO=dcrd
|
||||
|
||||
testrepo () {
|
||||
GO=go
|
||||
if [[ $GOVERSION == 1.10 ]]; then
|
||||
GO=vgo
|
||||
fi
|
||||
|
||||
$GO version
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user