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.
This commit is contained in:
Simone Basso 2022-08-30 11:36:59 +02:00 committed by GitHub
parent d48d44b880
commit 0d57899f46
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 111 additions and 323 deletions

View File

@ -1,4 +1,4 @@
# Builds and publishes Android packages
# Builds and publishes Android packages and binaries
name: android
on:
push:
@ -35,8 +35,8 @@ jobs:
PSIPHON_CONFIG_KEY: ${{ secrets.PSIPHON_CONFIG_KEY }}
PSIPHON_CONFIG_JSON_AGE_BASE64: ${{ secrets.PSIPHON_CONFIG_JSON_AGE_BASE64 }}
- run: make ./MOBILE/android
- run: make ./CLI/android
- run: make MOBILE/android
- run: make CLI/android
- run: |
tag=$(echo $GITHUB_REF | sed 's|refs/tags/||g')

View File

@ -34,7 +34,7 @@ jobs:
PSIPHON_CONFIG_KEY: ${{ secrets.PSIPHON_CONFIG_KEY }}
PSIPHON_CONFIG_JSON_AGE_BASE64: ${{ secrets.PSIPHON_CONFIG_JSON_AGE_BASE64 }}
- run: make EXPECTED_XCODE_VERSION=12.4 ./MOBILE/ios
- run: make EXPECTED_XCODE_VERSION=12.4 MOBILE/ios
- run: |
tag=$(echo $GITHUB_REF | sed 's|refs/tags/||g')

View File

