Skip to content

Commit

Permalink
add travis ci config
Browse files Browse the repository at this point in the history
  • Loading branch information
zhuzhengyi1 committed Apr 18, 2019
1 parent 8ac130b commit c432108
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -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"

23 changes: 23 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -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 ./...)

0 comments on commit c432108

Please sign in to comment.