Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: implement rolling builds #910

Merged
merged 5 commits into from
Aug 30, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/alltests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@ jobs:
id: goversion
run: echo ::set-output name=version::$(cat GOVERSION)

- uses: actions/setup-go@v3
- uses: magnetikonline/action-golang-cache@v2
with:
go-version: "${{ steps.goversion.outputs.version }}"
cache-key-suffix: "-alltests-${{ steps.goversion.outputs.version }}"

- run: go test -race -tags shaping ./...
52 changes: 21 additions & 31 deletions .github/workflows/android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,10 @@ jobs:
id: goversion
run: echo ::set-output name=version::$(cat GOVERSION)

- uses: actions/setup-go@v3
- uses: magnetikonline/action-golang-cache@v2
with:
go-version: "${{ steps.goversion.outputs.version }}"
cache-key-suffix: "-android-oonimkall-${{ steps.goversion.outputs.version }}"

- run: |
echo -n $PSIPHON_CONFIG_KEY > ./internal/engine/psiphon-config.key
Expand All @@ -39,12 +40,9 @@ jobs:
- run: make MOBILE/android

- run: |
tag=$(echo $GITHUB_REF | sed 's|refs/tags/||g')
gh release create -p $tag --target $GITHUB_SHA || true
gh release upload $tag --clobber ./MOBILE/android/oonimkall.aar \
./MOBILE/android/oonimkall-sources.jar \
./MOBILE/android/oonimkall.pom
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
./script/ghpublish.bash ./MOBILE/android/oonimkall.aar \
./MOBILE/android/oonimkall-sources.jar \
./MOBILE/android/oonimkall.pom
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Expand All @@ -62,9 +60,10 @@ jobs:
id: goversion
run: echo ::set-output name=version::$(cat GOVERSION)

- uses: actions/setup-go@v3
- uses: magnetikonline/action-golang-cache@v2
with:
go-version: "${{ steps.goversion.outputs.version }}"
cache-key-suffix: "-android-cli-386-${{ steps.goversion.outputs.version }}"

- run: |
echo -n $PSIPHON_CONFIG_KEY > ./internal/engine/psiphon-config.key
Expand All @@ -76,11 +75,8 @@ jobs:
- run: make CLI/android-386

- run: |
tag=$(echo $GITHUB_REF | sed 's|refs/tags/||g')
gh release create -p $tag --target $GITHUB_SHA || true
gh release upload $tag --clobber ./CLI/miniooni-android-386 \
./CLI/ooniprobe-android-386
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
./script/ghpublish.bash ./CLI/miniooni-android-386 \
./CLI/ooniprobe-android-386
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Expand All @@ -98,9 +94,10 @@ jobs:
id: goversion
run: echo ::set-output name=version::$(cat GOVERSION)

- uses: actions/setup-go@v3
- uses: magnetikonline/action-golang-cache@v2
with:
go-version: "${{ steps.goversion.outputs.version }}"
cache-key-suffix: "-android-cli-amd64-${{ steps.goversion.outputs.version }}"

- run: |
echo -n $PSIPHON_CONFIG_KEY > ./internal/engine/psiphon-config.key
Expand All @@ -112,11 +109,8 @@ jobs:
- run: make CLI/android-amd64

- run: |
tag=$(echo $GITHUB_REF | sed 's|refs/tags/||g')
gh release create -p $tag --target $GITHUB_SHA || true
gh release upload $tag --clobber ./CLI/miniooni-android-amd64 \
./CLI/ooniprobe-android-amd64
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
./script/ghpublish.bash ./CLI/miniooni-android-amd64 \
./CLI/ooniprobe-android-amd64
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Expand All @@ -134,9 +128,10 @@ jobs:
id: goversion
run: echo ::set-output name=version::$(cat GOVERSION)

- uses: actions/setup-go@v3
- uses: magnetikonline/action-golang-cache@v2
with:
go-version: "${{ steps.goversion.outputs.version }}"
cache-key-suffix: "-android-cli-arm-${{ steps.goversion.outputs.version }}"

- run: |
echo -n $PSIPHON_CONFIG_KEY > ./internal/engine/psiphon-config.key
Expand All @@ -148,11 +143,8 @@ jobs:
- run: make CLI/android-arm

- run: |
tag=$(echo $GITHUB_REF | sed 's|refs/tags/||g')
gh release create -p $tag --target $GITHUB_SHA || true
gh release upload $tag --clobber ./CLI/miniooni-android-arm \
./CLI/ooniprobe-android-arm
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
./script/ghpublish.bash ./CLI/miniooni-android-arm \
./CLI/ooniprobe-android-arm
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Expand All @@ -170,9 +162,10 @@ jobs:
id: goversion
run: echo ::set-output name=version::$(cat GOVERSION)

- uses: actions/setup-go@v3
- uses: magnetikonline/action-golang-cache@v2
with:
go-version: "${{ steps.goversion.outputs.version }}"
cache-key-suffix: "-android-cli-arm64-${{ steps.goversion.outputs.version }}"

