-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
More decoupled, easier to maintain.
- Loading branch information
Showing
32 changed files
with
827 additions
and
114 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
steps: | ||
- name: gcr.io/einride/cloud-builder | ||
args: ["/cloud-builder/git-init.sh"] | ||
env: | ||
- REPO_NAME=$REPO_NAME | ||
- COMMIT_SHA=$COMMIT_SHA | ||
|
||
- name: gcr.io/einride/cloud-builder | ||
args: ["make"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
gcp_project := einride | ||
github_org := einride | ||
repo_name := $(shell basename -s .git $(shell git config --get remote.origin.url)) | ||
git_root := $(shell git rev-parse --show-toplevel) | ||
cloudbuild_root := $(shell realpath --relative-to $(git_root) $(dir $(lastword $(MAKEFILE_LIST)))) | ||
|
||
.PHONY: gcloud-builds-triggers-create | ||
gcloud-builds-triggers-create: | ||
gcloud beta builds triggers create github \ | ||
--project=$(gcp_project) \ | ||
--repo-owner=$(github_org) \ | ||
--repo-name=$(repo_name) \ | ||
--pull-request-pattern='.*' \ | ||
--description='$(repo_name)-review' \ | ||
--build-config='$(cloudbuild_root)/review.yaml' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
vendor | ||
.idea | ||
.gobincache | ||
test/mocks | ||
tools/*/*/ |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
run: | ||
timeout: 5m | ||
skip-dirs: | ||
- gen | ||
|
||
linters: | ||
enable-all: true | ||
disable: | ||
- dupl # allow duplication | ||
- funlen # allow long functions | ||
- gomnd # allow some magic numbers | ||
- wsl # unwanted amount of whitespace | ||
- godox # allow TODOs | ||
- interfacer # deprecated by the author for having too many false positives | ||
- gocognit # allow higher cognitive complexity | ||
- testpackage # unwanted convention | ||
- nestif # allow deep nesting | ||
- unparam # allow constant parameters | ||
- goerr113 # allow "dynamic" errors | ||
- gofumpt # TODO: enable when whitespace diff issue is fixed |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,62 +1,34 @@ | ||
# all: run a complete build | ||
.PHONY: all | ||
all: \ | ||
circleci-config-validate \ | ||
go-generate \ | ||
go-review \ | ||
go-test \ | ||
go-lint \ | ||
go-mod-tidy \ | ||
git-verify-submodules \ | ||
git-verify-nodiff | ||
|
||
# clean: remove generated build files | ||
.PHONY: clean | ||
clean: | ||
rm -rf build | ||
|
||
.PHONY: build | ||
build: | ||
@git submodule update --init --recursive $@ | ||
|
||
include build/rules.mk | ||
build/rules.mk: build | ||
@# included in submodule: build | ||
include tools/git-verify-nodiff/rules.mk | ||
include tools/golangci-lint/rules.mk | ||
include tools/goreview/rules.mk | ||
include tools/xtools/rules.mk | ||
|
||
# go-mod-tidy: update go modules | ||
.PHONY: go-mod-tidy | ||
go-mod-tidy: | ||
go mod tidy -v | ||
|
||
# go-lint: lint Go files | ||
.PHONY: go-lint | ||
go-lint: $(GOLANGCI_LINT) | ||
# dupl: disabled due to the testdata in spherical_point_cloud_test | ||
$(GOLANGCI_LINT) run --enable-all --disable=dupl | ||
|
||
# go-test: run Go test suite | ||
.PHONY: go-test | ||
go-test: | ||
go test -race -cover ./... | ||
|
||
# go-review: run goreview linter | ||
.PHONY: go-review | ||
go-review: $(GOREVIEW) | ||
$(GOREVIEW) -c 1 ./... | ||
|
||
# circleci-config-validate: validate CircleCI config | ||
.PHONY: circleci-config-validate | ||
circleci-config-validate: $(CIRCLECI) | ||
$(CIRCLECI) config validate | ||
|
||
# go-generate: generate Go code | ||
.PHONY: go-generate | ||
go-generate: returnmode_string.go productid_string.go | ||
|
||
returnmode_string.go: returnmode.go $(GOBIN) | ||
$(GOBIN) -m -run golang.org/x/tools/cmd/stringer \ | ||
-type ReturnMode -trimprefix ReturnMode -output $@ $< | ||
returnmode_string.go: returnmode.go $(stringer) | ||
$(stringer) -type ReturnMode -trimprefix ReturnMode -output $@ $< | ||
|
||
productid_string.go: productid.go $(GOBIN) | ||
$(GOBIN) -m -run golang.org/x/tools/cmd/stringer \ | ||
-type ProductID -trimprefix ProductID -output $@ $< | ||
$(stringer) -type ProductID -trimprefix ProductID -output $@ $< |
Submodule build
deleted from
c6a009
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,11 @@ | ||
module github.com/einride/vlp16-go | ||
|
||
go 1.12 | ||
go 1.14 | ||
|
||
require ( | ||
github.com/einride/unit v1.6.0 | ||
github.com/stretchr/testify v1.3.0 | ||
github.com/einride/unit v1.7.2 | ||
golang.org/x/net v0.0.0-20190909003024-a7b16738d86b | ||
golang.org/x/sync v0.0.0-20190423024810-112230192c58 | ||
golang.org/x/tools v0.0.0-20190729092621-ff9f1409240a | ||
golang.org/x/xerrors v0.0.0-20190513163551-3ee3066db522 | ||
gotest.tools/v3 v3.0.2 | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.