OSDN Git Service

add Makefile and ci (#5)
authoroysheng <33340252+oysheng@users.noreply.github.com>
Fri, 24 Aug 2018 05:22:35 +0000 (13:22 +0800)
committerPaladz <yzhu101@uottawa.ca>
Fri, 24 Aug 2018 05:22:35 +0000 (13:22 +0800)
.travis.yml [new file with mode: 0644]
Makefile [new file with mode: 0644]

diff --git a/.travis.yml b/.travis.yml
new file mode 100644 (file)
index 0000000..8fcf6b9
--- /dev/null
@@ -0,0 +1,19 @@
+language: go
+go_import_path: github.com/equity
+dist: trusty
+sudo: false
+
+matrix:
+  include:
+    - go: 1.8.3
+    - go: 1.9
+    - go: tip
+  allow_failures:
+    - go: tip
+
+branches:
+    only:
+        - master
+
+script:
+    - make ci
diff --git a/Makefile b/Makefile
new file mode 100644 (file)
index 0000000..35f6e2b
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,20 @@
+PACKAGES    := $(shell go list ./... | grep -v '/vendor/')
+
+all: test equitycmd
+
+equitycmd:
+       @echo "Building equitycmd to compiler/cmd/equitycmd/equitycmd"
+       @go build -o compiler/cmd/equitycmd/equitycmd compiler/cmd/equitycmd/equitycmd.go
+
+clean:
+       @echo "Cleaning binaries built..."
+       @rm -rf compiler/cmd/equitycmd/equitycmd
+       @echo "Done."
+
+test:
+       @echo "====> Running go test"
+       @go test -tags "equity" $(PACKAGES)
+
+ci: test
+
+.PHONY: all clean test ci