feat: autogen GH workflows and split build, test, and publish (#971)
Closes https://github.com/ooni/probe/issues/2337.
This commit is contained in:
parent
89a584f93b
commit
5466f30526
14 changed files with 990 additions and 142 deletions
82
.github/workflows/macos.yml
vendored
82
.github/workflows/macos.yml
vendored
|
|
@ -1,22 +1,21 @@
|
|||
# Builds ooniprobe for macos
|
||||
# File generated by `go run ./GHGEN`; DO NOT EDIT.
|
||||
|
||||
name: macos
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- "release/**"
|
||||
- "fullbuild"
|
||||
- "macosbuild"
|
||||
tags:
|
||||
- "v*"
|
||||
schedule:
|
||||
- cron: "17 1 * * *"
|
||||
|
||||
jobs:
|
||||
build_and_publish:
|
||||
runs-on: "macos-11"
|
||||
permissions: # See https://github.com/ooni/probe/issues/2154
|
||||
contents: write
|
||||
build_darwin_cli:
|
||||
runs-on: macos-11
|
||||
steps:
|
||||
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
|
@ -24,7 +23,6 @@ jobs:
|
|||
- name: Get GOVERSION content
|
||||
id: goversion
|
||||
run: echo ::set-output name=version::$(cat GOVERSION)
|
||||
|
||||
- uses: magnetikonline/action-golang-cache@v2
|
||||
with:
|
||||
go-version: "${{ steps.goversion.outputs.version }}"
|
||||
|
|
@ -39,12 +37,70 @@ jobs:
|
|||
|
||||
- run: make CLI/darwin
|
||||
|
||||
- run: ./E2E/ooniprobe.bash ./CLI/ooniprobe-darwin-amd64
|
||||
- uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: ooniprobe-darwin-amd64
|
||||
path: ./CLI/ooniprobe-darwin-amd64
|
||||
|
||||
- run: |
|
||||
./script/ghpublish.bash ./CLI/ooniprobe-darwin-amd64 \
|
||||
./CLI/ooniprobe-darwin-arm64 \
|
||||
./CLI/miniooni-darwin-amd64 \
|
||||
./CLI/miniooni-darwin-arm64
|
||||
- uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: ooniprobe-darwin-arm64
|
||||
path: ./CLI/ooniprobe-darwin-arm64
|
||||
|
||||
- uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: miniooni-darwin-amd64
|
||||
path: ./CLI/miniooni-darwin-amd64
|
||||
|
||||
- uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: miniooni-darwin-arm64
|
||||
path: ./CLI/miniooni-darwin-arm64
|
||||
|
||||
test_darwin_cli:
|
||||
runs-on: macos-11
|
||||
needs: build_darwin_cli
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- uses: actions/download-artifact@v2
|
||||
with:
|
||||
name: ooniprobe-darwin-amd64
|
||||
|
||||
- run: chmod +x ooniprobe-darwin-amd64
|
||||
- run: ./E2E/ooniprobe.bash ./ooniprobe-darwin-amd64
|
||||
shell: bash
|
||||
|
||||
publish_darwin_cli:
|
||||
runs-on: macos-11
|
||||
needs: test_darwin_cli
|
||||
permissions:
|
||||
contents: write
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- uses: actions/download-artifact@v2
|
||||
with:
|
||||
name: ooniprobe-darwin-amd64
|
||||
|
||||
- uses: actions/download-artifact@v2
|
||||
with:
|
||||
name: ooniprobe-darwin-arm64
|
||||
|
||||
- uses: actions/download-artifact@v2
|
||||
with:
|
||||
name: miniooni-darwin-amd64
|
||||
|
||||
- uses: actions/download-artifact@v2
|
||||
with:
|
||||
name: miniooni-darwin-arm64
|
||||
|
||||
- run: ./script/ghpublish.bash ooniprobe-darwin-amd64 ooniprobe-darwin-arm64 miniooni-darwin-amd64 miniooni-darwin-arm64
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
# End of autogenerated file
|
||||
|
|
|
|||
Loading…
Reference in a new issue