milvus/.github/workflows/main.yaml

67 lines
1.9 KiB
YAML

name: Build and test
# TODO: do not trigger action for some document file update
# This workflow is triggered on pushes or pull request to the repository.
on:
push:
# file paths to consider in the event. Optional; defaults to all.
paths:
- 'scripts/**'
- 'internal/**'
- 'cmd/**'
- '.github/workflows/main.yml'
- docker-compose.yml
- '!**.md'
- '!**_test.go'
pull_request:
# file paths to consider in the event. Optional; defaults to all.
paths:
- 'scripts/**'
- 'internal/**'
- 'cmd/**'
- '.github/workflows/main.yml'
- docker-compose.yml
- '!**.md'
- '!**_test.go'
jobs:
ubuntu:
name: AMD64 ubuntu-18.04
runs-on: ubuntu-18.04
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install Dependency
run: |
./scripts/install_deps.sh
go get github.com/golang/protobuf/protoc-gen-go@v1.3.2
- name: Cache Core Thirdparty
id: cache-core
uses: actions/cache@v2
with:
path: |
./internal/core/cmake_build
key: ${{ runner.os }}-core-thirdparty
- name: Build Cpp
run: |
./scripts/core_build.sh -u
- name: Generat Proto GO File
run: |
echo `pwd`
pwd_dir=`pwd`
export PATH=$PATH:$(go env GOPATH)/bin
export protoc=${pwd_dir}/internal/core/cmake_build/thirdparty/protobuf/protobuf-build/protoc
./scripts/proto_gen_go.sh
- name: Build GO
run: |
go build -o ./cmd/writer/writer ./cmd/writer/writer.go
go build -o ./cmd/reader/reader ./cmd/reader/reader.go
go build -o ./cmd/master/master ./cmd/master/master.go
go build -o ./cmd/proxy/proxy ./cmd/proxy/proxy.go
- name: Docker Pull And Run
run: |
docker-compose up -d
- name: Run Unittest
run: |
./scripts/run_unittest.sh