refactor(.github/workflows): macos, windows: use ./make, run less frequently (#333)

Like in the previous PR, here we make macos and windows builds only run when we're preparing a release. While there, migrate the code to use the `./make` script. Tested in https://github.com/ooni/probe-cli/pull/331.

Reference issue is https://github.com/ooni/probe/issues/1466
This commit is contained in:
Simone Basso 2021-05-06 20:08:18 +02:00 committed by GitHub
parent fd333bad16
commit b5ba1e743f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 22 additions and 23 deletions

View File

@ -1,20 +1,13 @@
# Build and test macOS binary
# macos builds ooniprobe for macos
name: macos
on:
push:
schedule:
- cron: "14 17 * * 3"
branches:
- "release/**"
jobs:
build:
runs-on: "macos-latest"
runs-on: "macos-10.15"
steps:
- uses: actions/setup-go@v1
with:
go-version: "1.16"
- uses: actions/checkout@v2
- run: ./build.sh darwin
- run: ./make --disable-embedding-psiphon-config -t ./CLI/darwin/amd64/ooniprobe
- run: ./smoketest.sh ./CLI/darwin/amd64/ooniprobe
- uses: actions/upload-artifact@v1
with:
name: ooniprobe-darwin-amd64
path: ./CLI/darwin/amd64/ooniprobe

View File

@ -1,20 +1,26 @@
# Build and test Windows binary
# windows builds ooniprobe for Windows
name: windows
on:
push:
schedule:
- cron: "14 17 * * 3"
branches:
- "release/**"
jobs:
build:
runs-on: "windows-latest"
runs-on: "ubuntu-20.04"
steps:
- uses: actions/setup-go@v1
with:
go-version: "1.16"
- uses: actions/checkout@v2
- run: bash.exe ./build.sh windows_amd64 # TODO(bassosimone): make windows_386 work
- run: bash.exe ./smoketest.sh ./CLI/windows/amd64/ooniprobe.exe
- uses: actions/upload-artifact@v1
- run: sudo apt install mingw-w64
- run: ./make --disable-embedding-psiphon-config -t ./CLI/windows/amd64/ooniprobe.exe
- uses: actions/upload-artifact@v2
with:
name: ooniprobe-windows-amd64
name: ooniprobe.exe
path: ./CLI/windows/amd64/ooniprobe.exe
test:
needs: build
runs-on: "windows-2019"
steps:
- uses: actions/checkout@v2
- uses: actions/download-artifact@v2
with:
name: ooniprobe.exe
- run: bash.exe ./smoketest.sh ./ooniprobe.exe