@ -1,4 +1,4 @@
# Builds and publishes ooniprobe for Linux
# Builds and publishes ooniprobe and miniooni for Linux
name: linux
on:
push:
@ -23,12 +23,12 @@ jobs:
env:
PSIPHON_CONFIG_KEY: ${{ secrets.PSIPHON_CONFIG_KEY }}
PSIPHON_CONFIG_JSON_AGE_BASE64: ${{ secrets.PSIPHON_CONFIG_JSON_AGE_BASE64 }}
- run: make ./CLI/ooniprobe-linux-386
- run: make CLI/linux-static-386
- run: ./E2E/ooniprobe.sh ./CLI/ooniprobe-linux-386
- run: |
tag=$(echo $GITHUB_REF | sed 's|refs/tags/||g')
gh release create -p $tag --target $GITHUB_SHA || true
gh release upload $tag --clobber ./CLI/ooniprobe-linux-386
gh release upload $tag --clobber ./CLI/ooniprobe-linux-386 ./CLI/miniooni-linux-386
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@ -48,12 +48,12 @@ jobs:
env:
PSIPHON_CONFIG_KEY: ${{ secrets.PSIPHON_CONFIG_KEY }}
PSIPHON_CONFIG_JSON_AGE_BASE64: ${{ secrets.PSIPHON_CONFIG_JSON_AGE_BASE64 }}
- run: make ./CLI/ooniprobe-linux-amd64
- run: make CLI/linux-static-amd64
- run: ./E2E/ooniprobe.sh ./CLI/ooniprobe-linux-amd64
- run: |
tag=$(echo $GITHUB_REF | sed 's|refs/tags/||g')
gh release create -p $tag --target $GITHUB_SHA || true
gh release upload $tag --clobber ./CLI/ooniprobe-linux-amd64
gh release upload $tag --clobber ./CLI/ooniprobe-linux-amd64 ./CLI/miniooni-linux-amd64
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@ -74,12 +74,12 @@ jobs:
env:
PSIPHON_CONFIG_KEY: ${{ secrets.PSIPHON_CONFIG_KEY }}
PSIPHON_CONFIG_JSON_AGE_BASE64: ${{ secrets.PSIPHON_CONFIG_JSON_AGE_BASE64 }}
- run: make ./CLI/ooniprobe-linux-armv6
- run: make CLI/linux-static-armv6
- run: ./E2E/ooniprobe.sh ./CLI/ooniprobe-linux-armv6
- run: |
tag=$(echo $GITHUB_REF | sed 's|refs/tags/||g')
gh release create -p $tag --target $GITHUB_SHA || true
gh release upload $tag --clobber ./CLI/ooniprobe-linux-armv6
gh release upload $tag --clobber ./CLI/ooniprobe-linux-armv6 ./CLI/miniooni-linux-armv6
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@ -100,12 +100,12 @@ jobs:
env:
PSIPHON_CONFIG_KEY: ${{ secrets.PSIPHON_CONFIG_KEY }}
PSIPHON_CONFIG_JSON_AGE_BASE64: ${{ secrets.PSIPHON_CONFIG_JSON_AGE_BASE64 }}
- run: make ./CLI/ooniprobe-linux-armv7
- run: make CLI/linux-static-armv7
- run: ./E2E/ooniprobe.sh ./CLI/ooniprobe-linux-armv7
- run: |
tag=$(echo $GITHUB_REF | sed 's|refs/tags/||g')
gh release create -p $tag --target $GITHUB_SHA || true
gh release upload $tag --clobber ./CLI/ooniprobe-linux-armv7
gh release upload $tag --clobber ./CLI/ooniprobe-linux-armv7 ./CLI/miniooni-linux-armv7
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@ -126,12 +126,12 @@ jobs:
env:
PSIPHON_CONFIG_KEY: ${{ secrets.PSIPHON_CONFIG_KEY }}
PSIPHON_CONFIG_JSON_AGE_BASE64: ${{ secrets.PSIPHON_CONFIG_JSON_AGE_BASE64 }}
- run: make ./CLI/ooniprobe-linux-arm64
- run: make CLI/linux-static-arm64
- run: ./E2E/ooniprobe.sh ./CLI/ooniprobe-linux-arm64
- run: |
tag=$(echo $GITHUB_REF | sed 's|refs/tags/||g')
gh release create -p $tag --target $GITHUB_SHA || true
gh release upload $tag --clobber ./CLI/ooniprobe-linux-arm64
gh release upload $tag --clobber ./CLI/ooniprobe-linux-arm64 ./CLI/miniooni-linux-arm64
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@ -34,7 +34,7 @@ jobs:
PSIPHON_CONFIG_KEY: ${{ secrets.PSIPHON_CONFIG_KEY }}
PSIPHON_CONFIG_JSON_AGE_BASE64: ${{ secrets.PSIPHON_CONFIG_JSON_AGE_BASE64 }}
- run: make ./CLI/ooniprobe-darwin
- run: make CLI/darwin
- run: ./E2E/ooniprobe.sh ./CLI/ooniprobe-darwin-amd64
@ -42,7 +42,9 @@ jobs:
tag=$(echo $GITHUB_REF | sed 's|refs/tags/||g')
gh release create -p $tag --target $GITHUB_SHA || true
gh release upload $tag --clobber ./CLI/ooniprobe-darwin-amd64 \
./CLI/ooniprobe-darwin-arm64
./CLI/ooniprobe-darwin-arm64 \
./CLI/miniooni-darwin-amd64 \
./CLI/miniooni-darwin-arm64
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@ -1,104 +0,0 @@
# This workflow checks whether we can build the research client miniooni
# and publishes the linux binaries as artifacts and, if we're building
# a tag, into the current release. We don't publish artifacts for
# Windows and macOS because they're not signed. For releases, we have
# a script that we'll later use to sign unsigned binaries.
name: miniooni
on:
push:
branches:
- "master"
- "release/**"
- "fullbuild"
tags:
- "v*"
jobs:
build_and_publish:
runs-on: ubuntu-20.04
permissions: # See https://github.com/ooni/probe/issues/2154
contents: write
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Get GOVERSION content
id: goversion
run: echo ::set-output name=version::$(cat GOVERSION)
- uses: actions/setup-go@v3
with:
go-version: "${{ steps.goversion.outputs.version }}"
- run: |
echo -n $PSIPHON_CONFIG_KEY > ./internal/engine/psiphon-config.key
echo $PSIPHON_CONFIG_JSON_AGE_BASE64 | base64 -d > ./internal/engine/psiphon-config.json.age
env:
PSIPHON_CONFIG_KEY: ${{ secrets.PSIPHON_CONFIG_KEY }}
PSIPHON_CONFIG_JSON_AGE_BASE64: ${{ secrets.PSIPHON_CONFIG_JSON_AGE_BASE64 }}
- run: make ./CLI/miniooni
- run: ./E2E/miniooni.bash ./CLI/miniooni-linux-amd64
- uses: actions/upload-artifact@v1
with:
name: miniooni-darwin-amd64
path: ./CLI/miniooni-darwin-amd64
- uses: actions/upload-artifact@v1
with:
name: miniooni-darwin-arm64
path: ./CLI/miniooni-darwin-arm64
- uses: actions/upload-artifact@v1
with:
name: miniooni-linux-386
path: ./CLI/miniooni-linux-386
- uses: actions/upload-artifact@v1
with:
name: miniooni-linux-amd64
path: ./CLI/miniooni-linux-amd64
- uses: actions/upload-artifact@v1
with:
name: miniooni-linux-armv6
path: ./CLI/miniooni-linux-armv6
- uses: actions/upload-artifact@v1
with:
name: miniooni-linux-armv7
path: ./CLI/miniooni-linux-armv7
- uses: actions/upload-artifact@v1
with:
name: miniooni-linux-arm64
path: ./CLI/miniooni-linux-arm64
- uses: actions/upload-artifact@v1
with:
name: miniooni-windows-386.exe
path: ./CLI/miniooni-windows-386.exe
- uses: actions/upload-artifact@v1
with:
name: miniooni-windows-amd64.exe
path: ./CLI/miniooni-windows-amd64.exe
- run: |
tag=$(echo $GITHUB_REF | sed 's|refs/tags/||g')
gh release create -p $tag --target $GITHUB_SHA || true
gh release upload $tag --clobber ./CLI/miniooni-darwin-amd64 \
./CLI/miniooni-darwin-arm64 \
./CLI/miniooni-linux-386 \
./CLI/miniooni-linux-amd64 \
./CLI/miniooni-linux-armv6 \
./CLI/miniooni-linux-armv7 \
./CLI/miniooni-linux-arm64 \
./CLI/miniooni-windows-386.exe \
./CLI/miniooni-windows-amd64.exe
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@ -32,18 +32,28 @@ jobs:
PSIPHON_CONFIG_KEY: ${{ secrets.PSIPHON_CONFIG_KEY }}
PSIPHON_CONFIG_JSON_AGE_BASE64: ${{ secrets.PSIPHON_CONFIG_JSON_AGE_BASE64 }}
- run: make EXPECTED_MINGW_W64_VERSION="9.3-win32" ./CLI/ooniprobe-windows
- run: make EXPECTED_MINGW_W64_VERSION="9.3-win32" CLI/windows
- uses: actions/upload-artifact@v2
with:
name: ooniprobe-windows-amd64.exe
path: ./CLI/ooniprobe-windows-amd64.exe
- uses: actions/upload-artifact@v2
with:
name: miniooni-windows-amd64.exe
path: ./CLI/miniooni-windows-amd64.exe
- uses: actions/upload-artifact@v2
with:
name: ooniprobe-windows-386.exe
path: ./CLI/ooniprobe-windows-386.exe
- uses: actions/upload-artifact@v2
with:
name: miniooni-windows-386.exe
path: ./CLI/miniooni-windows-386.exe
test:
needs: build
runs-on: "windows-2019"
@ -65,17 +75,30 @@ jobs:
steps:
- uses: actions/checkout@v2
- uses: actions/download-artifact@v2
with:
name: ooniprobe-windows-amd64.exe
- uses: actions/download-artifact@v2
with:
name: miniooni-windows-amd64.exe
- uses: actions/download-artifact@v2
with:
name: ooniprobe-windows-386.exe
- uses: actions/download-artifact@v2
with:
name: miniooni-windows-386.exe
- run: |
tag=$(echo $GITHUB_REF | sed 's|refs/tags/||g')
gh release create -p $tag --target $GITHUB_SHA || true
gh release upload $tag --clobber ooniprobe-windows-386.exe \
ooniprobe-windows-amd64.exe
ooniprobe-windows-amd64.exe \
miniooni-windows-386.exe
miniooni-windows-amd64.exe
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@ -12,6 +12,9 @@ export CGO_ENABLED=1
export GOARM=$GOARM
export GOOS=$GOOS
export GOARCH=$GOARCH
go build -o ./CLI/$PRODUCT-$GOOS-$OONIARCH \
-ldflags='-s -w -extldflags "-static"' \
$GOLANG_EXTRA_FLAGS $PACKAGE
for PACKAGE in $@; do
PRODUCT=$(basename $PACKAGE)
go build -o ./CLI/$PRODUCT-$GOOS-$OONIARCH \
-ldflags='-s -w -extldflags "-static"' \
$GOLANG_EXTRA_FLAGS $PACKAGE
done

