File tree 3 files changed +49
-3
lines changed
3 files changed +49
-3
lines changed Original file line number Diff line number Diff line change
1
+ name : Continuous Integration
2
+ on :
3
+ push :
4
+ branches :
5
+ - ghworkflow
6
+ pull_request :
7
+ branches :
8
+ - master
9
+
10
+ jobs :
11
+ build_and_test :
12
+ name : go ${{ matrix.go_version }} - pb-${{ matrix.protobuf_version }}
13
+ runs-on : ubuntu-latest
14
+ strategy :
15
+ matrix :
16
+ go_version : [1.12.x, 1.11.x]
17
+ protobuf_version : [3.7.1, 3.0.2, 2.6.1]
18
+ fail-fast : false
19
+ steps :
20
+ - name : Checkout branch
21
+ uses : actions/checkout@v1
22
+ with :
23
+ path : gopath/src/github.com/gogo/protobuf
24
+ fetch-depth : 5
25
+
26
+ - name : Setup go
27
+ uses : actions/setup-go@v1
28
+ with :
29
+ go-version : ${{ matrix.go_version }}
30
+
31
+ - name : Setup protoc
32
+ env :
33
+ PROTOBUF_VERSION : ${{ matrix.protobuf_version }}
34
+ run : ./install-protobuf.sh
35
+
36
+ - name : Protoc version
37
+ run : PATH=$HOME/bin:$PATH protoc --version
38
+ - name : env
39
+ run : env && go env && pwd
40
+
41
+ - name : Build server all
42
+ run : GOPATH=/home/runner/work/protobuf/gopath GOBIN=$GOPATH/bin PATH=$HOME/bin:$GOBIN:$PATH make buildserverall
43
+
44
+ - name : Diff check
45
+ if : matrix.protobuf_version == '3.7.1' && matrix.go_version == '1.12.x'
46
+ run : (! git status --porcelain | read || (git status; git diff; exit 1))
Original file line number Diff line number Diff line change 7
7
- PROTOBUF_VERSION=3.9.1
8
8
9
9
before_install :
10
- - ./install-protobuf.sh
10
+ - HOME=/home/travis ./install-protobuf.sh
11
11
- PATH=/home/travis/bin:$PATH protoc --version
12
12
13
13
script :
Original file line number Diff line number Diff line change @@ -7,15 +7,15 @@ die() {
7
7
exit 1
8
8
}
9
9
10
- cd /home/travis
10
+ cd ${HOME}
11
11
12
12
case " $PROTOBUF_VERSION " in
13
13
2* )
14
14
basename=protobuf-$PROTOBUF_VERSION
15
15
wget https://github.com/google/protobuf/releases/download/v$PROTOBUF_VERSION /$basename .tar.gz
16
16
tar xzf $basename .tar.gz
17
17
cd protobuf-$PROTOBUF_VERSION
18
- ./configure --prefix=/home/travis && make -j2 && make install
18
+ ./configure --prefix=${HOME} && make -j2 && make install
19
19
;;
20
20
3* )
21
21
basename=protoc-$PROTOBUF_VERSION -linux-x86_64
You can’t perform that action at this time.
0 commit comments