diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000000..10db00f892 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,21 @@ +language: go +sudo: required + +go: + - 1.12 + +env: + - CFS_BUILD_BASE="chubaofs/cfs-build:1.0" + +services: docker + +notifications: + on_success: never + on_failure: never + +before_install: + - docker pull ${CFS_BUILD_BASE} + +script: + - docker run --rm -v `pwd`:/go/src/github.com/chubaofs/cfs ${CFS_BUILD_BASE} /bin/bash -c "cd /go/src/github.com/chubaofs/cfs && make build" + diff --git a/Makefile b/Makefile new file mode 100644 index 0000000000..a28e05c57b --- /dev/null +++ b/Makefile @@ -0,0 +1,23 @@ + +default: build + +build: pre_build build_server build_client + @echo "build done" + +pre_build: + @mkdir -p build + +build_server: + @{ \ + echo "build server" \ + && (cd cmd && sh ./build.sh && mv cmd ../build/cfs-server) \ + } + +build_client: + @{ \ + echo "build client" \ + && (cd client && sh ./build.sh && mv client ../build/cfs-client ) \ + } + +ci-test: + go test $(go list ./...)