View File

@ -2,11 +2,11 @@
set -euo pipefail
if [[ $# -ne 2 ]]; then
if [[ $# -lt 2 ]]; then
echo "" 1>&2
echo "Compiler for a Go PACKAGE producing static linux/OONIARCH binaries." 1>&2
echo "" 1>&2
echo "usage: $0 OONIARCH PACKAGE" 1>&2
echo "usage: $0 OONIARCH PACKAGE..." 1>&2
echo "" 1>&2
echo "OONIARCH must be one of: 386, amd64, arm64, armv6, armv7." 1>&2
echo "" 1>&2
@ -26,7 +26,7 @@ fi
GOLANG_DOCKER_IMAGE=golang:$(cat GOVERSION)-alpine
GOOS=linux
OONIARCH=$1
PACKAGE=$2
shift
if [[ $OONIARCH == armv7 ]]; then
GOARCH=arm
@ -49,14 +49,12 @@ else
OONI_PSIPHON_TAGS=""
fi
PRODUCT=$(basename $PACKAGE)
set -x
docker pull --platform linux/$DOCKER_ARCH $GOLANG_DOCKER_IMAGE
docker run --platform linux/$DOCKER_ARCH -e PRODUCT=$PRODUCT \
docker run --platform linux/$DOCKER_ARCH \
-e GOARM=$GOARM -e GOOS=$GOOS -e GOARCH=$GOARCH \
-e PACKAGE=$PACKAGE -e OONI_PSIPHON_TAGS=$OONI_PSIPHON_TAGS \
-e OONI_PSIPHON_TAGS=$OONI_PSIPHON_TAGS \
-e OONIARCH=$OONIARCH -e GOLANG_EXTRA_FLAGS="${GOLANG_EXTRA_FLAGS:-}" \
-v $(pwd):/ooni -w /ooni $GOLANG_DOCKER_IMAGE ./CLI/go-build-alpine
-v $(pwd):/ooni -w /ooni $GOLANG_DOCKER_IMAGE ./CLI/go-build-alpine "$@"

View File

@ -42,12 +42,15 @@ else
OONI_PSIPHON_TAGS=""
fi
MAYBE_ANDROID_API=""
if [[ $TARGET == "android" ]]; then
ANDROID_HOME=$(./MOBILE/android/home)
NDK_VERSION=$(cat NDKVERSION)
ANDROID_NDK_HOME=$ANDROID_HOME/ndk/$NDK_VERSION
MAYBE_ANDROID_API="-androidapi 21"
else
ANDROID_HOME=""
ANDROID_NDK_HOME=""
MAYBE_ANDROID_API=""
fi
PRODUCT=$(basename $PACKAGE)

235
Makefile
View File

@ -38,7 +38,7 @@ GIT_CLONE_DIR = $(HOME)/.ooniprobe-build/src
#help: repository. If you do not have the permission to
#help: clone it, just clear this variable, e.g.:
#help:
#help: make OONI_PSIPHON_TAGS="" ./CLI/miniooni
#help: make OONI_PSIPHON_TAGS="" CLI/miniooni
OONI_PSIPHON_TAGS = ooni_psiphon_config
#quickhelp:
@ -50,10 +50,10 @@ show-config:
@echo "OONI_PSIPHON_TAGS=$(OONI_PSIPHON_TAGS)"
#help:
#help: The `make ./CLI/android` command builds miniooni and ooniprobe for
#help: The `make CLI/android` command builds miniooni and ooniprobe for
#help: all the supported Android architectures.
.PHONY: ./CLI/android
./CLI/android: search/for/go search/for/android/sdk maybe/copypsiphon
.PHONY: CLI/android
CLI/android: search/for/go search/for/android/sdk maybe/copypsiphon
./CLI/go-build-android 386 ./internal/cmd/miniooni
./CLI/go-build-android 386 ./cmd/ooniprobe
./CLI/go-build-android amd64 ./internal/cmd/miniooni
@ -64,203 +64,73 @@ show-config:
./CLI/go-build-android arm64 ./cmd/ooniprobe
#help:
#help: The `make ./CLI/miniooni` command builds the miniooni experimental
#help: command line client for all the supported GOOS/GOARCH.
#help:
#help: You can also build the following subtargets:
.PHONY: ./CLI/miniooni
./CLI/miniooni: \
./CLI/miniooni-darwin-amd64 \
./CLI/miniooni-darwin-arm64 \
./CLI/miniooni-linux-386 \
./CLI/miniooni-linux-amd64 \
./CLI/miniooni-linux-armv6 \
./CLI/miniooni-linux-armv7 \
./CLI/miniooni-linux-arm64 \
./CLI/miniooni-windows-386.exe \
./CLI/miniooni-windows-amd64.exe
#help:
#help: * `make ./CLI/miniooni-darwin-amd64`: darwin/amd64
.PHONY: ./CLI/miniooni-darwin-amd64
./CLI/miniooni-darwin-amd64: search/for/go maybe/copypsiphon
./CLI/go-build-cross darwin amd64 ./internal/cmd/miniooni
#help:
#help: * `make ./CLI/miniooni-darwin-arm64`: darwin/arm64
.PHONY: ./CLI/miniooni-darwin-arm64
./CLI/miniooni-darwin-arm64: search/for/go maybe/copypsiphon
./CLI/go-build-cross darwin arm64 ./internal/cmd/miniooni
#help:
#help: * `make ./CLI/miniooni-linux-386`: linux/386
.PHONY: ./CLI/miniooni-linux-386
./CLI/miniooni-linux-386: search/for/go maybe/copypsiphon
./CLI/go-build-cross linux 386 ./internal/cmd/miniooni
#help:
#help: * `make ./CLI/miniooni-linux-amd64`: linux/amd64
.PHONY: ./CLI/miniooni-linux-amd64
./CLI/miniooni-linux-amd64: search/for/go maybe/copypsiphon
./CLI/go-build-cross linux amd64 ./internal/cmd/miniooni
#help:
#help: * `make ./CLI/miniooni-linux-armv6`: linux/armv6
.PHONY: ./CLI/miniooni-linux-armv6
./CLI/miniooni-linux-armv6: search/for/go maybe/copypsiphon
./CLI/go-build-cross linux armv6 ./internal/cmd/miniooni
#help:
#help: * `make ./CLI/miniooni-linux-armv7`: linux/armv7
.PHONY: ./CLI/miniooni-linux-armv7
./CLI/miniooni-linux-armv7: search/for/go maybe/copypsiphon
./CLI/go-build-cross linux armv7 ./internal/cmd/miniooni
#help:
#help: * `make ./CLI/miniooni-linux-arm64`: linux/arm64
.PHONY: ./CLI/miniooni-linux-arm64
./CLI/miniooni-linux-arm64: search/for/go maybe/copypsiphon
./CLI/go-build-cross linux arm64 ./internal/cmd/miniooni
#help:
#help: * `make ./CLI/miniooni-windows-386.exe`: windows/386
.PHONY: ./CLI/miniooni-windows-386.exe
./CLI/miniooni-windows-386.exe: search/for/go maybe/copypsiphon
./CLI/go-build-cross windows 386 ./internal/cmd/miniooni
#help:
#help: * `make ./CLI/miniooni-windows-amd64.exe`: windows/amd64
.PHONY: ./CLI/miniooni-windows-amd64.exe
./CLI/miniooni-windows-amd64.exe: search/for/go maybe/copypsiphon
./CLI/go-build-cross windows amd64 ./internal/cmd/miniooni
#help:
#help: The `make ./CLI/ooniprobe-darwin` command builds the ooniprobe official
#help: command line client for darwin/amd64 and darwin/arm64.
#help:
#help: You can also build the following subtargets:
.PHONY: ./CLI/ooniprobe-darwin
./CLI/ooniprobe-darwin: ./CLI/ooniprobe-darwin-amd64 ./CLI/ooniprobe-darwin-arm64
#help:
#help: * `make ./CLI/ooniprobe-darwin-amd64`: darwin/amd64
.PHONY: ./CLI/ooniprobe-darwin-amd64
./CLI/ooniprobe-darwin-amd64: search/for/go maybe/copypsiphon
#help: The `make CLI/darwin` command builds the ooniprobe and miniooni
#help: command line clients for darwin/amd64 and darwin/arm64.
.PHONY: CLI/darwin
CLI/darwin: search/for/go maybe/copypsiphon
./CLI/go-build-darwin amd64 ./internal/cmd/miniooni
./CLI/go-build-darwin amd64 ./cmd/ooniprobe
#help:
#help: * `make ./CLI/ooniprobe-darwin-arm64`: darwin/arm64
.PHONY: ./CLI/ooniprobe-darwin-arm64
./CLI/ooniprobe-darwin-arm64: search/for/go maybe/copypsiphon
./CLI/go-build-darwin arm64 ./internal/cmd/miniooni
./CLI/go-build-darwin arm64 ./cmd/ooniprobe
#help:
#help: The `make ./CLI/ooniprobe-linux` command builds the ooniprobe official command
#help: line client for amd64, arm64, etc.
#help:
#help: You can also build the following subtargets:
.PHONY: ./CLI/ooniprobe-linux
./CLI/ooniprobe-linux: \
./CLI/ooniprobe-linux-386 \
./CLI/ooniprobe-linux-amd64 \
./CLI/ooniprobe-linux-armv6 \
./CLI/ooniprobe-linux-armv7 \
./CLI/ooniprobe-linux-arm64
#help: The `make CLI/linux-static-386` command builds and statically links the
#help: ooniprobe and miniooni binaries for linux/386.
.PHONY: CLI/linux-static-386
CLI/linux-static-386: search/for/docker maybe/copypsiphon
./CLI/go-build-linux-static 386 ./cmd/ooniprobe ./internal/cmd/miniooni
#help:
#help: * `make ./CLI/ooniprobe-linux-386`: linux/386
.PHONY: ./CLI/ooniprobe-linux-386
./CLI/ooniprobe-linux-386: search/for/docker maybe/copypsiphon
./CLI/go-build-linux-static 386 ./cmd/ooniprobe
#help: The `make CLI/linux-static-amd64` command builds and statically links the
#help: ooniprobe and miniooni binaries for linux/amd64.
.PHONY: CLI/linux-static-amd64
CLI/linux-static-amd64: search/for/docker maybe/copypsiphon
./CLI/go-build-linux-static amd64 ./cmd/ooniprobe ./internal/cmd/miniooni
#help:
#help: * `make ./CLI/ooniprobe-linux-amd64`: linux/amd64
.PHONY: ./CLI/ooniprobe-linux-amd64
./CLI/ooniprobe-linux-amd64: search/for/docker maybe/copypsiphon
./CLI/go-build-linux-static amd64 ./cmd/ooniprobe
#help: The `make CLI/linux-static-armv6` command builds and statically links the
#help: ooniprobe and miniooni binaries for linux/arm/v6.
.PHONY: CLI/linux-static-armv6
CLI/linux-static-armv6: search/for/docker maybe/copypsiphon
./CLI/go-build-linux-static armv6 ./cmd/ooniprobe ./internal/cmd/miniooni
#help:
#help: * `make ./CLI/ooniprobe-linux-armv6`: linux/arm
.PHONY: ./CLI/ooniprobe-linux-armv6
./CLI/ooniprobe-linux-armv6: search/for/docker maybe/copypsiphon
./CLI/go-build-linux-static armv6 ./cmd/ooniprobe
#help: The `make CLI/linux-static-armv7` command builds and statically links the
#help: ooniprobe and miniooni binaries for linux/arm/v7.
.PHONY: CLI/linux-static-armv7
CLI/linux-static-armv7: search/for/docker maybe/copypsiphon
./CLI/go-build-linux-static armv7 ./cmd/ooniprobe ./internal/cmd/miniooni
#help:
#help: * `make ./CLI/ooniprobe-linux-armv7`: linux/arm
.PHONY: ./CLI/ooniprobe-linux-armv7
./CLI/ooniprobe-linux-armv7: search/for/docker maybe/copypsiphon
./CLI/go-build-linux-static armv7 ./cmd/ooniprobe
#help: The `make CLI/linux-static-arm64` command builds and statically links the
#help: ooniprobe and miniooni binaries for linux/arm64.
.PHONY: CLI/linux-static-arm64
CLI/linux-static-arm64: search/for/docker maybe/copypsiphon
./CLI/go-build-linux-static arm64 ./cmd/ooniprobe ./internal/cmd/miniooni
#help:
#help: * `make ./CLI/ooniprobe-linux-arm64`: linux/arm64
.PHONY: ./CLI/ooniprobe-linux-arm64
./CLI/ooniprobe-linux-arm64: search/for/docker maybe/copypsiphon
./CLI/go-build-linux-static arm64 ./cmd/ooniprobe
#help:
#help: The `make ./CLI/ooniprobe-windows` command builds the ooniprobe official
#help: command line client for windows/386 and windows/amd64.
#help:
#help: You can also build the following subtargets:
.PHONY: ./CLI/ooniprobe-windows
./CLI/ooniprobe-windows: \
./CLI/ooniprobe-windows-386.exe \
./CLI/ooniprobe-windows-amd64.exe
#help:
#help: * `make ./CLI/ooniprobe-windows-386.exe`: windows/386
.PHONY: ./CLI/ooniprobe-windows-386.exe
./CLI/ooniprobe-windows-386.exe: search/for/go search/for/mingw-w64 maybe/copypsiphon
#help: The `make CLI/windows` command builds the ooniprobe and miniooni
#help: command line clients for windows/386 and windows/amd64.
.PHONY: CLI/windows
CLI/windows: search/for/go search/for/mingw-w64 maybe/copypsiphon
./CLI/go-build-windows 386 ./internal/cmd/miniooni
./CLI/go-build-windows 386 ./cmd/ooniprobe
#help:
#help: * `make ./CLI/ooniprobe-windows-amd64.exe`: windows/amd64
.PHONY: ./CLI/ooniprobe-windows-amd64.exe
./CLI/ooniprobe-windows-amd64.exe: search/for/go search/for/mingw-w64 maybe/copypsiphon
./CLI/go-build-windows amd64 ./internal/cmd/miniooni
./CLI/go-build-windows amd64 ./cmd/ooniprobe
#help:
#help: The `make ./MOBILE/android` command builds the oonimkall library for Android.
#help:
#help: You can also build the following subtargets:
.PHONY: ./MOBILE/android
./MOBILE/android: ./MOBILE/android/oonimkall.aar ./MOBILE/android/oonimkall.pom
#help:
#help: * `make ./MOBILE/android/oonimkall.pom`: the POM
.PHONY: ./MOBILE/android/oonimkall.pom
./MOBILE/android/oonimkall.pom:
#help: The `make MOBILE/android` command builds the oonimkall library for Android.
.PHONY: MOBILE/android
MOBILE/android: search/for/go search/for/android/sdk maybe/copypsiphon
./MOBILE/gomobile android ./pkg/oonimkall
./MOBILE/android/createpom
#help:
#help: * `make ./MOBILE/android/oonimkall.aar`: the AAR
.PHONY: ./MOBILE/android/oonimkall.aar
./MOBILE/android/oonimkall.aar: search/for/go search/for/android/sdk maybe/copypsiphon
./MOBILE/gomobile android ./pkg/oonimkall
#help:
#help: The `make ./MOBILE/ios` command builds the oonimkall library for iOS.
#help:
#help: You can also build the following subtargets:
.PHONY: ./MOBILE/ios
./MOBILE/ios: ./MOBILE/ios/oonimkall.xcframework.zip ./MOBILE/ios/oonimkall.podspec
#help:
#help: * `make ./MOBILE/ios/oonimkall.xcframework.zip`: zip the xcframework
.PHONY: ./MOBILE/ios/oonimkall.xcframework.zip
./MOBILE/ios/oonimkall.xcframework.zip: search/for/zip ./MOBILE/ios/oonimkall.xcframework
./MOBILE/ios/zipframework
#help:
#help: * `make ./MOBILE/ios/xcframework`: the xcframework
.PHONY: ./MOBILE/ios/oonimkall.xcframework
./MOBILE/ios/oonimkall.xcframework: search/for/go search/for/xcode maybe/copypsiphon
#help: The `make MOBILE/ios` command builds the oonimkall library for iOS.
.PHONY: MOBILE/ios
MOBILE/ios: search/for/go search/for/zip search/for/xcode maybe/copypsiphon
./MOBILE/gomobile ios ./pkg/oonimkall
#help:
#help: * `make ./MOBILE/ios/oonimkall.podspec`: the podspec
.PHONY: ./MOBILE/ios/oonimkall.podspec
./MOBILE/ios/oonimkall.podspec: ./MOBILE/ios/template.podspec
./MOBILE/ios/zipframework
./MOBILE/ios/createpodspec
.PHONY: search/for/docker
@ -295,13 +165,6 @@ search/for/zip:
@printf "checking for zip... "
@command -v zip || { echo "not found"; exit 1; }
#help:
#help: The `make maybe/copypsiphon` command checks whether we want
#help: to embed the Psiphon config file into the build. To this end,
#help: this command checks whether OONI_PSIPHON_TAGS is set. In
#help: such a case, this command checks whether the required files
#help: are already in place. If not, this command fetches them
#help: by cloning the github.com/ooni/probe-private repo.
#
# Note: we check for files being already there before attempting
# to clone _because_ we put files in there using secrets when

View File

@ -113,5 +113,5 @@ Create an issue according to [the routine release template](
https://github.com/ooni/probe/blob/master/.github/ISSUE_TEMPLATE/routine-sprint-releases.md)
and perform any item inside the check-list.
We build releases using [Makefile](Makefile), which requires GNU make. The
`make help|less` provides detailed usage.
We build releases using [Makefile](Makefile), which requires GNU make. Run
`make help` for detailed usage.