Commit Graph

28 Commits

Author SHA1 Message Date
Arturo Filastò
d6def35286
cli: add support for passing proxy command line parameter (#981)
This implements the bare minimum needed to have circumvention proxy support in OONI Probe CLI.

The reference issue is https://github.com/ooni/probe/issues/1955. (Most of that issue is implemented, save for the fact that currently we do not have support for `http` and `https` proxies.)

While there, add to `Makefile` a rule for correctly building `ooniprobe` and `miniooni` for "this system" (i.e., the default `GOOS` and `GOARCH` on a system), because we needed this for testing this patch and we needed to figure out the commands instead.
2022-11-15 09:55:05 +01:00
Simone Basso
196ac55493
fix: attempt to make linux builds faster (#911)
This work aims to make Linux builds faster to make https://github.com/ooni/probe/issues/2249 more convenient. Since those builds runs inside Docker, the problem to solve here is to save/restore the Go caches notwithstanding Docker. Because Docker runs as root, we need to modify the build a bit to run as a normal user. Otherwise, we will not be able to save the Go cache using actions/cache@v3. (Other approaches such as using `sudo` are possible but running the build as an unprivileged user actually looks cleaner, so I chose to do that.) While there, add a `.editorconfig`.
2022-08-30 21:13:33 +02:00
Simone Basso
d1b172f3ac
fix: attempt to make android builds faster (#909)
After https://github.com/ooni/probe-cli/pull/908, the Android
build has become super slow, because we build serially.

Attempt to make it faster by building in parallel.

Still part of https://github.com/ooni/probe/issues/2119, because
I don't feel happy with a super slow build.
2022-08-30 12:09:01 +02:00
Simone Basso
0d57899f46
feat: stop cross compiling miniooni (#908)
See https://github.com/ooni/probe/issues/2119

While there, shrink the Makefile to only export the minimum
set of rules to comfortable build using GHA.
2022-08-30 11:36:59 +02:00
Simone Basso
d48d44b880
feat: build miniooni and ooniprobe for android (#907)
This diff introduces a build script, makefile rules, and github actions
rules to build and public android CLI releases.

See https://github.com/ooni/probe/issues/1723
2022-08-30 09:37:15 +02:00
Simone Basso
9e38ee5135
feat: build ooniprobe for armv6 (#904)
Part of https://github.com/ooni/probe/issues/1753.

While there, introduce a rule by which, if the branch is named `fullbuild` we run all possible builds. It helps to test all the builds without creating a release branch. Because release branches are protected, they cannot be deleted easily. On the contrary, the `fullbuild` branch can easily be disposed of.
2022-08-29 17:33:42 +02:00
Simone Basso
342a74cad8
fix(MOBILE/android): make scripts monorepo compatible (#866)
This diff contains minor changes to make the build scripts in here
compatible with https://github.com/bassosimone/monorepo.

See 5e4c797380
2022-08-17 18:47:09 +02:00
Simone Basso
b7cc22bcbf
fix(Makefile): re-enable Android builds (#865)
It turns out the problem described in https://github.com/ooni/probe/issues/2122
only affects darwin/arm64, so we should be good to re-enable Android.
2022-08-17 17:17:35 +02:00
Simone Basso
2083edb258
cleanup: chmod -x mk && mv mk Makefile (#863)
While there, document what we need to document without mentioning too
many details about release builds, for which we have the Makefile.

See https://github.com/ooni/probe/issues/2218.
2022-08-17 13:46:41 +02:00
Simone Basso
839b51237d Temporarily remove goreleaser
For now, I'm fine with `./build.sh release`. When we'll be fully
written in Go, we'll explorer more perks.
2019-10-03 12:15:19 +02:00
Simone Basso
b9b555ba68 Integrate further with ooni/probe-engine: episode two (#46)
* utils/geoip.go: use github.com/ooni/probe-engine

Let's start using the engine by rewriting utils/geoip.go to
be just a thin wrapper around the engine functionality.

* Ready for review

* Checkpoint: the im tests are converted

Still have some doubts with respect to the variables that
are passed to MK via probe-engine. Will double check.

* fix(i/c/r/run.go): write the correct logic

* nettests: one more comment and also fix a format string

* Tweak previous

* progress

* Fix doofus

* better comment

* XXX => actionable comment

* Add glue to simplify test keys management

Making the concept of measurement more abstract in the engine is
not feasible because, when submitting a measurement, we need to
modify it to update the report ID and the measurement ID. Therefore,
returning a serialized measurement is not a good idea. We will
keep using a model.Measurement in the engine.

Changing model.Measurement.TestKeys's type from a `interface{}`
pointing to a well defined data structure to `map[string]interface{}`
is a regression because means that we are moving from code that
has a clear and defined structure to code that is more complicated
to parse and validate. Since we're already suffering havily from
the lack of a good schema, I'm not going to make the situation
worst by worsening the engine. At least for ndt7 and psiphon, we
now have a good schema and I don't want to lose that.

However, the current code in this repository is expecting the
test keys to be a `map[string]interface{}`. This choice was
dictated by the fact that we receive a JSON from Measurement Kit
and by the fact that there's not a clear schema.

To solve this tension, in this commit I am going to write glue
adapter code that makes sure that the TestKeys of a Measurement
are converted to `map[string]interface{}`. This will be done
using a type cast where possible and JSON serialization and parsing
otherwise. In a perfect world, glue is not a good idea, but in a
real world it may actually be useful.

When all tests in the engine will have a clear Go data structure,
we'll then remove the glue and just cast to the proper data
structure from `interface{}` where required.

* nettests/performance: use probe-engine

* go.{mod,sum}: upgrade to latest probe-engine

* nettests/middlebox: use ooni/probe-engine

* Update to the latest probe-engine

* web_connectivity: rewrite to use probe-engine

* Cosmetic change suggested by @hellais

* nettests/nettests.go: remove unused code

* nettests/nettests.go: fix progress

* nettests/nettests.go: remove go-measurement-kit code

* We don't depend on go-measurement-kit anymore

* Improve non-verbose output where possible

See also: https://github.com/measurement-kit/measurement-kit/issues/1856

* Make web_connectivity output pleasant

* Update to the latest probe-engine

* nettests/nettests.go: honour sharing settings

* Update to the latest probe-engine

* Use log.WithFields for probe-engine

* Update go.mod go.sum

* Revert "Update go.mod go.sum"

This reverts commit 5ecd38d8236f4a4e9b77ddb8e8a0d1e3cdd4b818.

* Revert "Revert "Update go.mod go.sum""

This reverts commit 6114b31eca98826112032776bd0feff02d763ecd.

* Upgrade ooni/probe-engine

* Unset GOPATH before running go build commands

* Dockefile: fix linux build by using latest

* Update to the latest ooni/probe-engine

```
go get -u github.com/ooni/probe-engine
go mod tidy
```

* Repair build
2019-08-15 18:08:43 +02:00
Arturo Filastò
eb4fec2f21 Add commands for making a release 2019-05-16 15:41:57 +02:00
Arturo Filastò
5134d9e0de Skip publish 2019-05-15 17:55:40 +02:00
Arturo Filastò
3f509370f2 Add release command 2019-05-15 17:55:11 +02:00
Simone Basso
9992690f8f Use MK v0.10.x, zap legacy GeoIP, build also on Linux (#29)
* Gopkg.lock: use MK v0.10.3

* ooni: stop using legacy GeoIP database files

* Some yak shaving of Makefile

1. remove now broken commands to download deps

2. also define the CXX cross compiler

* chore(dep): migrate from dep to go 1.11+ modules

See https://blog.callr.tech/migrating-from-dep-to-go-1.11-modules/

I need this to simplify my life in building for Travis.

* Introduce build.sh and repair build

In going forward, I believe we don't actually need a Makefile but I
didn't want to make such a radical change now.

* Another strategy wrt gopath

* travis: run regress tests on macOS

Closes #30
2019-05-15 15:48:06 +03:00
Arturo Filastò
9d014a2b63 Add build-all make target 2018-09-26 15:16:26 +02:00
Arturo Filastò
aabe55cc51 Update Makefile target for downloading libs 2018-09-11 12:39:47 +02:00
Arturo Filastò
c2ea0c2a63 Fix List* workflows and add unittests for them 2018-09-07 15:16:20 +02:00
Arturo Filastò
b75cee5e84 Progress on schema and fixing unittests 2018-09-06 16:13:04 +02:00
Arturo Filastò
22d5cd33a5 Update update-mk-libs make target 2018-05-31 08:00:42 +02:00
Arturo Filastò
c97217c49e Add support for building windows ooni.exe 2018-05-11 11:21:34 +02:00
Arturo Filastò
00859e87a6 Get web_connectivity to work with dynamic URL fetching 2018-03-23 12:41:06 +01:00
Arturo Filastò
75d639d771 Refactor directory structure 2018-03-22 15:58:10 +01:00
Will Scott
e47554cae2 remove the system go-bindata requirement.
close #1
close #3
2018-03-08 11:34:30 -08:00
Arturo Filastò
7cf5bd2718 Lay out the structure of nettests 2018-02-13 11:48:46 +02:00
Arturo Filastò
138b394cf0 Update bindata 2018-02-12 18:30:27 +02:00
Arturo Filastò
ca231bca9f Start fleshing out database related functions 2018-02-12 18:29:03 +02:00
Arturo Filastò
7327e1ff7f Start laying out the structure of gooni 2018-02-07 20:02:18 +02:00