Skip to content

Commit f7b241e

Browse files
committed
update travis ci build
1 parent d930f14 commit f7b241e

File tree

1 file changed

+28
-23
lines changed

1 file changed

+28
-23
lines changed

.travis.yml

Lines changed: 28 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,28 @@
11
language: go
22

3+
# go 1.13 is default on ubuntu 20.10 LTS
4+
# go 1.15 is the latest version, and the version used for the latest release
5+
36
go:
47
- "1.13"
8+
- "1.15"
59

610
os:
711
- linux
812
- osx
913

14+
# oniguruma 5.9.6 was the default for a long time, and has slightly different API
15+
# oniguruma 6.9.4 is the current default on ubuntu 20.10 LTS
16+
# oniguruma 6.9.5-rev1 is the latest version, and the version used for the latest release
17+
1018
env:
1119
matrix:
1220
- ONIG_VERSION=5.9.6 MODE=STATIC
13-
- ONIG_VERSION=6.7.0 MODE=STATIC
1421
- ONIG_VERSION=6.9.4 MODE=STATIC
15-
- ONIG_VERSION=6.9.4 MODE=DYNAMIC
16-
- ONIG_VERSION=DEFAULT
22+
- ONIG_VERSION=6.9.4 MODE=STATIC
23+
- ONIG_VERSION=6.9.5-rev1 MODE=STATIC
24+
- ONIG_VERSION=DEFAULT MODE=STATIC
25+
- ONIG_VERSION=DEFAULT MODE=DYNAMIC
1726

1827
before_install:
1928
- |
@@ -27,12 +36,21 @@ before_install:
2736
"DEFAULT")
2837
if [[ "$TRAVIS_OS_NAME" == "osx" ]] ; then
2938
brew update ;
30-
brew install fstab/oniguruma/oniguruma-5.9.6 ;
39+
brew install oniguruma ;
3140
elif [[ "$TRAVIS_OS_NAME" == "linux" ]] ; then
3241
sudo apt-get -qq update ;
3342
sudo apt-get install libonig-dev ;
3443
fi
3544
;;
45+
"6.9.5-rev1")
46+
PROJ_DIR=$(pwd) ;
47+
cd /tmp ;
48+
curl -sLO https://github.com/kkos/oniguruma/releases/download/v6.9.5_rev1/onig-6.9.5-rev1.tar.gz ;
49+
tar xfz onig-6.9.5-rev1.tar.gz ;
50+
cd onig-6.9.5 ;
51+
./configure && make && sudo make install ;
52+
cd "${PROJ_DIR}" ;
53+
;;
3654
*)
3755
PROJ_DIR=$(pwd) ;
3856
cd /tmp ;
@@ -62,7 +80,6 @@ script:
6280
else
6381
LDD_COMMAND="ldd" ;
6482
fi
65-
export GO111MODULE=on ;
6683
case "$MODE" in
6784
"STATIC")
6885
if [[ "$TRAVIS_OS_NAME" == "osx" ]] ;
@@ -78,31 +95,19 @@ script:
7895
fi ;
7996
./hack/smoke-test.sh ;
8097
;;
81-
*)
98+
"DYNAMIC")
8299
go test -failfast -count=1 -v ./... ;
83100
go install ;
84101
if ! $LDD_COMMAND $GOPATH/bin/grok_exporter | grep libonig ;
85102
then
86103
echo "ERROR: Expected dynamically linked binary." >&2 ;
87104
exit -1 ;
88105
fi ;
106+
./hack/smoke-test.sh ;
107+
;;
108+
*)
109+
echo "Unknown mode $MODE" >&2 ;
110+
exit 1 ;
89111
;;
90112
esac ;
91113
set +e ;
92-
93-
after_success:
94-
- |
95-
set -e ;
96-
set -x ;
97-
export GO111MODULE=on ;
98-
if [[ "$TRAVIS_OS_NAME" == "linux" && "$ONIG_VERSION" == "DEFAULT" ]] ;
99-
then
100-
go get golang.org/x/tools/cmd/cover github.com/mattn/goveralls github.com/modocache/gover ;
101-
go list ./... | while read package ;
102-
do
103-
go test -covermode count -coverprofile=$(basename $package).coverprofile $package ;
104-
done ;
105-
gover && goveralls -coverprofile=gover.coverprofile -service=travis-ci ;
106-
rm *.coverprofile ;
107-
fi ;
108-
set +e ;

0 commit comments

Comments
 (0)