Go #60001
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Go | |
| on: | |
| push: | |
| branches: [ master, develop ] | |
| pull_request: | |
| branches: [ '*' ] | |
| merge_group: | |
| types: [checks_requested] | |
| permissions: | |
| contents: read | |
| jobs: | |
| formatting: | |
| name: Formatting | |
| runs-on: ubuntu-4 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up Go 1.25.1 | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: '1.25.1' | |
| - name: Go mod tidy checker | |
| run: go mod tidy -diff | |
| gosec: | |
| name: Gosec scan | |
| runs-on: ubuntu-4 | |
| env: | |
| GO111MODULE: on | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up Go 1.26.5 | |
| uses: actions/setup-go@v4 | |
| with: | |
| go-version: '1.26.5' | |
| - name: Run Gosec Security Scanner | |
| run: | # https://github.com/securego/gosec/issues/469 | |
| export PATH=$PATH:$(go env GOPATH)/bin | |
| go install github.com/securego/gosec/v2/cmd/gosec@v2.22.1 | |
| gosec -exclude-generated -exclude=G307,G115 -exclude-dir=crypto/bls/herumi ./... | |
| lint: | |
| name: Lint | |
| runs-on: ubuntu-4 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up Go 1.26.5 | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: '1.26.5' | |
| - name: Golangci-lint | |
| uses: golangci/golangci-lint-action@v8 | |
| with: | |
| version: v2.12 | |
| build: | |
| name: Build | |
| runs-on: ubuntu-4 | |
| steps: | |
| - name: Set up Go 1.26.5 | |
| uses: actions/setup-go@v4 | |
| with: | |
| go-version: '1.26.5' | |
| id: go | |
| - name: Check out code into the Go module directory | |
| uses: actions/checkout@v4 | |
| - name: Get dependencies | |
| run: | | |
| go get -v -t -d ./... | |
| - name: Build | |
| # Use blst tag to allow go and bazel builds for blst. | |
| run: go build -v ./... | |
| env: | |
| CGO_CFLAGS: "-O2 -D__BLST_PORTABLE__" | |
| # fuzz leverage go tag based stubs at compile time. | |
| # Building and testing with these tags should be checked and enforced at pre-submit. | |
| - name: Test for fuzzing | |
| run: go test -tags=fuzz,develop ./... -test.run=^Fuzz | |
| env: | |
| CGO_CFLAGS: "-O2 -D__BLST_PORTABLE__" | |
| test-mainnet: | |
| name: Test (mainnet, excluding spectests) | |
| runs-on: ubuntu-4 | |
| # TODO: Remove `continue-on-error: true` when removing Bazel | |
| continue-on-error: true | |
| steps: | |
| - name: Set up Go 1.26.5 | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: '1.26.5' | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Run mainnet tests | |
| run: make test mainnet | |
| env: | |
| CGO_CFLAGS: "-O2 -D__BLST_PORTABLE__" | |
| test-mainnet-spectest: | |
| name: Test (mainnet spectests) | |
| runs-on: ubuntu-4 | |
| # TODO: Remove `continue-on-error: true` when removing Bazel | |
| continue-on-error: true | |
| steps: | |
| - name: Set up Go 1.26.5 | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: '1.26.5' | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Run mainnet spectests | |
| run: make test mainnet-spectest | |
| env: | |
| CGO_CFLAGS: "-O2 -D__BLST_PORTABLE__" | |
| test-minimal: | |
| name: Test (minimal, including spectests) | |
| runs-on: ubuntu-4 | |
| # TODO: Remove `continue-on-error: true` when removing Bazel | |
| continue-on-error: true | |
| steps: | |
| - name: Set up Go 1.26.5 | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: '1.26.5' | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Run minimal tests | |
| run: make test minimal minimal-spectest | |
| env: | |
| CGO_CFLAGS: "-O2 -D__BLST_PORTABLE__" |