Skip to content
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
49 changes: 25 additions & 24 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ on:
merge_group:
branches:
- master
workflow_dispatch:

env:
GO_VERSION: "1.25"
Expand All @@ -28,7 +29,7 @@ concurrency:
jobs:
build-linter:
name: Build Custom Linter
runs-on: ubuntu-latest
runs-on: blacksmith-4vcpu-ubuntu-2404
steps:
- name: Check out code
uses: actions/checkout@v4
Expand Down Expand Up @@ -68,7 +69,7 @@ jobs:
matrix:
dir: [./, ./integration/, ./insecure/]
name: Lint
runs-on: ubuntu-latest
runs-on: blacksmith-4vcpu-ubuntu-2404
needs: build-linter # must wait for custom linter binary to be available
steps:
- name: Checkout repo
Expand Down Expand Up @@ -114,7 +115,7 @@ jobs:

tidy:
name: Tidy
runs-on: ubuntu-latest
runs-on: blacksmith-4vcpu-ubuntu-2404
steps:
- name: Checkout repo
uses: actions/checkout@v4
Expand All @@ -138,7 +139,7 @@ jobs:

create-dynamic-test-matrix:
name: Create Dynamic Test Matrix
runs-on: ubuntu-latest
runs-on: blacksmith-4vcpu-ubuntu-2404
outputs:
dynamic-matrix: ${{ steps.set-test-matrix.outputs.dynamicMatrix }}
steps:
Expand All @@ -156,7 +157,7 @@ jobs:

create-insecure-dynamic-test-matrix:
name: Create Dynamic Unit Test Insecure Package Matrix
runs-on: ubuntu-latest
runs-on: blacksmith-4vcpu-ubuntu-2404
outputs:
dynamic-matrix: ${{ steps.set-test-matrix.outputs.dynamicMatrix }}
steps:
Expand All @@ -174,7 +175,7 @@ jobs:

create-integration-dynamic-test-matrix:
name: Create Dynamic Integration Test Package Matrix
runs-on: ubuntu-latest
runs-on: blacksmith-4vcpu-ubuntu-2404
outputs:
dynamic-matrix: ${{ steps.set-test-matrix.outputs.dynamicMatrix }}
steps:
Expand Down Expand Up @@ -284,7 +285,7 @@ jobs:

