WIP: Start preparing release v3.0.7 (#147)

* Use ooni/probe-engine 0.16.0
* Update all the other dependencies
* Use GitHub Actions rather than Travis CI
* Automatically build and test binaries on the target OS (for Windows, macOS, Linux on amd64)
* Make sure we correctly measure coverage
* Make sure we use `-race` when running tests
* Remove unnecessary scripts
* Make sure the README is up-to-date
* Write small script to update binary data and add GitHub Actions checks for it
* Notice that we needed to run ./updatebindata.sh and run it
* Self documenting instructions regarding cross compiling
* Set version number to v3.0.7-beta

Part of https://github.com/ooni/probe-engine/issues/748
This commit is contained in:
Simone Basso 2020-08-22 11:20:50 +02:00 committed by GitHub
commit 4c65147009
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
23 changed files with 416 additions and 242 deletions

View file

@ -4,11 +4,13 @@ The next generation OONI Probe Command Line Interface.
## User setup
1. Go [into the releases](https://github.com/ooni/probe-cli/releases) and download the release for your architecture and platform
1. Go [into the releases](https://github.com/ooni/probe-cli/releases) and download the
release for your architecture and platform
2. Extract the tarball with `tar xvzf ooniprobe_*.tar.gz`
3. Copy the `ooniprobe` binary into a location in your `$PATH`, for example `/usr/local/bin/ooniprobe`
3. Copy the `ooniprobe` binary into a location in your `$PATH`, for example
`/usr/local/bin/ooniprobe`
4. Run `ooniprobe run` to perform all the tests
@ -16,19 +18,22 @@ Optional:
Add a crontab entry (on linux) to run `ooniprobe` daily at a random time:
```
```bash
(crontab -l 2>/dev/null; echo "$(( ( RANDOM % 60 ) + 1 )) $(( ( RANDOM % 24 ) + 1 )) * * * ooniprobe run") | crontab -
```
On macOS you can configure OONI Probe to run automatically using launchd.
Below is a sample launchd script, that should be placed inside of `~/Library/LaunchAgents/org.ooni.probe.cli.plist`.
Below is a sample launchd script, that should be placed inside of
`~/Library/LaunchAgents/org.ooni.probe.cli.plist`.
Be sure to replace `/PATH/TO/BINARY/ooniprobe` with the actual install location of the `ooniprobe` binary and `/PATH/TO/CONFIG/config-100sites.json` with the location of a file which limits the testing to 100 URLs.
Be sure to replace `/PATH/TO/BINARY/ooniprobe` with the actual install location of the
`ooniprobe` binary and `/PATH/TO/CONFIG/config-100sites.json` with the location of a file
which limits the testing to 100 URLs.
You may also want to adjust the locations of the logs.
```
```xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
@ -62,25 +67,40 @@ You may also want to adjust the locations of the logs.
</plist>
```
Once you have written the file, you can enable to run automatically by doing: `launchctl load org.ooni.probe.cli.plist`.
Once you have written the file, you can enable `ooniprobe` to run automatically by
doing: `launchctl load org.ooni.probe.cli.plist`.
## Development setup
Be sure you have golang >= 1.14. We use golang modules. Run
Be sure you have golang >= 1.14 and a C compiler (when developing for Windows, you
need Mingw-w64 installed). The most basic build command is:
```bash
go build -v ./cmd/ooniprobe
```
To compile a release used the `build.sh` script. For more information
```bash
./build.sh help
```
to get information on the supported systems as well as to get
instructions on how to install dependencies.
The output generated by this command should provide you with updated information
regarding the pre-requisites for building (and cross-building) `ooniprobe` as well
as useful information regarding cross compiling.
To update bundled binary data use:
```bash
./updatebindata.sh
```
## Updating dependencies
1. update every direct dependency in `go.mod` except `probe-engine`
using `go get -u -v $dependency`:
```
```bash
for name in `grep -v indirect go.mod | grep -v probe-engine | awk '/^\t/{print $1}'`; do \
go get -u -v $name; \
done
@ -99,10 +119,9 @@ a specific version of psiphon and of its dependencies.
## Releasing
Make sure you have updated dependencies. Specifically, make sure
you update homebrew to get the latest Measurement Kit. Then:
Make sure you have updated dependencies. Then run
```
```bash
./build.sh release
```