cleanup: define required Go version just once (#861)
See https://github.com/ooni/probe/issues/2217
This commit is contained in:
parent
6a0ae5c70b
commit
3cc2ce0b81
10
.github/workflows/alltests.yml
vendored
10
.github/workflows/alltests.yml
vendored
|
@ -9,8 +9,14 @@ jobs:
|
|||
test:
|
||||
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@v1
|
||||
with:
|
||||
go-version: "1.18.3"
|
||||
- uses: actions/checkout@v2
|
||||
go-version: "${{ steps.goversion.outputs.version }}"
|
||||
|
||||
- run: go test -race -tags shaping ./...
|
||||
|
|
12
.github/workflows/android.yml
vendored
12
.github/workflows/android.yml
vendored
|
@ -14,14 +14,18 @@ jobs:
|
|||
contents: write
|
||||
|
||||
steps:
|
||||
- uses: actions/setup-go@v1
|
||||
with:
|
||||
go-version: "1.18.3"
|
||||
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Get GOVERSION content
|
||||
id: goversion
|
||||
run: echo ::set-output name=version::$(cat GOVERSION)
|
||||
|
||||
- uses: actions/setup-go@v1
|
||||
with:
|
||||
go-version: "${{ steps.goversion.outputs.version }}"
|
||||
|
||||
- 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
|
||||
|
|
18
.github/workflows/coverage.yml
vendored
18
.github/workflows/coverage.yml
vendored
|
@ -10,17 +10,21 @@ on:
|
|||
jobs:
|
||||
measure_coverage:
|
||||
runs-on: ubuntu-20.04
|
||||
strategy:
|
||||
matrix:
|
||||
go:
|
||||
- "1.18.3"
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Get GOVERSION content
|
||||
id: goversion
|
||||
run: echo ::set-output name=version::$(cat GOVERSION)
|
||||
|
||||
- uses: magnetikonline/action-golang-cache@v2
|
||||
with:
|
||||
go-version: "${{ matrix.go }}"
|
||||
cache-key-suffix: "-coverage-${{ matrix.go }}"
|
||||
- uses: actions/checkout@v2
|
||||
go-version: "${{ steps.goversion.outputs.version }}"
|
||||
cache-key-suffix: "-coverage-${{ steps.goversion.outputs.version }}"
|
||||
|
||||
- run: go test -short -race -tags shaping -coverprofile=probe-cli.cov ./...
|
||||
|
||||
- uses: shogo82148/actions-goveralls@v1
|
||||
with:
|
||||
path-to-profile: probe-cli.cov
|
||||
|
|
10
.github/workflows/generate.yml
vendored
10
.github/workflows/generate.yml
vendored
|
@ -9,8 +9,14 @@ jobs:
|
|||
test:
|
||||
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@v1
|
||||
with:
|
||||
go-version: "1.18.3"
|
||||
- uses: actions/checkout@v2
|
||||
go-version: "${{ steps.goversion.outputs.version }}"
|
||||
|
||||
- run: go generate ./...
|
||||
|
|
12
.github/workflows/gosec.yml
vendored
12
.github/workflows/gosec.yml
vendored
|
@ -11,14 +11,18 @@ jobs:
|
|||
runs-on: ubuntu-20.04
|
||||
env:
|
||||
GO111MODULE: on
|
||||
strategy:
|
||||
matrix:
|
||||
go:
|
||||
- "1.18.3"
|
||||
steps:
|
||||
- name: Checkout Source
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Get GOVERSION content
|
||||
id: goversion
|
||||
run: echo ::set-output name=version::$(cat GOVERSION)
|
||||
|
||||
- uses: actions/setup-go@v1
|
||||
with:
|
||||
go-version: "${{ steps.goversion.outputs.version }}"
|
||||
|
||||
- name: Run Gosec security scanner
|
||||
continue-on-error: true # TODO(https://github.com/ooni/probe/issues/2180)
|
||||
uses: securego/gosec@master
|
||||
|
|
11
.github/workflows/ios.yml
vendored
11
.github/workflows/ios.yml
vendored
|
@ -14,13 +14,18 @@ jobs:
|
|||
contents: write
|
||||
|
||||
steps:
|
||||
- uses: actions/setup-go@v1
|
||||
with:
|
||||
go-version: "1.18.3"
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Get GOVERSION content
|
||||
id: goversion
|
||||
run: echo ::set-output name=version::$(cat GOVERSION)
|
||||
|
||||
- uses: actions/setup-go@v1
|
||||
with:
|
||||
go-version: "${{ steps.goversion.outputs.version }}"
|
||||
|
||||
- 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
|
||||
|
|
11
.github/workflows/jafar.yml
vendored
11
.github/workflows/jafar.yml
vendored
|
@ -9,9 +9,16 @@ jobs:
|
|||
test:
|
||||
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@v1
|
||||
with:
|
||||
go-version: "1.18.3"
|
||||
- uses: actions/checkout@v2
|
||||
go-version: "${{ steps.goversion.outputs.version }}"
|
||||
|
||||
- run: go build -v ./internal/cmd/jafar
|
||||
|
||||
- run: sudo ./testjafar.bash
|
||||
|
|
15
.github/workflows/macos.yml
vendored
15
.github/workflows/macos.yml
vendored
|
@ -13,19 +13,28 @@ jobs:
|
|||
permissions: # See https://github.com/ooni/probe/issues/2154
|
||||
contents: write
|
||||
steps:
|
||||
- uses: actions/setup-go@v1
|
||||
with:
|
||||
go-version: "1.18.3"
|
||||
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Get GOVERSION content
|
||||
id: goversion
|
||||
run: echo ::set-output name=version::$(cat GOVERSION)
|
||||
|
||||
- uses: actions/setup-go@v1
|
||||
with:
|
||||
go-version: "${{ steps.goversion.outputs.version }}"
|
||||
|
||||
- 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: ./mk ./CLI/ooniprobe-darwin
|
||||
|
||||
- run: ./E2E/ooniprobe.sh ./CLI/ooniprobe-darwin-amd64
|
||||
|
||||
- run: |
|
||||
|
|
12
.github/workflows/miniooni.yml
vendored
12
.github/workflows/miniooni.yml
vendored
|
@ -19,14 +19,18 @@ jobs:
|
|||
contents: write
|
||||
steps:
|
||||
|
||||
- uses: actions/setup-go@v1
|
||||
with:
|
||||
go-version: "1.18.3"
|
||||
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Get GOVERSION content
|
||||
id: goversion
|
||||
run: echo ::set-output name=version::$(cat GOVERSION)
|
||||
|
||||
- uses: actions/setup-go@v1
|
||||
with:
|
||||
go-version: "${{ steps.goversion.outputs.version }}"
|
||||
|
||||
- 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
|
||||
|
|
14
.github/workflows/netxlite.yml
vendored
14
.github/workflows/netxlite.yml
vendored
|
@ -14,14 +14,20 @@ jobs:
|
|||
runs-on: "${{ matrix.os }}"
|
||||
strategy:
|
||||
matrix:
|
||||
go: [ "1.18.3" ]
|
||||
os: [ "ubuntu-20.04", "windows-2019", "macos-10.15" ]
|
||||
steps:
|
||||
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Get GOVERSION content
|
||||
id: goversion
|
||||
run: echo ::set-output name=version::$(cat GOVERSION)
|
||||
shell: bash
|
||||
|
||||
- uses: magnetikonline/action-golang-cache@v2
|
||||
with:
|
||||
go-version: "${{ matrix.go }}"
|
||||
cache-key-suffix: "-coverage-${{ matrix.go }}"
|
||||
- uses: actions/checkout@v2
|
||||
go-version: "${{ steps.goversion.outputs.version }}"
|
||||
cache-key-suffix: "-coverage-${{ steps.goversion.outputs.version }}"
|
||||
|
||||
# The first test compiles and links against libc and uses getaddrinfo
|
||||
- run: go test -race ./internal/netxlite/...
|
||||
|
|
7
.github/workflows/oohelperd.yml
vendored
7
.github/workflows/oohelperd.yml
vendored
|
@ -14,9 +14,14 @@ jobs:
|
|||
contents: write
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Get GOVERSION content
|
||||
id: goversion
|
||||
run: echo ::set-output name=version::$(cat GOVERSION)
|
||||
|
||||
- uses: actions/setup-go@v1
|
||||
with:
|
||||
go-version: "1.18.3"
|
||||
go-version: "${{ 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
|
||||
|
|
10
.github/workflows/qafbmessenger.yml
vendored
10
.github/workflows/qafbmessenger.yml
vendored
|
@ -9,8 +9,14 @@ jobs:
|
|||
test:
|
||||
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@v1
|
||||
with:
|
||||
go-version: "1.18.3"
|
||||
- uses: actions/checkout@v2
|
||||
go-version: "${{ steps.goversion.outputs.version }}"
|
||||
|
||||
- run: ./QA/rundocker.bash "fbmessenger"
|
||||
|
|
10
.github/workflows/qahhfm.yml
vendored
10
.github/workflows/qahhfm.yml
vendored
|
@ -9,8 +9,14 @@ jobs:
|
|||
test:
|
||||
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@v1
|
||||
with:
|
||||
go-version: "1.18.3"
|
||||
- uses: actions/checkout@v2
|
||||
go-version: "${{ steps.goversion.outputs.version }}"
|
||||
|
||||
- run: ./QA/rundocker.bash "hhfm"
|
||||
|
|
10
.github/workflows/qahirl.yml
vendored
10
.github/workflows/qahirl.yml
vendored
|
@ -9,8 +9,14 @@ jobs:
|
|||
test:
|
||||
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@v1
|
||||
with:
|
||||
go-version: "1.18.3"
|
||||
- uses: actions/checkout@v2
|
||||
go-version: "${{ steps.goversion.outputs.version }}"
|
||||
|
||||
- run: ./QA/rundocker.bash "hirl"
|
||||
|
|
10
.github/workflows/qatelegram.yml
vendored
10
.github/workflows/qatelegram.yml
vendored
|
@ -9,8 +9,14 @@ jobs:
|
|||
test:
|
||||
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@v1
|
||||
with:
|
||||
go-version: "1.18.3"
|
||||
- uses: actions/checkout@v2
|
||||
go-version: "${{ steps.goversion.outputs.version }}"
|
||||
|
||||
- run: ./QA/rundocker.bash "telegram"
|
||||
|
|
10
.github/workflows/qawebconnectivity.yml
vendored
10
.github/workflows/qawebconnectivity.yml
vendored
|
@ -9,8 +9,14 @@ jobs:
|
|||
test:
|
||||
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@v1
|
||||
with:
|
||||
go-version: "1.18.3"
|
||||
- uses: actions/checkout@v2
|
||||
go-version: "${{ steps.goversion.outputs.version }}"
|
||||
|
||||
- run: ./QA/rundocker.bash "webconnectivity"
|
||||
|
|
10
.github/workflows/qawhatsapp.yml
vendored
10
.github/workflows/qawhatsapp.yml
vendored
|
@ -9,8 +9,14 @@ jobs:
|
|||
test:
|
||||
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@v1
|
||||
with:
|
||||
go-version: "1.18.3"
|
||||
- uses: actions/checkout@v2
|
||||
go-version: "${{ steps.goversion.outputs.version }}"
|
||||
|
||||
- run: ./QA/rundocker.bash "whatsapp"
|
||||
|
|
12
.github/workflows/tarball.yml
vendored
12
.github/workflows/tarball.yml
vendored
|
@ -16,15 +16,21 @@ jobs:
|
|||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v2
|
||||
|
||||
- name: Get GOVERSION content
|
||||
id: goversion
|
||||
run: echo ::set-output name=version::$(cat GOVERSION)
|
||||
|
||||
- uses: actions/setup-go@v1
|
||||
with:
|
||||
go-version: "1.18.3"
|
||||
go-version: "${{ steps.goversion.outputs.version }}"
|
||||
|
||||
- name: Generate release tarball
|
||||
run: |
|
||||
VERSION=${GITHUB_REF_NAME#v}
|
||||
go mod vendor
|
||||
tar czf ooni-probe-cli-${VERSION}.tar.gz --transform "s,^,ooni-probe-cli-${VERSION}/," *
|
||||
|
||||
- name: Upload release tarball
|
||||
run: |
|
||||
gh release create -p $GITHUB_REF_NAME --target $GITHUB_SHA || true
|
||||
|
|
15
.github/workflows/windows.yml
vendored
15
.github/workflows/windows.yml
vendored
|
@ -11,12 +11,18 @@ jobs:
|
|||
build:
|
||||
runs-on: "ubuntu-20.04"
|
||||
steps:
|
||||
- uses: actions/setup-go@v1
|
||||
with:
|
||||
go-version: "1.18.3"
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Get GOVERSION content
|
||||
id: goversion
|
||||
run: echo ::set-output name=version::$(cat GOVERSION)
|
||||
|
||||
- uses: actions/setup-go@v1
|
||||
with:
|
||||
go-version: "${{ steps.goversion.outputs.version }}"
|
||||
|
||||
- run: sudo apt install mingw-w64
|
||||
- run: |
|
||||
echo -n $PSIPHON_CONFIG_KEY > ./internal/engine/psiphon-config.key
|
||||
|
@ -24,11 +30,14 @@ jobs:
|
|||
env:
|
||||
PSIPHON_CONFIG_KEY: ${{ secrets.PSIPHON_CONFIG_KEY }}
|
||||
PSIPHON_CONFIG_JSON_AGE_BASE64: ${{ secrets.PSIPHON_CONFIG_JSON_AGE_BASE64 }}
|
||||
|
||||
- run: ./mk MINGW_W64_VERSION="9.3-win32" ./CLI/ooniprobe-windows
|
||||
|
||||
- uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: ooniprobe-windows-amd64.exe
|
||||
path: ./CLI/ooniprobe-windows-amd64.exe
|
||||
|
||||
- uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: ooniprobe-windows-386.exe
|
||||
|
|
|
@ -53,8 +53,8 @@ Please, make sure you add the `ooni/probe-cli` label.
|
|||
|
||||
### ooniprobe
|
||||
|
||||
Be sure you have golang 1.18.3 and a C compiler (Mingw-w64 for Windows). You
|
||||
can build using:
|
||||
Be sure you have the golang version mentioned inside the [GOVERSION](GOVERSION)
|
||||
file and a C compiler (Mingw-w64 for Windows). You can build using:
|
||||
|
||||
```bash
|
||||
go build -v ./cmd/ooniprobe
|
||||
|
|
Loading…
Reference in New Issue
Block a user