d10ab88444
This diff modifies all the github actions that produce assets to publish on a release called rolling when we are not building a tag. If everything goes as planned, we should be able to provide people with automatically generated fresh binaries for testing. While there, introduce caching for all builds to make them as fast as possible. I suspect gomobile based builds will not see any speed up but other builds most likely will. See https://github.com/ooni/probe/issues/2249
118 lines
4.5 KiB
YAML
118 lines
4.5 KiB
YAML
# Builds and publishes ooniprobe and miniooni for Linux
|
|
name: linux
|
|
on:
|
|
push:
|
|
branches:
|
|
- "release/**"
|
|
- "fullbuild"
|
|
tags:
|
|
- "v*"
|
|
|
|
jobs:
|
|
build_and_publish_386:
|
|
runs-on: "ubuntu-20.04"
|
|
permissions: # See https://github.com/ooni/probe/issues/2154
|
|
contents: write
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 0
|
|
- run: |
|
|
echo -n $PSIPHON_CONFIG_KEY > ./internal/engine/psiphon-config.key
|
|
echo $PSIPHON_CONFIG_JSON_AGE_BASE64 | base64 -d > ./internal/engine/psiphon-config.json.age
|
|
env:
|
|
PSIPHON_CONFIG_KEY: ${{ secrets.PSIPHON_CONFIG_KEY }}
|
|
PSIPHON_CONFIG_JSON_AGE_BASE64: ${{ secrets.PSIPHON_CONFIG_JSON_AGE_BASE64 }}
|
|
- run: make CLI/linux-static-386
|
|
- run: ./E2E/ooniprobe.sh ./CLI/ooniprobe-linux-386
|
|
- run: ./script/ghpublish.bash ./CLI/ooniprobe-linux-386 ./CLI/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
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 0
|
|
- run: |
|
|
echo -n $PSIPHON_CONFIG_KEY > ./internal/engine/psiphon-config.key
|
|
echo $PSIPHON_CONFIG_JSON_AGE_BASE64 | base64 -d > ./internal/engine/psiphon-config.json.age
|
|
env:
|
|
PSIPHON_CONFIG_KEY: ${{ secrets.PSIPHON_CONFIG_KEY }}
|
|
PSIPHON_CONFIG_JSON_AGE_BASE64: ${{ secrets.PSIPHON_CONFIG_JSON_AGE_BASE64 }}
|
|
- run: make CLI/linux-static-amd64
|
|
- run: ./E2E/ooniprobe.sh ./CLI/ooniprobe-linux-amd64
|
|
- run: ./script/ghpublish.bash ./CLI/ooniprobe-linux-amd64 ./CLI/miniooni-linux-amd64
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
build_and_publish_armv6:
|
|
runs-on: "ubuntu-20.04"
|
|
permissions: # See https://github.com/ooni/probe/issues/2154
|
|
contents: write
|
|
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: |
|
|
echo -n $PSIPHON_CONFIG_KEY > ./internal/engine/psiphon-config.key
|
|
echo $PSIPHON_CONFIG_JSON_AGE_BASE64 | base64 -d > ./internal/engine/psiphon-config.json.age
|
|
env:
|
|
PSIPHON_CONFIG_KEY: ${{ secrets.PSIPHON_CONFIG_KEY }}
|
|
PSIPHON_CONFIG_JSON_AGE_BASE64: ${{ secrets.PSIPHON_CONFIG_JSON_AGE_BASE64 }}
|
|
- run: make CLI/linux-static-armv6
|
|
- run: ./E2E/ooniprobe.sh ./CLI/ooniprobe-linux-armv6
|
|
- run: ./script/ghpublish.bash ./CLI/ooniprobe-linux-armv6 ./CLI/miniooni-linux-armv6
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
build_and_publish_armv7:
|
|
runs-on: "ubuntu-20.04"
|
|
permissions: # See https://github.com/ooni/probe/issues/2154
|
|
contents: write
|
|
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: |
|
|
echo -n $PSIPHON_CONFIG_KEY > ./internal/engine/psiphon-config.key
|
|
echo $PSIPHON_CONFIG_JSON_AGE_BASE64 | base64 -d > ./internal/engine/psiphon-config.json.age
|
|
env:
|
|
PSIPHON_CONFIG_KEY: ${{ secrets.PSIPHON_CONFIG_KEY }}
|
|
PSIPHON_CONFIG_JSON_AGE_BASE64: ${{ secrets.PSIPHON_CONFIG_JSON_AGE_BASE64 }}
|
|
- run: make CLI/linux-static-armv7
|
|
- run: ./E2E/ooniprobe.sh ./CLI/ooniprobe-linux-armv7
|
|
- run: ./script/ghpublish.bash ./CLI/ooniprobe-linux-armv7 ./CLI/miniooni-linux-armv7
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
build_and_publish_arm64:
|
|
runs-on: "ubuntu-20.04"
|
|
permissions: # See https://github.com/ooni/probe/issues/2154
|
|
contents: write
|
|
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: |
|
|
echo -n $PSIPHON_CONFIG_KEY > ./internal/engine/psiphon-config.key
|
|
echo $PSIPHON_CONFIG_JSON_AGE_BASE64 | base64 -d > ./internal/engine/psiphon-config.json.age
|
|
env:
|
|
PSIPHON_CONFIG_KEY: ${{ secrets.PSIPHON_CONFIG_KEY }}
|
|
PSIPHON_CONFIG_JSON_AGE_BASE64: ${{ secrets.PSIPHON_CONFIG_JSON_AGE_BASE64 }}
|
|
- run: make CLI/linux-static-arm64
|
|
- run: ./E2E/ooniprobe.sh ./CLI/ooniprobe-linux-arm64
|
|
- run: ./script/ghpublish.bash ./CLI/ooniprobe-linux-arm64 ./CLI/miniooni-linux-arm64
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|