Skip to content

[Crypto] update BLST version #26263

[Crypto] update BLST version

[Crypto] update BLST version #26263

Workflow file for this run

name: CI
on:
push:
branches:
- 'auto-cadence-upgrade/**'
- staging
- trying
- 'feature/**'
- 'v[0-9]+.[0-9]+'
pull_request:
branches:
- master*
- 'auto-cadence-upgrade/**'
- 'feature/**'
- 'v[0-9]+.[0-9]+'
merge_group:
branches:
- master
env:
GO_VERSION: "1.20"
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }}
cancel-in-progress: true
jobs:
golangci:
strategy:
fail-fast: false
matrix:
dir: [./, ./integration/, ./crypto/, ./insecure/]
name: Lint
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: ${{ env.GO_VERSION }}
cache: true
- name: Install C formatter
run: sudo apt-get install -y clang-format
- name: Run C formatter and sanitizer for ./crypto
run: make -C crypto c-format && make -C crypto c-sanitize
- name: Run go generate
run: go generate
working-directory: ${{ matrix.dir }}
- name: Run golangci-lint
uses: golangci/golangci-lint-action@v3
with:
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version.
version: v1.51
args: -v
working-directory: ${{ matrix.dir }}
# https://github.com/golangci/golangci-lint-action/issues/244
skip-cache: true
tidy:
name: Tidy
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: ${{ env.GO_VERSION }}
cache: true
- name: Run tidy
run: make tidy
- name: code sanity check
run: make code-sanity-check
create-dynamic-test-matrix:
name: Create Dynamic Test Matrix
runs-on: ubuntu-latest
outputs:
dynamic-matrix: ${{ steps.set-test-matrix.outputs.dynamicMatrix }}
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: ${{ env.GO_VERSION }}
cache: true
- name: Set Test Matrix
id: set-test-matrix
run: go run utils/test_matrix/test_matrix.go admin cmd consensus engine fvm ledger module network/test network/p2p utils
unit-test:
name: Unit Tests (${{ matrix.targets.name }})
needs: create-dynamic-test-matrix
strategy:
fail-fast: false
matrix:
targets: ${{ fromJSON(needs.create-dynamic-test-matrix.outputs.dynamic-matrix)}}
# need to set image explicitly due to GitHub logging issue as described in https://github.com/onflow/flow-go/pull/3087#issuecomment-1234383202
runs-on: ubuntu-20.04
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: ${{ env.GO_VERSION }}
cache: true
- name: Setup tests (${{ matrix.targets.name }})
run: VERBOSE=1 make -e GO_TEST_PACKAGES="${{ matrix.targets.packages }}" install-tools
- name: Setup tmate session
uses: mxschmitt/action-tmate@v3
- name: Run tests (${{ matrix.targets.name }})
uses: nick-fields/retry@v2
with:
timeout_minutes: 25
max_attempts: 3
command: VERBOSE=1 make -e GO_TEST_PACKAGES="${{ matrix.targets.packages }}" test
# TODO(rbtz): re-enable when we fix exisiting races.
#env:
# RACE_DETECTOR: 1
- name: Upload coverage report
uses: codecov/codecov-action@v3
with:
file: ./coverage.txt
flags: unittests
name: codecov-umbrella
unit-test-modules:
name: Unit Tests (Modules)
strategy:
fail-fast: false
matrix:
include:
- name: crypto
setup:
retries: 1
race: 1
- name: insecure
setup: install-tools
retries: 3
race: 0
- name: integration
setup: install-tools
retries: 3
race: 0
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: ${{ env.GO_VERSION }}
cache: true
- name: Setup tests (${{ matrix.name }})
run: make ${{ matrix.setup }}
- name: Run tests (${{ matrix.name }})
env:
RACE_DETECTOR: ${{ matrix.race }}
uses: nick-fields/retry@v2
with:
timeout_minutes: 25
max_attempts: ${{ matrix.retries }}
# run test target inside each module's root
command: VERBOSE=1 make -C ${{ matrix.name }} test
- name: Upload coverage report
uses: codecov/codecov-action@v3
with:
file: ./coverage.txt
flags: unittests
name: codecov-umbrella
integration-test:
name: Integration Tests
strategy:
fail-fast: false
matrix:
make:
- make -C integration access-tests
- make -C integration bft-framework-tests
- make -C integration bft-protocol-tests
- make -C integration bft-gossipsub-tests
- make -C integration collection-tests
- make -C integration consensus-tests
- make -C integration epochs-cohort1-tests
- make -C integration epochs-cohort2-tests
- make -C integration execution-tests
- make -C integration ghost-tests
- make -C integration mvp-tests
- make -C integration network-tests
- make -C integration verification-tests
- make -C integration upgrades-tests
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3
with:
# all tags are needed for integration tests
fetch-depth: 0
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: ${{ env.GO_VERSION }}
cache: true
- name: Docker build
run: make docker-build-flow docker-build-flow-corrupt
- name: Run tests
# TODO(rbtz): re-enable when we fix exisiting races.
#env:
# RACE_DETECTOR: 1
uses: nick-fields/retry@v2
with:
timeout_minutes: 25
max_attempts: 3
command: VERBOSE=1 ${{ matrix.make }}
localnet-test:
name: Localnet Compatibility Tests With Flow-CLI Client and Observer
strategy:
fail-fast: false
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: ${{ env.GO_VERSION }}
cache: true
- name: install tools
run: make install-tools
- name: Install Flow Client In Docker
# This proved to be more reliable than installing it locally.
run: cd integration/localnet && sh client/client.sh
- name: Set up Localnet
run: bash -c 'cd integration/localnet/ && make -e OBSERVER=2 bootstrap && make start-flow'
- name: Ensure Observer is started
run: docker ps -f name=localnet-observer_1-1 | grep localnet-observer
- name: Get Client Version ensuring the client is provisioned
run: docker run --network host localnet-client /go/flow -f /go/flow-localnet.json -n observer version
- name: Wait for a default waiting period until a clean state
# This will not cause flakiness.
# The waiting time is a reasonable time to expect an observer to be responsive
run: sleep 10
- name: Get Status ensuring the access endpoint is online
run: docker run --network host localnet-client /go/flow -f /go/flow-localnet.json -n access status
- name: Wait for finalized blocks and check them
run: docker run --network host localnet-client /go/flow -f /go/flow-localnet.json -n observer blocks get latest
- name: Wait for finalized blocks and check them with Observer
run: sleep 5 && docker run --network host localnet-client /go/flow -f /go/flow-localnet.json -n access blocks get latest && docker run --network host localnet-client /go/flow -f /go/flow-localnet.json -n observer blocks get latest
- name: Stop localnet
run: bash -c 'cd integration/localnet/ && make stop'