mirror of
https://github.com/jesseduffield/lazydocker.git
synced 2026-07-25 08:31:03 +00:00
commit
362da7abd0
1 changed files with 23 additions and 3 deletions
|
|
@ -1,5 +1,12 @@
|
||||||
version: 2
|
version: 2
|
||||||
|
|
||||||
|
# global environment variables
|
||||||
|
# '& ' syntax is a YAML thing for creating referenceable documents
|
||||||
|
env-shared: &env-shared
|
||||||
|
environment:
|
||||||
|
GOFLAGS: "-mod=vendor"
|
||||||
|
|
||||||
|
# build steps shared across different jobs
|
||||||
build-shared: &build-shared
|
build-shared: &build-shared
|
||||||
steps:
|
steps:
|
||||||
- checkout
|
- checkout
|
||||||
|
|
@ -16,27 +23,39 @@ build-shared: &build-shared
|
||||||
- run:
|
- run:
|
||||||
name: Run tests
|
name: Run tests
|
||||||
command: |
|
command: |
|
||||||
go test -v -mod=vendor ./...
|
go test -v ./...
|
||||||
|
- run:
|
||||||
|
name: Get gox
|
||||||
|
# -mod=vendor doesn't work with go get while in source tree with go.mod in it
|
||||||
|
working_directory: "/tmp"
|
||||||
|
command: |
|
||||||
|
go get github.com/mitchellh/gox
|
||||||
- run:
|
- run:
|
||||||
name: Compile project on every platform
|
name: Compile project on every platform
|
||||||
command: |
|
command: |
|
||||||
go get github.com/mitchellh/gox
|
gox -parallel 10 -os "linux freebsd" -osarch "darwin/i386 darwin/amd64"
|
||||||
GOFLAGS=-mod=vendor gox -parallel 10 -os "linux freebsd" -osarch "darwin/i386 darwin/amd64"
|
|
||||||
- save_cache:
|
- save_cache:
|
||||||
key: pkg-cache-{{ checksum "go.sum" }}-v5
|
key: pkg-cache-{{ checksum "go.sum" }}-v5
|
||||||
paths:
|
paths:
|
||||||
- ~/.cache/go-build
|
- ~/.cache/go-build
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
# matrix build jobs run on every commit
|
||||||
|
# building on versioned Go and the latest one
|
||||||
|
# '<<: *' syntax is a YAML thing for including documents
|
||||||
"golang:1.12":
|
"golang:1.12":
|
||||||
|
<<: *env-shared
|
||||||
<<: *build-shared
|
<<: *build-shared
|
||||||
docker:
|
docker:
|
||||||
- image: circleci/golang:1.12
|
- image: circleci/golang:1.12
|
||||||
"golang:latest":
|
"golang:latest":
|
||||||
|
<<: *env-shared
|
||||||
<<: *build-shared
|
<<: *build-shared
|
||||||
docker:
|
docker:
|
||||||
- image: circleci/golang:latest
|
- image: circleci/golang:latest
|
||||||
|
# release job run only when a commit is tagged
|
||||||
release:
|
release:
|
||||||
|
<<: *env-shared
|
||||||
docker:
|
docker:
|
||||||
- image: circleci/golang:1.12
|
- image: circleci/golang:1.12
|
||||||
steps:
|
steps:
|
||||||
|
|
@ -68,6 +87,7 @@ workflows:
|
||||||
version: 2
|
version: 2
|
||||||
build:
|
build:
|
||||||
jobs:
|
jobs:
|
||||||
|
# build matrix
|
||||||
- "golang:1.12"
|
- "golang:1.12"
|
||||||
- "golang:latest"
|
- "golang:latest"
|
||||||
release:
|
release:
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue