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:
@@ -0,0 +1,22 @@
|
||||
# Make sure we can embed bindata
|
||||
name: bindata
|
||||
on:
|
||||
push:
|
||||
schedule:
|
||||
- cron: "14 17 * * 3"
|
||||
jobs:
|
||||
test:
|
||||
runs-on: "${{ matrix.os }}"
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: ["ubuntu-latest"]
|
||||
go: ["1.14"]
|
||||
steps:
|
||||
- uses: actions/setup-go@v1
|
||||
with:
|
||||
go-version: ${{ matrix.go }}
|
||||
- uses: actions/checkout@v2
|
||||
- run: ./updatebindata.sh
|
||||
- run: go mod tidy # revert changes caused by installing bindata
|
||||
- run: git diff --exit-code # if this fails, run ./updatebindata.sh locally and push
|
||||
@@ -0,0 +1,57 @@
|
||||
# Shows how to cross compile ooniprobe
|
||||
name: cross
|
||||
on:
|
||||
push:
|
||||
schedule:
|
||||
- cron: "14 17 * * 3"
|
||||
jobs:
|
||||
|
||||
windows_from_linux_build:
|
||||
runs-on: "ubuntu-latest"
|
||||
steps:
|
||||
- uses: actions/setup-go@v1
|
||||
with:
|
||||
go-version: "1.14"
|
||||
- uses: actions/checkout@v2
|
||||
- run: sudo apt update
|
||||
- run: sudo apt install --yes mingw-w64
|
||||
- run: ./build.sh windows
|
||||
- uses: actions/upload-artifact@v1
|
||||
with:
|
||||
name: ooniprobe-windows-amd64-compiled-from-linux
|
||||
path: ./CLI/windows/amd64/ooniprobe.exe
|
||||
|
||||
test_build_from_linux:
|
||||
needs: windows_from_linux_build
|
||||
runs-on: "windows-latest"
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/download-artifact@v2
|
||||
with:
|
||||
name: ooniprobe-windows-amd64-compiled-from-linux
|
||||
- run: bash.exe ./smoketest.sh ./ooniprobe.exe
|
||||
|
||||
windows_from_macos_build:
|
||||
runs-on: "macos-latest"
|
||||
steps:
|
||||
- uses: actions/setup-go@v1
|
||||
with:
|
||||
go-version: "1.14"
|
||||
- uses: actions/checkout@v2
|
||||
- run: brew update
|
||||
- run: brew install mingw-w64
|
||||
- run: ./build.sh windows
|
||||
- uses: actions/upload-artifact@v1
|
||||
with:
|
||||
name: ooniprobe-windows-amd64-compiled-from-macos
|
||||
path: ./CLI/windows/amd64/ooniprobe.exe
|
||||
|
||||
test_build_from_macos:
|
||||
needs: windows_from_macos_build
|
||||
runs-on: "windows-latest"
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/download-artifact@v2
|
||||
with:
|
||||
name: ooniprobe-windows-amd64-compiled-from-macos
|
||||
- run: bash.exe ./smoketest.sh ./ooniprobe.exe
|
||||
@@ -0,0 +1,32 @@
|
||||
# Run tests and measure coverage
|
||||
name: golang
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
schedule:
|
||||
- cron: "14 17 * * 3"
|
||||
jobs:
|
||||
test:
|
||||
runs-on: "${{ matrix.os }}"
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: ["ubuntu-latest"]
|
||||
go: ["1.14"]
|
||||
steps:
|
||||
- uses: actions/setup-go@v1
|
||||
with:
|
||||
go-version: ${{ matrix.go }}
|
||||
- uses: actions/checkout@v2
|
||||
- run: go test -race -tags shaping -v -coverprofile=probe-cli.cov -coverpkg=./... ./...
|
||||
- uses: shogo82148/actions-goveralls@v1
|
||||
with:
|
||||
path-to-profile: probe-cli.cov
|
||||
parallel: true
|
||||
finish:
|
||||
needs: test
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: shogo82148/actions-goveralls@v1
|
||||
with:
|
||||
parallel-finished: true
|
||||
@@ -0,0 +1,20 @@
|
||||
# Build and test Linux binary
|
||||
name: linux
|
||||
on:
|
||||
push:
|
||||
schedule:
|
||||
- cron: "14 17 * * 3"
|
||||
jobs:
|
||||
build:
|
||||
runs-on: "ubuntu-latest"
|
||||
steps:
|
||||
- uses: actions/setup-go@v1
|
||||
with:
|
||||
go-version: "1.14"
|
||||
- uses: actions/checkout@v2
|
||||
- run: ./build.sh linux
|
||||
- run: ./smoketest.sh ./CLI/linux/amd64/ooniprobe
|
||||
- uses: actions/upload-artifact@v1
|
||||
with:
|
||||
name: ooniprobe-linux-amd64
|
||||
path: ./CLI/linux/amd64/ooniprobe
|
||||
@@ -0,0 +1,20 @@
|
||||
# Build and test macOS binary
|
||||
name: macos
|
||||
on:
|
||||
push:
|
||||
schedule:
|
||||
- cron: "14 17 * * 3"
|
||||
jobs:
|
||||
build:
|
||||
runs-on: "macos-latest"
|
||||
steps:
|
||||
- uses: actions/setup-go@v1
|
||||
with:
|
||||
go-version: "1.14"
|
||||
- uses: actions/checkout@v2
|
||||
- run: ./build.sh macos
|
||||
- run: ./smoketest.sh ./CLI/macos/amd64/ooniprobe
|
||||
- uses: actions/upload-artifact@v1
|
||||
with:
|
||||
name: ooniprobe-macos-amd64
|
||||
path: ./CLI/macos/amd64/ooniprobe
|
||||
@@ -0,0 +1,20 @@
|
||||
# Build and test Windows binary
|
||||
name: windows
|
||||
on:
|
||||
push:
|
||||
schedule:
|
||||
- cron: "14 17 * * 3"
|
||||
jobs:
|
||||
build:
|
||||
runs-on: "windows-latest"
|
||||
steps:
|
||||
- uses: actions/setup-go@v1
|
||||
with:
|
||||
go-version: "1.14"
|
||||
- uses: actions/checkout@v2
|
||||
- run: bash.exe ./build.sh windows
|
||||
- run: bash.exe ./smoketest.sh ./CLI/windows/amd64/ooniprobe.exe
|
||||
- uses: actions/upload-artifact@v1
|
||||
with:
|
||||
name: ooniprobe-windows-amd64
|
||||
path: ./CLI/windows/amd64/ooniprobe.exe
|
||||
Reference in New Issue
Block a user