Commit Graph

14 Commits

Author SHA1 Message Date
Simone Basso
7f0fb5e619
feat: publish miniooni binaries into releases (#607)
This is the miniooni related part of https://github.com/ooni/probe/issues/1879.

This diff will require backport to the release/3.11 branch.
2021-11-22 13:40:36 +01:00
Simone Basso
638acb0830
fix: build ooniprobe for linux using debian/amd64 (#552) (#553)
In https://github.com/ooni/probe/issues/1741, we observed that
every attempt to use `docker --platform` along with `debian` for
packaging ooniprobe fails with `SEGFAULT`, except when using
the `debian:oldstable` container.

To fix this issue, in this diff we fix Debian packaging to run on
any debian system (`debian:stable` in our case) provided that we
have `qemu-user-static` installed on the system and the system is
a Debian (or Debian-derived) system.

The trick here is to use `dpkg-buildpackage -a $deb_arch`. We
also need to disable a few `debian/rules` that we don't actually
need anyway.

Closes https://github.com/ooni/probe/issues/1741.

This cherry-picks 36a5bf34f99f382a081efd642dd472888a57602b
from the stable branch into the master branch.
2021-10-22 15:14:11 +02:00
Simone Basso
e9da23f123
fix(debian): make sure we can publish all archs (#350)
We are mostly good to declare a stable release. We still need to deal with https://github.com/ooni/probe/issues/1484.

In this PR, we fix the aforementioned issue. These are the changes:

1. we remove the vendored `debops-ci`, and we pull it directly from `ooni/sysadmin`
2. we introduce a new script, `./CLI/linux/pubdebian`, to publish packages
3. we modify `./mk` to allow for publishing debian packages built outside of CI

The latter point has been quite useful in debugging what was wrong.
2021-05-19 13:54:19 +02:00
Simone Basso
f77f54bcc9
feat: build and publish debian/{armhf,i386} (#344)
* feat: build and publish debian/{armhf,i386}

Part of https://github.com/ooni/probe/issues/807

* zap temporary build
2021-05-11 20:16:27 +02:00
Simone Basso
b2209bb637
refactor: replace ./make (python3) with ./mk (makefile) (#343)
This pull request fixes https://github.com/ooni/probe/issues/1471. We have replaced the original build script (`./make`) with the `./mk` makefile (executable using `#!/usr/bin/make -f`). We concluded supporting direct builds from Windows is not worth the effort and halving the code we need to maintain is probably a good plus. Both macOS and Linux install GNU make at `/usr/bin/make`, so we should be okay in the common use cases.

I significantly simplified the management of Go versioning by requiring the user to manage it and by enforcing that we are using the desired Go version. This speeds up builds and works in sane operating systems that use the last version of a specific package. Otherwise, it's possible to use the `go get golang.org/dl/go${version}` feature.

The remaining question mark was related to updating the Android SDK. I have determined that a good course of action is pinning to the latest CLI tools and always forcing the CLI tools to install the latest required packages (e.g., the NDK).
2021-05-11 16:15:13 +02:00
Simone Basso
3109d56aef
feat(gha): build debian package using ./make (#331)
Part of https://github.com/ooni/probe/issues/1466. We're building both `arm64` and `amd64`. We are still not publishing `arm64` packages, which is what is asked in the original issue, but we're really close to doing that.
2021-05-06 22:13:09 +02:00
Simone Basso
c258a0fedd
CLI, debian, make: misc cleanup and changes (#336)
This PR	groups misc cleanup and changes from https://github.com/ooni/probe-cli/pull/331.

* CLI/linux/build: add documentation

* debian/.gitignore: ignore generated files

* debian/TODO: unnecessary at this point

* debian/ooniprobe-cli.service: remove commented out lines

* debian/rules: remove unnecessary actions

* make: reindent and fix spelling

* smoketest.sh: don't run in verbose mode

Part of https://github.com/ooni/probe/issues/1466
2021-05-06 21:20:45 +02:00
Simone Basso
0f98caf3b4
feat(make): sign more generated binaries (#330)
* doc(make): add not about qemu-user-static

While still investigating https://github.com/ooni/probe/issues/1466

* feat(make): sign more generated binaries

While there, fix an annoying bug where the context manager
was suppressing exceptions that occurred.

Work part of https://github.com/ooni/probe/issues/1466.
2021-05-05 14:26:19 +02:00
Simone Basso
eb43c7994a
feat(make): build ooniprobe for darwin, windows, and linux (#328)
In https://github.com/ooni/probe/issues/1466, a user is asking
about arm64 builds for Debian. We already had some code for that
in https://github.com/ooni/probe-cli/pull/311. Let us adapt the
code to the `./make` script to have arm64 builds.

While there, also adapt the code for darwin and windows.
2021-05-05 12:12:34 +02:00
Simone Basso
764293795e
feat(make): build miniooni (#322)
This change is useful to move forward with blessing a new
release (https://github.com/ooni/probe/issues/1439).
2021-04-29 19:24:25 +02:00
Simone Basso
90d15c1c09
refactor: build miniooni from toplevel (#203)
* refactor: build miniooni from toplevel

Of course, also move the specific test checking whether we are
still able of building miniooni.

Part of https://github.com/ooni/probe/issues/1335

* build for current branch just to confirm

* fix: correct the path where linux/arm binary is

* okay, it works, we can remove the special rule
2021-02-02 15:34:03 +01:00
Simone Basso
4b557a0899
build.sh: build windows/386 and linux/386, update Debian packaging (#193)
* feat(build.sh): build for windows/386

Part of https://github.com/ooni/probe/issues/1315

* fix(build.sh): docker pull so we have latest image

Part of https://github.com/ooni/probe/issues/1315

* fix(build.sh): apk update && apk upgrade to have latest packages

It does not currently seem necessary. But let's be defensive.

Part of https://github.com/ooni/probe/issues/1315.

* fix(windows.yml): for now disable windows/386

It's working locally but not remotely on Windows. We need to
figure out how to install the 386 compiler.

Part of https://github.com/ooni/probe/issues/1315.

* feat(build.sh): build for windows/386

Part of https://github.com/ooni/probe/issues/1315.

* fix(linux.yml): try to enable experimental docker flags

Related to https://github.com/ooni/probe/issues/1315.

See also https://github.com/actions/virtual-environments/issues/368#issuecomment-713588127.

* fix(debian): try to have single workflow with experimental docker

More commits probably needed.

Part of https://github.com/ooni/ooni.org/issues/677.

* remove restriction on the branch name

* maybe we need a pattern also for branches

* less stringent constraints

* consolidated debian workflow into a single workflow

* further fix the debian workflow

* only run debian action for specific branches or tags

* fix(build.sh): package the 386 windows version properly
2021-01-20 13:09:37 +01:00
Simone Basso
770a822fd4 fix(build.sh): name macOS files after the darwin platform
This was what we used to do in the past. Spotted by @sarathms.
2020-08-24 19:24:46 +02:00
Simone Basso
4c65147009
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
2020-08-22 11:20:50 +02:00