- run: |
echo -n $PSIPHON_CONFIG_KEY > ./internal/engine/psiphon-config.key
Expand All @@ -184,10 +177,7 @@ jobs:
- run: make CLI/android-arm64

- run: |
tag=$(echo $GITHUB_REF | sed 's|refs/tags/||g')
gh release create -p $tag --target $GITHUB_SHA || true
gh release upload $tag --clobber ./CLI/miniooni-android-arm64 \
./CLI/ooniprobe-android-arm64
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
./script/ghpublish.bash ./CLI/miniooni-android-arm64 \
./CLI/ooniprobe-android-arm64
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3 changes: 2 additions & 1 deletion .github/workflows/generate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@ jobs:
id: goversion
run: echo ::set-output name=version::$(cat GOVERSION)

- uses: actions/setup-go@v3
- uses: magnetikonline/action-golang-cache@v2
with:
go-version: "${{ steps.goversion.outputs.version }}"
cache-key-suffix: "-generate-${{ steps.goversion.outputs.version }}"

- run: go generate ./...
3 changes: 2 additions & 1 deletion .github/workflows/gosec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,10 @@ jobs:
id: goversion
run: echo ::set-output name=version::$(cat GOVERSION)

- uses: actions/setup-go@v3
- uses: magnetikonline/action-golang-cache@v2
with:
go-version: "${{ steps.goversion.outputs.version }}"
cache-key-suffix: "-gosec-${{ steps.goversion.outputs.version }}"

- name: Run Gosec security scanner
continue-on-error: true # TODO(https://github.com/ooni/probe/issues/2180)
Expand Down
10 changes: 4 additions & 6 deletions .github/workflows/ios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,10 @@ jobs:
id: goversion
run: echo ::set-output name=version::$(cat GOVERSION)

- uses: actions/setup-go@v3
- uses: magnetikonline/action-golang-cache@v2
with:
go-version: "${{ steps.goversion.outputs.version }}"
cache-key-suffix: "-ios-${{ steps.goversion.outputs.version }}"

- run: |
echo -n $PSIPHON_CONFIG_KEY > ./internal/engine/psiphon-config.key
Expand All @@ -37,10 +38,7 @@ jobs:
- run: make EXPECTED_XCODE_VERSION=12.4 MOBILE/ios

- run: |
tag=$(echo $GITHUB_REF | sed 's|refs/tags/||g')
gh release create -p $tag --target $GITHUB_SHA || true
gh release upload $tag --clobber ./MOBILE/ios/oonimkall.xcframework.zip \
./MOBILE/ios/oonimkall.podspec
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
./script/ghpublish.bash ./MOBILE/ios/oonimkall.xcframework.zip \
./MOBILE/ios/oonimkall.podspec
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3 changes: 2 additions & 1 deletion .github/workflows/jafar.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@ jobs:
id: goversion
run: echo ::set-output name=version::$(cat GOVERSION)

- uses: actions/setup-go@v3
- uses: magnetikonline/action-golang-cache@v2
with:
go-version: "${{ steps.goversion.outputs.version }}"
cache-key-suffix: "-jafar-${{ steps.goversion.outputs.version }}"

- run: go build -v ./internal/cmd/jafar

Expand Down
30 changes: 5 additions & 25 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,7 @@ jobs:
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: |
tag=$(echo $GITHUB_REF | sed 's|refs/tags/||g')
gh release create -p $tag --target $GITHUB_SHA || true
gh release upload $tag --clobber ./CLI/ooniprobe-linux-386 ./CLI/miniooni-linux-386
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
- run: ./script/ghpublish.bash ./CLI/ooniprobe-linux-386 ./CLI/miniooni-linux-386
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Expand All @@ -50,11 +46,7 @@ jobs:
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: |
tag=$(echo $GITHUB_REF | sed 's|refs/tags/||g')
gh release create -p $tag --target $GITHUB_SHA || true
gh release upload $tag --clobber ./CLI/ooniprobe-linux-amd64 ./CLI/miniooni-linux-amd64
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
- run: ./script/ghpublish.bash ./CLI/ooniprobe-linux-amd64 ./CLI/miniooni-linux-amd64
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Expand All @@ -76,11 +68,7 @@ jobs:
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: |
tag=$(echo $GITHUB_REF | sed 's|refs/tags/||g')
gh release create -p $tag --target $GITHUB_SHA || true
gh release upload $tag --clobber ./CLI/ooniprobe-linux-armv6 ./CLI/miniooni-linux-armv6
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
- run: ./script/ghpublish.bash ./CLI/ooniprobe-linux-armv6 ./CLI/miniooni-linux-armv6
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Expand All @@ -102,11 +90,7 @@ jobs:
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: |
tag=$(echo $GITHUB_REF | sed 's|refs/tags/||g')
gh release create -p $tag --target $GITHUB_SHA || true
gh release upload $tag --clobber ./CLI/ooniprobe-linux-armv7 ./CLI/miniooni-linux-armv7
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
- run: ./script/ghpublish.bash ./CLI/ooniprobe-linux-armv7 ./CLI/miniooni-linux-armv7
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Expand All @@ -128,10 +112,6 @@ jobs:
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: |
tag=$(echo $GITHUB_REF | sed 's|refs/tags/||g')
gh release create -p $tag --target $GITHUB_SHA || true
gh release upload $tag --clobber ./CLI/ooniprobe-linux-arm64 ./CLI/miniooni-linux-arm64
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
- run: ./script/ghpublish.bash ./CLI/ooniprobe-linux-arm64 ./CLI/miniooni-linux-arm64
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
14 changes: 6 additions & 8 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,10 @@ jobs:
id: goversion
run: echo ::set-output name=version::$(cat GOVERSION)

