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
53 changes: 32 additions & 21 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -887,6 +887,10 @@ jobs:
description: List of changed files to run tests on
type: string
default: contracts-bedrock
dev_features:
description: Comma-separated list of dev features to enable (e.g., "OPTIMISM_PORTAL_INTEROP,ANOTHER_FEATURE")
type: string
default: ""
steps:
- checkout-from-workspace
- run:
Expand Down Expand Up @@ -920,6 +924,8 @@ jobs:
working_directory: packages/contracts-bedrock
- go-save-cache:
namespace: packages/contracts-bedrock/scripts/go-ffi
- setup-dev-features:
dev_features: <<parameters.dev_features>>
- run:
name: Run tests
command: |
Expand Down Expand Up @@ -1087,6 +1093,14 @@ jobs:
key: forked-state-contracts-bedrock-tests-upgrade-{{ checksum "packages/contracts-bedrock/pinnedBlockNumber.txt" }}
- setup-dev-features:
dev_features: <<parameters.dev_features>>
- run:
name: Build go-ffi
command: just build-go-ffi
working_directory: packages/contracts-bedrock
- run:
name: Build contract source
command: just build-source
working_directory: packages/contracts-bedrock
- run:
name: Run coverage tests
command: just coverage-lcov-all <<parameters.test_flags>>
Expand Down Expand Up @@ -2401,23 +2415,6 @@ workflows:
- contracts-bedrock-build
context:
- circleci-repo-readonly-authenticated-github-token
- contracts-bedrock-tests:
# Test everything except PreimageOracle.t.sol since it's slow.
name: contracts-bedrock-tests
test_list: find test -name "*.t.sol" -not -name "PreimageOracle.t.sol"
context:
- circleci-repo-readonly-authenticated-github-token
requires:
- initialize
check_changed_patterns: contracts-bedrock,op-node
- contracts-bedrock-tests:
# PreimageOracle test is slow, run it separately to unblock CI.
name: contracts-bedrock-tests-preimage-oracle
test_list: find test -name "PreimageOracle.t.sol"
context:
- circleci-repo-readonly-authenticated-github-token
requires:
- initialize
- contracts-bedrock-tests:
# Heavily fuzz any fuzz tests within added or modified test files.
name: contracts-bedrock-tests-heavy-fuzz-modified
Expand All @@ -2428,6 +2425,21 @@ workflows:
- circleci-repo-readonly-authenticated-github-token
requires:
- initialize
- contracts-bedrock-tests:
name: contracts-bedrock-tests <<matrix.dev_features>>
test_list: find test -name "*.t.sol"
dev_features: <<matrix.dev_features>>
matrix:
parameters:
dev_features: &dev_features_matrix
- main
- OPTIMISM_PORTAL_INTEROP
- CANNON_KONA,DEPLOY_V2_DISPUTE_GAMES
context:
- circleci-repo-readonly-authenticated-github-token
requires:
- initialize
check_changed_patterns: contracts-bedrock,op-node
- contracts-bedrock-coverage:
# Generate coverage reports.
name: contracts-bedrock-coverage <<matrix.dev_features>>
Expand All @@ -2436,12 +2448,11 @@ workflows:
dev_features: <<matrix.dev_features>>
matrix:
parameters:
dev_features: ["main", "OPTIMISM_PORTAL_INTEROP","CANNON_KONA,DEPLOY_V2_DISPUTE_GAMES"]
# need this requires to ensure that all FFI JSONs exist
requires:
- contracts-bedrock-build
dev_features: *dev_features_matrix
context:
- circleci-repo-readonly-authenticated-github-token
requires:
- initialize
- contracts-bedrock-tests-upgrade:
name: contracts-bedrock-tests-upgrade <<matrix.fork_op_chain>>-mainnet
fork_op_chain: <<matrix.fork_op_chain>>
Expand Down
5 changes: 5 additions & 0 deletions packages/contracts-bedrock/test/scripts/VerifyOPCM.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,11 @@ contract VerifyOPCM_Run_Test is VerifyOPCM_TestInit {
address blueprint = ref.addr;
bytes memory blueprintCode = blueprint.code;

// Skip the V2 dispute games blueprint when feature is enabled.
if (blueprintCode.length == 0 && isDevFeatureEnabled(DevFeatures.DEPLOY_V2_DISPUTE_GAMES)) {
continue;
}

// We don't care about immutable references for blueprints.
// Pick a random position.
uint256 randomDiffPosition = vm.randomUint(0, blueprintCode.length - 1);
Expand Down