forked from gogo/protobuf
-
Notifications
You must be signed in to change notification settings - Fork 2
46 lines (40 loc) · 1.24 KB
/
ci-workflow.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
name: Continuous Integration
on:
push:
branches:
- ghworkflow
pull_request:
branches:
- master
jobs:
build_and_test:
name: go ${{ matrix.go_version }} - pb-${{ matrix.protobuf_version }}
runs-on: ubuntu-latest
strategy:
matrix:
go_version: [1.15.x, 1.12.x]
protobuf_version: [3.14.0, 3.0.2, 2.6.1]
fail-fast: false
steps:
- name: Checkout branch
uses: actions/checkout@v1
with:
path: gopath/src/github.com/gogo/protobuf
fetch-depth: 5
- name: Setup go
uses: actions/setup-go@v1
with:
go-version: ${{ matrix.go_version }}
- name: Setup protoc
env:
PROTOBUF_VERSION: ${{ matrix.protobuf_version }}
run: ./install-protobuf.sh
- name: Protoc version
run: PATH=$HOME/bin:$PATH protoc --version
- name: env
run: env && go env && pwd
- name: Build server all
run: GOPATH=/home/runner/work/protobuf/gopath GOBIN=$GOPATH/bin PATH=$HOME/bin:$GOBIN:$PATH make buildserverall
- name: Diff check
if: matrix.protobuf_version == '3.14.0' && matrix.go_version == '1.15.x'
run: (! git status --porcelain | read || (git status; git diff; exit 1))