docker-build:
name: Docker Build
runs-on: buildjet-16vcpu-ubuntu-2204
runs-on: blacksmith-16vcpu-ubuntu-2404
env:
CADENCE_DEPLOY_KEY: ${{ secrets.CADENCE_DEPLOY_KEY }}
steps:
Expand Down Expand Up @@ -398,56 +399,56 @@ jobs:
include:
- name: Access Cohort1 Integration Tests
make: make -C integration access-cohort1-tests
runner: buildjet-4vcpu-ubuntu-2204
runner: blacksmith-4vcpu-ubuntu-2404
- name: Access Cohort2 Integration Tests
make: make -C integration access-cohort2-tests
runner: ubuntu-latest
runner: blacksmith-4vcpu-ubuntu-2404
- name: Access Cohort3 Integration Tests
make: make -C integration access-cohort3-tests
runner: ubuntu-latest
runner: blacksmith-4vcpu-ubuntu-2404
- name: Access Cohort4 Integration Tests
make: make -C integration access-cohort4-tests
runner: ubuntu-latest
runner: blacksmith-4vcpu-ubuntu-2404
# test suite has single test which is flaky and needs to be fixed - reminder here to put it back when it's fixed
# - name: BFT (Framework) Integration Tests
# make: make -C integration bft-framework-tests
# runner: ubuntu-latest
# runner: blacksmith-4vcpu-ubuntu-2404
- name: BFT (Protocol) Integration Tests
make: make -C integration bft-protocol-tests
runner: buildjet-8vcpu-ubuntu-2204
runner: blacksmith-8vcpu-ubuntu-2404
- name: BFT (Gossipsub) Integration Tests
make: make -C integration bft-gossipsub-tests
runner: ubuntu-latest
runner: blacksmith-4vcpu-ubuntu-2404
- name: Collection Integration Tests
make: make -C integration collection-tests
runner: ubuntu-latest
runner: blacksmith-4vcpu-ubuntu-2404
- name: Consensus Integration Tests
make: make -C integration consensus-tests
runner: ubuntu-latest
runner: blacksmith-4vcpu-ubuntu-2404
- name: Epoch Cohort1 Integration Tests
make: make -C integration epochs-cohort1-tests
runner: buildjet-8vcpu-ubuntu-2204
runner: blacksmith-8vcpu-ubuntu-2404
- name: Epoch Cohort2 Integration Tests
make: make -C integration epochs-cohort2-tests
runner: buildjet-4vcpu-ubuntu-2204
runner: blacksmith-4vcpu-ubuntu-2404
- name: Execution Integration Tests
make: make -C integration execution-tests
runner: ubuntu-latest
runner: blacksmith-4vcpu-ubuntu-2404
- name: Ghost Integration Tests
make: make -C integration ghost-tests
runner: ubuntu-latest
runner: blacksmith-4vcpu-ubuntu-2404
- name: MVP Integration Tests
make: make -C integration mvp-tests
runner: ubuntu-latest
runner: blacksmith-4vcpu-ubuntu-2404
- name: Network Integration Tests
make: make -C integration network-tests
runner: ubuntu-latest
runner: blacksmith-4vcpu-ubuntu-2404
- name: Verification Integration Tests
make: make -C integration verification-tests
runner: ubuntu-latest
runner: blacksmith-4vcpu-ubuntu-2404
- name: Upgrade Integration Tests
make: make -C integration upgrades-tests
runner: ubuntu-latest
runner: blacksmith-4vcpu-ubuntu-2404
runs-on: ${{ matrix.runner }}
steps:
- name: Checkout repo
Expand Down
10 changes: 9 additions & 1 deletion .github/workflows/image_builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -117,12 +117,14 @@ jobs:
# It uses a matrix strategy to handle the builds for different roles in parallel.
# The environment is set to 'secure builds' to ensure that the builds are gated and only approved images are deployed.
# The job is triggered only if the 'secure-build' input is set to 'true'.
# The job uses an action to execute a cross-repo workflow that builds and pushes the images to the private registry.
# max-parallel: 1 ensures each role gets the correct run ID (avoids wrong run mapping when polling).
# Set vars.SECURE_BUILDS_REPO (e.g. flow-go-internal) for unmasked run links in logs.
name: Execute secure build & push to private registry
runs-on: ubuntu-latest
if: ${{ github.event.inputs.secure-build == 'true' }}
strategy:
fail-fast: false
max-parallel: 1
matrix:
role: [access, collection, consensus, execution, observer, verification]
environment: secure builds
Expand All @@ -135,6 +137,7 @@ jobs:
owner: ${{ github.repository_owner }}

- uses: convictional/trigger-workflow-and-wait@v1.6.5
id: trigger-secure-build
with:
client_payload: '{"role": "${{ matrix.role }}", "tag": "${{ inputs.tag }}"}'
github_token: ${{ steps.app-token.outputs.token }}
Expand All @@ -143,6 +146,11 @@ jobs:
ref: master-private
workflow_file_name: 'secure_build.yml'

- name: Print secure build run URL
run: |
REPO="${{ vars.SECURE_BUILDS_REPO || 'flow-go-internal' }}"
echo "Secure build for ${{ matrix.role }}: https://github.com/onflow/${REPO}/actions/runs/${{ steps.trigger-secure-build.outputs.workflow_id }}"

