Skip to content

Commit

Permalink
Merge pull request #88 from ooni/release/3.0.0-rc.4
Browse files Browse the repository at this point in the history
Release 3.0.0-rc.4
  • Loading branch information
bassosimone authored Dec 27, 2019
2 parents 7d97e31 + 6cccfeb commit 265177a
Show file tree
Hide file tree
Showing 10 changed files with 276 additions and 140 deletions.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
/dist
/testdata/gotmp
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/dist
/ooni.cov
/coverage.txt
/coverage.cov
/testdata/gotmp
*.njson
.DS_Store
6 changes: 0 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,6 @@ dist: xenial
language: minimal
services:
- docker
env:
- OS_NAME: linux
before_script:
- go get golang.org/x/tools/cmd/cover
- go get github.com/mattn/goveralls
script:
- ./build.sh _travis-${TRAVIS_OS_NAME}
- $GOPATH/bin/goveralls -coverprofile=coverage.cov -service=travis-ci
- ./scripts/travis_test.sh
1 change: 0 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
FROM openobservatory/mk-alpine:latest
RUN apk add --no-progress git go
ADD . /oonibuild
31 changes: 23 additions & 8 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,7 @@ if [ "$1" = "windows" ]; then

elif [ "$1" = "linux" ]; then
set -x
docker build -t oonibuild .
docker run -v `pwd`:/oonibuild -w /oonibuild -t --cap-drop=all \
--user `id -u`:`id -g` -e 'GOCACHE=/tmp/go/cache' -e 'GOPATH=/tmp/go/path' \
oonibuild \
go build $buildtags -ldflags="$ldflags" \
$0 __docker go build $buildtags -ldflags="$ldflags" \
-o dist/linux/amd64/ooniprobe -v ./cmd/ooniprobe

elif [ "$1" = "macos" ]; then
Expand All @@ -47,12 +43,31 @@ elif [ "$1" = "release" ]; then
echo ""
echo "Now sign ooniprobe_checksums.txt and upload it along with tarballs to GitHub"

elif [ "$1" = "__docker" ]; then
set -x
shift
docker build -t oonibuild .
docker run -v `pwd`:/oonibuild \
-w /oonibuild \
-t \
--cap-drop=all \
--user `id -u`:`id -g` \
-e 'GOCACHE=/oonibuild/testdata/gotmp/cache' \
-e 'GOPATH=/oonibuild/testdata/gotmp/path' \
-e "TRAVIS_JOB_ID=$TRAVIS_JOB_ID" \
-e "TRAVIS_PULL_REQUEST=$TRAVIS_PULL_REQUEST" \
oonibuild "$@"

elif [ "$1" = "_travis-linux" ]; then
set -x
$0 linux
# TODO -race does not work on alpine. See: https://travis-ci.org/ooni/probe-cli/builds/619631256#L962
docker run -v `pwd`:/oonibuild -w /oonibuild -t oonibuild \
go test -v -coverprofile=coverage.cov -coverpkg=./... ./...
# TODO -race does not work on alpine.
# See: https://travis-ci.org/ooni/probe-cli/builds/619631256#L962
$0 __docker go get -v golang.org/x/tools/cmd/cover
$0 __docker go get -v github.com/mattn/goveralls
$0 __docker go test -v -coverprofile=coverage.cov -coverpkg=./... ./...
$0 __docker /oonibuild/testdata/gotmp/path/bin/goveralls \
-coverprofile=coverage.cov -service=travis-ci

elif [ "$1" = "_travis-osx" ]; then
set -x
Expand Down
24 changes: 10 additions & 14 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,19 @@ go 1.12
require (
github.com/alecthomas/kingpin v2.2.6+incompatible
github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751 // indirect
github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4 // indirect
github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d // indirect
github.com/apex/log v1.1.1
github.com/certifi/gocertifi v0.0.0-20180118203423-deb3ae2ef261 // indirect
github.com/certifi/gocertifi v0.0.0-20191021191039-0944d244cd40 // indirect
github.com/fatih/color v1.7.0
github.com/getsentry/raven-go v0.0.0-20190419175539-919484f041ea
github.com/go-sql-driver/mysql v1.4.1 // indirect
github.com/gobuffalo/packr v1.25.0 // indirect
github.com/kr/pty v1.1.8 // indirect
github.com/lib/pq v1.1.1 // indirect
github.com/mattn/go-colorable v0.1.2
github.com/mattn/go-sqlite3 v1.10.0 // indirect
github.com/ooni/probe-engine v0.2.1-0.20191114165804-831e879ea56a
github.com/mattn/go-colorable v0.1.4
github.com/mattn/go-isatty v0.0.11 // indirect
github.com/ooni/probe-engine v0.3.0
github.com/pkg/errors v0.8.1
github.com/rubenv/sql-migrate v0.0.0-20190327083759-54bad0a9b051
github.com/ziutek/mymysql v1.5.4 // indirect
google.golang.org/appengine v1.6.1 // indirect
gopkg.in/AlecAivazis/survey.v1 v1.8.4
gopkg.in/gorp.v1 v1.7.2 // indirect
upper.io/db.v3 v3.5.7+incompatible
github.com/rubenv/sql-migrate v0.0.0-20191213152630-06338513c237
golang.org/x/sys v0.0.0-20191224085550-c709ea063b76 // indirect
gopkg.in/AlecAivazis/survey.v1 v1.8.7
gopkg.in/mgo.v2 v2.0.0-20190816093944-a6b53ec6cb22 // indirect
upper.io/db.v3 v3.6.3+incompatible
)
Loading

0 comments on commit 265177a

Please sign in to comment.