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
This commit is contained in:
parent
47dd063b77
commit
90d15c1c09
|
@ -14,7 +14,7 @@ jobs:
|
|||
go-version: "1.14"
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- run: ./build-cli.sh linux
|
||||
- run: ./build-miniooni.sh linux
|
||||
- run: ./CLI/linux/amd64/miniooni --yes -nNi https://example.com web_connectivity
|
||||
- uses: actions/upload-artifact@v1
|
||||
with:
|
||||
|
@ -26,21 +26,21 @@ jobs:
|
|||
path: ./CLI/linux/amd64/miniooni
|
||||
- uses: actions/upload-artifact@v1
|
||||
with:
|
||||
name: miniooni-linux-armv7
|
||||
path: ./CLI/linux/armv7/miniooni
|
||||
name: miniooni-linux-arm
|
||||
path: ./CLI/linux/arm/miniooni
|
||||
- uses: actions/upload-artifact@v1
|
||||
with:
|
||||
name: miniooni-linux-arm64
|
||||
path: ./CLI/linux/arm64/miniooni
|
||||
|
||||
- run: ./build-cli.sh darwin
|
||||
- run: ./build-miniooni.sh darwin
|
||||
- uses: actions/upload-artifact@v1
|
||||
with:
|
||||
name: miniooni-darwin-amd64
|
||||
path: ./CLI/darwin/amd64/miniooni
|
||||
|
||||
- run: sudo apt install --yes mingw-w64
|
||||
- run: ./build-cli.sh windows
|
||||
- run: ./build-miniooni.sh windows
|
||||
- uses: actions/upload-artifact@v1
|
||||
with:
|
||||
name: miniooni-windows-amd64.exe
|
3
CLI/README.md
Normal file
3
CLI/README.md
Normal file
|
@ -0,0 +1,3 @@
|
|||
# Directory github.com/ooni/probe-cli/CLI
|
||||
|
||||
We use this directory for building CLI binaries (e.g. ooniprobe).
|
1
CLI/darwin/amd64/.gitignore
vendored
1
CLI/darwin/amd64/.gitignore
vendored
|
@ -1 +1,2 @@
|
|||
/ooniprobe
|
||||
/miniooni
|
||||
|
|
1
CLI/linux/386/.gitignore
vendored
1
CLI/linux/386/.gitignore
vendored
|
@ -1 +1,2 @@
|
|||
/ooniprobe
|
||||
/miniooni
|
||||
|
|
1
CLI/linux/amd64/.gitignore
vendored
1
CLI/linux/amd64/.gitignore
vendored
|
@ -1 +1,2 @@
|
|||
/ooniprobe
|
||||
/miniooni
|
||||
|
|
1
CLI/windows/386/.gitignore
vendored
1
CLI/windows/386/.gitignore
vendored
|
@ -1 +1,2 @@
|
|||
/ooniprobe.exe
|
||||
/miniooni.exe
|
||||
|
|
1
CLI/windows/amd64/.gitignore
vendored
1
CLI/windows/amd64/.gitignore
vendored
|
@ -1 +1,2 @@
|
|||
/ooniprobe.exe
|
||||
/miniooni.exe
|
||||
|
|
|
@ -3,27 +3,27 @@ set -e
|
|||
case $1 in
|
||||
macos|darwin)
|
||||
export GOOS=darwin GOARCH=amd64
|
||||
go build -o ./CLI/darwin/amd64 -ldflags="-s -w" ./cmd/miniooni
|
||||
go build -o ./CLI/darwin/amd64 -ldflags="-s -w" ./internal/engine/cmd/miniooni
|
||||
echo "Binary ready at ./CLI/darwin/amd64/miniooni";;
|
||||
linux)
|
||||
export GOOS=linux GOARCH=386
|
||||
go build -o ./CLI/linux/386 -tags netgo -ldflags='-s -w -extldflags "-static"' ./cmd/miniooni
|
||||
go build -o ./CLI/linux/386 -tags netgo -ldflags='-s -w -extldflags "-static"' ./internal/engine/cmd/miniooni
|
||||
echo "Binary ready at ./CLI/linux/386/miniooni"
|
||||
export GOOS=linux GOARCH=amd64
|
||||
go build -o ./CLI/linux/amd64 -tags netgo -ldflags='-s -w -extldflags "-static"' ./cmd/miniooni
|
||||
go build -o ./CLI/linux/amd64 -tags netgo -ldflags='-s -w -extldflags "-static"' ./internal/engine/cmd/miniooni
|
||||
echo "Binary ready at ./CLI/linux/amd64/miniooni"
|
||||
export GOOS=linux GOARCH=arm GOARM=7
|
||||
go build -o ./CLI/linux/armv7 -tags netgo -ldflags='-s -w -extldflags "-static"' ./cmd/miniooni
|
||||
echo "Binary ready at ./CLI/linux/armv7/miniooni"
|
||||
go build -o ./CLI/linux/arm -tags netgo -ldflags='-s -w -extldflags "-static"' ./internal/engine/cmd/miniooni
|
||||
echo "Binary ready at ./CLI/linux/arm/miniooni"
|
||||
export GOOS=linux GOARCH=arm64
|
||||
go build -o ./CLI/linux/arm64 -tags netgo -ldflags='-s -w -extldflags "-static"' ./cmd/miniooni
|
||||
go build -o ./CLI/linux/arm64 -tags netgo -ldflags='-s -w -extldflags "-static"' ./internal/engine/cmd/miniooni
|
||||
echo "Binary ready at ./CLI/linux/arm64/miniooni";;
|
||||
windows)
|
||||
export GOOS=windows GOARCH=386
|
||||
go build -o ./CLI/windows/386 -ldflags="-s -w" ./cmd/miniooni
|
||||
go build -o ./CLI/windows/386 -ldflags="-s -w" ./internal/engine/cmd/miniooni
|
||||
echo "Binary ready at ./CLI/windows/386/miniooni.exe"
|
||||
export GOOS=windows GOARCH=amd64
|
||||
go build -o ./CLI/windows/amd64 -ldflags="-s -w" ./cmd/miniooni
|
||||
go build -o ./CLI/windows/amd64 -ldflags="-s -w" ./internal/engine/cmd/miniooni
|
||||
echo "Binary ready at ./CLI/windows/amd64/miniooni.exe";;
|
||||
*)
|
||||
echo "usage: $0 darwin|linux|windows" 1>&2
|
|
@ -1,3 +0,0 @@
|
|||
# Directory github.com/ooni/probe-engine/CLI
|
||||
|
||||
We use this directory for building CLI binaries (e.g. miniooni).
|
1
internal/engine/CLI/linux/amd64/.gitignore
vendored
1
internal/engine/CLI/linux/amd64/.gitignore
vendored
|
@ -1 +0,0 @@
|
|||
/miniooni
|
1
internal/engine/CLI/linux/arm64/.gitignore
vendored
1
internal/engine/CLI/linux/arm64/.gitignore
vendored
|
@ -1 +0,0 @@
|
|||
/miniooni
|
1
internal/engine/CLI/linux/armv7/.gitignore
vendored
1
internal/engine/CLI/linux/armv7/.gitignore
vendored
|
@ -1 +0,0 @@
|
|||
/miniooni
|
1
internal/engine/CLI/windows/386/.gitignore
vendored
1
internal/engine/CLI/windows/386/.gitignore
vendored
|
@ -1 +0,0 @@
|
|||
/miniooni.exe
|
1
internal/engine/CLI/windows/amd64/.gitignore
vendored
1
internal/engine/CLI/windows/amd64/.gitignore
vendored
|
@ -1 +0,0 @@
|
|||
/miniooni.exe
|
Loading…
Reference in New Issue
Block a user