- uses: actions/setup-go@v3
- uses: magnetikonline/action-golang-cache@v2
with:
go-version: "${{ steps.goversion.outputs.version }}"
cache-key-suffix: "-macos-${{ steps.goversion.outputs.version }}"

- run: |
echo -n $PSIPHON_CONFIG_KEY > ./internal/engine/psiphon-config.key
Expand All @@ -39,12 +40,9 @@ jobs:
- run: ./E2E/ooniprobe.sh ./CLI/ooniprobe-darwin-amd64

- run: |
tag=$(echo $GITHUB_REF | sed 's|refs/tags/||g')
gh release create -p $tag --target $GITHUB_SHA || true
gh release upload $tag --clobber ./CLI/ooniprobe-darwin-amd64 \
./CLI/ooniprobe-darwin-arm64 \
./CLI/miniooni-darwin-amd64 \
./CLI/miniooni-darwin-arm64
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
./script/ghpublish.bash ./CLI/ooniprobe-darwin-amd64 \
./CLI/ooniprobe-darwin-arm64 \
./CLI/miniooni-darwin-amd64 \
./CLI/miniooni-darwin-arm64
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
9 changes: 3 additions & 6 deletions .github/workflows/oohelperd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,14 @@ jobs:
id: goversion
run: echo ::set-output name=version::$(cat GOVERSION)

- uses: actions/setup-go@v3
- uses: magnetikonline/action-golang-cache@v2
with:
go-version: "${{ steps.goversion.outputs.version }}"
cache-key-suffix: "-oohelperd-${{ steps.goversion.outputs.version }}"

- name: build oohelperd binary
run: GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -o ./CLI/oohelperd-linux-amd64 -v -tags netgo -ldflags="-s -w -extldflags -static" ./internal/cmd/oohelperd

- run: |
tag=$(echo $GITHUB_REF | sed 's|refs/tags/||g')
gh release create -p $tag --target $GITHUB_SHA || true
gh release upload $tag --clobber ./CLI/oohelperd-linux-amd64
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
- run: ./script/ghpublish.bash ./CLI/oohelperd-linux-amd64
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
9 changes: 0 additions & 9 deletions .github/workflows/qafbmessenger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,4 @@ jobs:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2

- name: Get GOVERSION content
id: goversion
run: echo ::set-output name=version::$(cat GOVERSION)

- uses: actions/setup-go@v3
with:
go-version: "${{ steps.goversion.outputs.version }}"

- run: ./QA/rundocker.bash "fbmessenger"
9 changes: 0 additions & 9 deletions .github/workflows/qahhfm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,4 @@ jobs:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2

- name: Get GOVERSION content
id: goversion
run: echo ::set-output name=version::$(cat GOVERSION)

- uses: actions/setup-go@v3
with:
go-version: "${{ steps.goversion.outputs.version }}"

- run: ./QA/rundocker.bash "hhfm"
9 changes: 0 additions & 9 deletions .github/workflows/qahirl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,4 @@ jobs:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2

- name: Get GOVERSION content
id: goversion
run: echo ::set-output name=version::$(cat GOVERSION)

- uses: actions/setup-go@v3
with:
go-version: "${{ steps.goversion.outputs.version }}"

- run: ./QA/rundocker.bash "hirl"
9 changes: 0 additions & 9 deletions .github/workflows/qatelegram.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,4 @@ jobs:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2

- name: Get GOVERSION content
id: goversion
run: echo ::set-output name=version::$(cat GOVERSION)

- uses: actions/setup-go@v3
with:
go-version: "${{ steps.goversion.outputs.version }}"

- run: ./QA/rundocker.bash "telegram"
9 changes: 0 additions & 9 deletions .github/workflows/qawebconnectivity.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,4 @@ jobs:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2

- name: Get GOVERSION content
id: goversion
run: echo ::set-output name=version::$(cat GOVERSION)

- uses: actions/setup-go@v3
with:
go-version: "${{ steps.goversion.outputs.version }}"

- run: ./QA/rundocker.bash "webconnectivity"
9 changes: 0 additions & 9 deletions .github/workflows/qawhatsapp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,4 @@ jobs:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2

- name: Get GOVERSION content
id: goversion
run: echo ::set-output name=version::$(cat GOVERSION)

- uses: actions/setup-go@v3
with:
go-version: "${{ steps.goversion.outputs.version }}"

- run: ./QA/rundocker.bash "whatsapp"
Loading