zhenshan.cao 9c15fc550e Enable CICD
Signed-off-by: zhenshan.cao <zhenshan.cao@zilliz.com>
2020-10-14 17:46:16 +08:00

58 lines
1.7 KiB
YAML

name: Build and test
# TODO: do not trigger action for some document file update
on: [push, pull_request]
jobs:
ubuntu:
name: AMD64 ubuntu-18.04
runs-on: ubuntu-18.04
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install Dependency
run: |
./ci/scripts/install_deps.sh
go get github.com/golang/protobuf/protoc-gen-go@v1.3.2
- name: Cache Proxy Thirdparty
id: cache-proxy
uses: actions/cache@v2
with:
path: |
./proxy/cmake_build
key: ${{ runner.os }}-proxy-thirdparty
- name: Cache Core Thirdparty
id: cache-core
uses: actions/cache@v2
with:
path: |
./core/cmake_build
key: ${{ runner.os }}-core-thirdparty
- name: Cache SDK Thirdparty
id: cache-sdk
uses: actions/cache@v2
with:
path: |
./sdk/cmake_build
key: ${{ runner.os }}-sdk-thirdparty
- name: Build Cpp
run: |
./ci/scripts/proxy_build.sh -u
./ci/scripts/core_build.sh -u
./ci/scripts/sdk_build.sh -u
- name: Generat Proto GO File
run: |
echo `pwd`
export PATH=$PATH:$(go env GOPATH)/bin
export protoc=./proxy/cmake_build/thirdparty/grpc/grpc-build/third_party/protobuf/protoc-3.9.0.0
./ci/scripts/proto_gen_go.sh
- name: Build GO
run: |
go build -o ./cmd/writer ./writer/main.go
go build -o ./cmd/reader ./reader/main.go
go build -o ./cmd/master ./cmd/master.go
- name: Docker Pull And Run
run: |
docker-compose up -d
- name: Run Unittest
run: |
./ci/scripts/run_unittest.sh