-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add basic building and testing scripts
moving to ii/II namespace
- Loading branch information
Paul Weil
authored and
Erez Freiberger
committed
Sep 28, 2016
1 parent
0c4b3e9
commit 98b2d34
Showing
14 changed files
with
586 additions
and
237 deletions.
There are no files selected for viewing
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,3 +1,4 @@ | ||
/_output | ||
image-inspector | ||
*.a | ||
*.swp |
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,17 @@ | ||
language: go | ||
|
||
go: | ||
- 1.5.3 | ||
- 1.6 | ||
|
||
install: | ||
- export PATH=$GOPATH/bin:./_tools/etcd/bin:$PATH | ||
- make install-travis | ||
|
||
script: | ||
- make verify test-unit | ||
|
||
notifications: | ||
irc: "chat.freenode.net#openshift-dev" | ||
|
||
sudo: false |
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,57 @@ | ||
# Old-skool build tools. | ||
# | ||
# Targets (see each target for more information): | ||
# all: Build code. | ||
# build: Build code. | ||
# test-unit: Run unit tests. | ||
# clean: Clean up. | ||
|
||
OUT_DIR = _output | ||
OUT_PKG_DIR = Godeps/_workspace/pkg | ||
|
||
# Build code. | ||
# | ||
# Example: | ||
# make | ||
# make all | ||
all build: | ||
hack/build-go.sh | ||
.PHONY: all build | ||
|
||
# Remove all build artifacts. | ||
# | ||
# Example: | ||
# make clean | ||
clean: | ||
rm -rf $(OUT_DIR) $(OUT_PKG_DIR) | ||
.PHONY: clean | ||
|
||
# Verify code conventions are properly setup. | ||
# | ||
# Example: | ||
# make verify | ||
verify: build | ||
hack/verify-gofmt.sh | ||
.PHONY: verify | ||
|
||
# Run unit tests. | ||
# | ||
# Args: | ||
# WHAT: Directory names to test. All *_test.go files under these | ||
# directories will be run. If not specified, "everything" will be tested. | ||
# TESTS: Same as WHAT. | ||
# GOFLAGS: Extra flags to pass to 'go' when building. | ||
# TESTFLAGS: Extra flags that should only be passed to hack/test-go.sh | ||
# | ||
# Example: | ||
# make test-unit | ||
# make test-unit WHAT=pkg/build GOFLAGS=-v | ||
test-unit: | ||
GOTEST_FLAGS="$(TESTFLAGS)" hack/test-go.sh $(WHAT) $(TESTS) | ||
.PHONY: test-unit | ||
|
||
# Install travis dependencies | ||
# | ||
install-travis: | ||
hack/install-tools.sh | ||
.PHONY: install-travis |
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,17 @@ | ||
#!/bin/bash | ||
|
||
# This script sets up a go workspace locally and builds all go components. | ||
|
||
set -o errexit | ||
set -o nounset | ||
set -o pipefail | ||
|
||
STARTTIME=$(date +%s) | ||
CODE_ROOT=$(dirname "${BASH_SOURCE}")/.. | ||
source "${CODE_ROOT}/hack/util.sh" | ||
source "${CODE_ROOT}/hack/common.sh" | ||
ii::log::install_errexit | ||
|
||
ii::build::build_binaries "$@" | ||
|
||
ret=$?; ENDTIME=$(date +%s); echo "$0 took $(($ENDTIME - $STARTTIME)) seconds"; exit "$ret" |
Oops, something went wrong.