promote-to-partner-registry:
# This job promotes container images from the private registry to the partner registry.
# As of right now, the only role being promoted to the partner registry is 'access'.
Expand Down
14 changes: 7 additions & 7 deletions tools/test_matrix_generator/default-test-matrix-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,25 @@
{"name": "state"},
{"name": "storage"},
{"name": "utils"},
{"name": "engine", "runner": "buildjet-4vcpu-ubuntu-2004" ,"subpackages": [
{"name": "engine", "runner": "blacksmith-4vcpu-ubuntu-2404" ,"subpackages": [
{"name": "engine/access"},
{"name": "engine/collection"},
{"name": "engine/common"},
{"name": "engine/consensus"},
{"name": "engine/execution/computation"},
{"name": "engine/execution"},
{"name": "engine/verification"},
{"name": "engine/execution/ingestion", "runner": "buildjet-8vcpu-ubuntu-2004"}
{"name": "engine/execution/ingestion", "runner": "blacksmith-8vcpu-ubuntu-2404"}
]},
{"name": "module", "runner": "buildjet-4vcpu-ubuntu-2004" ,"subpackages": [{"name": "module/dkg"}]},
{"name": "module", "runner": "blacksmith-4vcpu-ubuntu-2404" ,"subpackages": [{"name": "module/dkg"}]},
{"name": "network", "subpackages": [
{"name": "network/alsp"},
{"name": "network/p2p/connection"},
{"name": "network/p2p/scoring"},
{"name": "network/p2p", "runner": "buildjet-16vcpu-ubuntu-2004"},
{"name": "network/test/cohort1", "runner": "buildjet-16vcpu-ubuntu-2004"},
{"name": "network/test/cohort2", "runner": "buildjet-4vcpu-ubuntu-2004"},
{"name": "network/p2p/node", "runner": "buildjet-4vcpu-ubuntu-2004"}
{"name": "network/p2p", "runner": "blacksmith-16vcpu-ubuntu-2404"},
{"name": "network/test/cohort1", "runner": "blacksmith-16vcpu-ubuntu-2404"},
{"name": "network/test/cohort2", "runner": "blacksmith-4vcpu-ubuntu-2404"},
{"name": "network/p2p/node", "runner": "blacksmith-4vcpu-ubuntu-2404"}
]}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
"packagesPath": "./insecure",
"includeOthers": false,
"packages": [
{"name": "insecure", "runner": "buildjet-4vcpu-ubuntu-2004" ,"subpackages": [
{"name": "insecure/integration/functional/test/gossipsub/rpc_inspector", "runner": "buildjet-8vcpu-ubuntu-2004"},
{"name": "insecure/integration/functional/test/gossipsub/scoring", "runner": "buildjet-8vcpu-ubuntu-2004"}
{"name": "insecure", "runner": "blacksmith-4vcpu-ubuntu-2404" ,"subpackages": [
{"name": "insecure/integration/functional/test/gossipsub/rpc_inspector", "runner": "blacksmith-8vcpu-ubuntu-2404"},
{"name": "insecure/integration/functional/test/gossipsub/scoring", "runner": "blacksmith-8vcpu-ubuntu-2404"}
]}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"includeOthers": false,
"packages": [{
"name": "integration",
"runner": "buildjet-4vcpu-ubuntu-2004",
"runner": "blacksmith-4vcpu-ubuntu-2404",
"exclude": ["integration/tests"]
}]
}
2 changes: 1 addition & 1 deletion tools/test_matrix_generator/matrix.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ var (
const (
flowPackagePrefix = "github.com/onflow/flow-go/"
ciMatrixName = "dynamicMatrix"
defaultCIRunner = "ubuntu-latest"
defaultCIRunner = "blacksmith-4vcpu-ubuntu-2404"
)

// flowGoPackage configuration for a package to be tested.
Expand Down
6 changes: 3 additions & 3 deletions tools/test_matrix_generator/matrix_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ func TestBuildMatrices(t *testing.T) {
})
t.Run("top level package only override runner", func(t *testing.T) {
name := "counter"
runner := "buildjet-4vcpu-ubuntu-2204"
runner := "blacksmith-4vcpu-ubuntu-2404"
configFile := fmt.Sprintf(`{"packagesPath": ".", "packages": [{"name": "%s", "runner": "%s"}]}`, name, runner)
allPackges := goPackageFixture("counter/count", "counter/print/int", "counter/log")
cfg := loadPackagesConfig(configFile)
Expand All @@ -59,7 +59,7 @@ func TestBuildMatrices(t *testing.T) {
subPkg2 := "module/chunks"
subPkg3 := "crypto/hash"
subPkg4 := "model/bootstrap"
subPkg1Runner := "buildjet-4vcpu-ubuntu-2204"
subPkg1Runner := "blacksmith-4vcpu-ubuntu-2404"
configFile := fmt.Sprintf(`
{"packagesPath": ".", "includeOthers": true, "packages": [{"name": "%s", "subpackages": [{"name": "%s", "runner": "%s"}, {"name": "%s"}, {"name": "%s"}, {"name": "%s"}]}]}`,
topLevelPkgName, subPkg1, subPkg1Runner, subPkg2, subPkg3, subPkg4)
Expand Down Expand Up @@ -112,7 +112,7 @@ func TestBuildMatrices(t *testing.T) {
t.Run("top level package with sub packages and exclude", func(t *testing.T) {
topLevelPkgName := "network"
subPkg1 := "network/p2p/node"
subPkg1Runner := "buildjet-4vcpu-ubuntu-2204"
subPkg1Runner := "blacksmith-4vcpu-ubuntu-2404"
configFile := fmt.Sprintf(`
{"packagesPath": ".", "packages": [{"name": "%s", "exclude": ["network/alsp"], "subpackages": [{"name": "%s", "runner": "%s"}]}]}`,
topLevelPkgName, subPkg1, subPkg1Runner)
Expand Down
Loading