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
223
.github/workflows/linux.yml
vendored
223
.github/workflows/linux.yml
vendored
|
|
@ -1,4 +1,5 @@
|
|||
# Builds and publishes ooniprobe and miniooni for Linux
|
||||
# File generated by `go run ./GHGEN`; DO NOT EDIT.
|
||||
|
||||
name: linux
|
||||
on:
|
||||
push:
|
||||
|
|
@ -12,10 +13,8 @@ on:
|
|||
- cron: "17 1 * * *"
|
||||
|
||||
jobs:
|
||||
build_and_publish_386:
|
||||
runs-on: "ubuntu-20.04"
|
||||
permissions: # See https://github.com/ooni/probe/issues/2154
|
||||
contents: write
|
||||
build_linux_cli_386:
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
|
|
@ -35,17 +34,40 @@ jobs:
|
|||
|
||||
- run: make CLI/linux-static-386
|
||||
|
||||
- run: ./E2E/ooniprobe.bash ./CLI/ooniprobe-linux-386
|
||||
- uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: ooniprobe-linux-386
|
||||
path: ./CLI/ooniprobe-linux-386
|
||||
|
||||
- run: ./script/ghpublish.bash ./CLI/ooniprobe-linux-386 ./CLI/miniooni-linux-386
|
||||
- uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: miniooni-linux-386
|
||||
path: ./CLI/miniooni-linux-386
|
||||
|
||||
publish_linux_cli_386:
|
||||
runs-on: ubuntu-20.04
|
||||
needs: build_linux_cli_386
|
||||
permissions:
|
||||
contents: write
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- uses: actions/download-artifact@v2
|
||||
with:
|
||||
name: ooniprobe-linux-386
|
||||
|
||||
- uses: actions/download-artifact@v2
|
||||
with:
|
||||
name: miniooni-linux-386
|
||||
|
||||
- run: ./script/ghpublish.bash ooniprobe-linux-386 miniooni-linux-386
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
|
||||
build_and_publish_amd64:
|
||||
runs-on: "ubuntu-20.04"
|
||||
permissions: # See https://github.com/ooni/probe/issues/2154
|
||||
contents: write
|
||||
build_linux_cli_amd64:
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
|
|
@ -65,7 +87,31 @@ jobs:
|
|||
|
||||
- run: make CLI/linux-static-amd64
|
||||
|
||||
- run: ./E2E/ooniprobe.bash ./CLI/ooniprobe-linux-amd64
|
||||
- uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: ooniprobe-linux-amd64
|
||||
path: ./CLI/ooniprobe-linux-amd64
|
||||
|
||||
- uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: miniooni-linux-amd64
|
||||
path: ./CLI/miniooni-linux-amd64
|
||||
|
||||
test_linux_cli_amd64:
|
||||
runs-on: ubuntu-20.04
|
||||
needs: build_linux_cli_amd64
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- uses: actions/download-artifact@v2
|
||||
with:
|
||||
name: ooniprobe-linux-amd64
|
||||
|
||||
- uses: actions/download-artifact@v2
|
||||
with:
|
||||
name: miniooni-linux-amd64
|
||||
|
||||
- name: Get GOVERSION content
|
||||
id: goversion
|
||||
|
|
@ -73,26 +119,49 @@ jobs:
|
|||
- uses: magnetikonline/action-golang-cache@v2
|
||||
with:
|
||||
go-version: "${{ steps.goversion.outputs.version }}"
|
||||
cache-key-suffix: "-windows-${{ steps.goversion.outputs.version }}"
|
||||
cache-key-suffix: "-linux-amd64-${{ steps.goversion.outputs.version }}"
|
||||
|
||||
- run: sudo apt-get update -q
|
||||
- run: sudo apt-get install -y tor
|
||||
- run: ./E2E/miniooni.bash ./CLI/miniooni-linux-amd64
|
||||
|
||||
- run: ./script/ghpublish.bash ./CLI/ooniprobe-linux-amd64 ./CLI/miniooni-linux-amd64
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
- run: chmod +x ooniprobe-linux-amd64
|
||||
- run: ./E2E/ooniprobe.bash ./ooniprobe-linux-amd64
|
||||
shell: bash
|
||||
|
||||
build_and_publish_armv6:
|
||||
runs-on: "ubuntu-20.04"
|
||||
permissions: # See https://github.com/ooni/probe/issues/2154
|
||||
- run: chmod +x miniooni-linux-amd64
|
||||
- run: ./E2E/miniooni.bash ./miniooni-linux-amd64
|
||||
shell: bash
|
||||
|
||||
publish_linux_cli_amd64:
|
||||
runs-on: ubuntu-20.04
|
||||
needs: test_linux_cli_amd64
|
||||
permissions:
|
||||
contents: write
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- run: sudo apt-get update -q
|
||||
- uses: actions/download-artifact@v2
|
||||
with:
|
||||
name: ooniprobe-linux-amd64
|
||||
|
||||
- uses: actions/download-artifact@v2
|
||||
with:
|
||||
name: miniooni-linux-amd64
|
||||
|
||||
- run: ./script/ghpublish.bash ooniprobe-linux-amd64 miniooni-linux-amd64
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
build_linux_cli_armv6:
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- run: sudo apt-get update -q
|
||||
- run: sudo apt-get install -y qemu-user-static
|
||||
|
||||
- run: |
|
||||
|
|
@ -109,23 +178,46 @@ jobs:
|
|||
|
||||
- run: make CLI/linux-static-armv6
|
||||
|
||||
- run: ./E2E/ooniprobe.bash ./CLI/ooniprobe-linux-armv6
|
||||
- uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: ooniprobe-linux-armv6
|
||||
path: ./CLI/ooniprobe-linux-armv6
|
||||
|
||||
- run: ./script/ghpublish.bash ./CLI/ooniprobe-linux-armv6 ./CLI/miniooni-linux-armv6
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
- uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: miniooni-linux-armv6
|
||||
path: ./CLI/miniooni-linux-armv6
|
||||
|
||||
build_and_publish_armv7:
|
||||
runs-on: "ubuntu-20.04"
|
||||
permissions: # See https://github.com/ooni/probe/issues/2154
|
||||
publish_linux_cli_armv6:
|
||||
runs-on: ubuntu-20.04
|
||||
needs: build_linux_cli_armv6
|
||||
permissions:
|
||||
contents: write
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- run: sudo apt-get update -q
|
||||
- uses: actions/download-artifact@v2
|
||||
with:
|
||||
name: ooniprobe-linux-armv6
|
||||
|
||||
- uses: actions/download-artifact@v2
|
||||
with:
|
||||
name: miniooni-linux-armv6
|
||||
|
||||
- run: ./script/ghpublish.bash ooniprobe-linux-armv6 miniooni-linux-armv6
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
build_linux_cli_armv7:
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- run: sudo apt-get update -q
|
||||
- run: sudo apt-get install -y qemu-user-static
|
||||
|
||||
- run: |
|
||||
|
|
@ -142,23 +234,46 @@ jobs:
|
|||
|
||||
- run: make CLI/linux-static-armv7
|
||||
|
||||
- run: ./E2E/ooniprobe.bash ./CLI/ooniprobe-linux-armv7
|
||||
- uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: ooniprobe-linux-armv7
|
||||
path: ./CLI/ooniprobe-linux-armv7
|
||||
|
||||
- run: ./script/ghpublish.bash ./CLI/ooniprobe-linux-armv7 ./CLI/miniooni-linux-armv7
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
- uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: miniooni-linux-armv7
|
||||
path: ./CLI/miniooni-linux-armv7
|
||||
|
||||
build_and_publish_arm64:
|
||||
runs-on: "ubuntu-20.04"
|
||||
permissions: # See https://github.com/ooni/probe/issues/2154
|
||||
publish_linux_cli_armv7:
|
||||
runs-on: ubuntu-20.04
|
||||
needs: build_linux_cli_armv7
|
||||
permissions:
|
||||
contents: write
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- run: sudo apt-get update -q
|
||||
- uses: actions/download-artifact@v2
|
||||
with:
|
||||
name: ooniprobe-linux-armv7
|
||||
|
||||
- uses: actions/download-artifact@v2
|
||||
with:
|
||||
name: miniooni-linux-armv7
|
||||
|
||||
- run: ./script/ghpublish.bash ooniprobe-linux-armv7 miniooni-linux-armv7
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
build_linux_cli_arm64:
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- run: sudo apt-get update -q
|
||||
- run: sudo apt-get install -y qemu-user-static
|
||||
|
||||
- run: |
|
||||
|
|
@ -175,8 +290,36 @@ jobs:
|
|||
|
||||
- run: make CLI/linux-static-arm64
|
||||
|
||||
- run: ./E2E/ooniprobe.bash ./CLI/ooniprobe-linux-arm64
|
||||
- uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: ooniprobe-linux-arm64
|
||||
path: ./CLI/ooniprobe-linux-arm64
|
||||
|
||||
- run: ./script/ghpublish.bash ./CLI/ooniprobe-linux-arm64 ./CLI/miniooni-linux-arm64
|
||||
- uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: miniooni-linux-arm64
|
||||
path: ./CLI/miniooni-linux-arm64
|
||||
|
||||
publish_linux_cli_arm64:
|
||||
runs-on: ubuntu-20.04
|
||||
needs: build_linux_cli_arm64
|
||||
permissions:
|
||||
contents: write
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- uses: actions/download-artifact@v2
|
||||
with:
|
||||
name: ooniprobe-linux-arm64
|
||||
|
||||
- uses: actions/download-artifact@v2
|
||||
with:
|
||||
name: miniooni-linux-arm64
|
||||
|
||||
- run: ./script/ghpublish.bash ooniprobe-linux-arm64 miniooni-linux-arm64
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
# End of autogenerated file
|
||||
|
|
|
|||
Loading…
Reference in a new issue