Commit 33889f54 authored by Matthew Slipper's avatar Matthew Slipper Committed by GitHub

ci: Run contract checks and tests on self-hosted infra (#13219)

* ci: Run contract checks and tests on self-hosted infra

* whoops

* submodule update with multiple jobs

* increase jobs

* comment
parent 531e3d9f
......@@ -123,7 +123,11 @@ commands:
description: "Install the dependencies for the smart contracts"
steps:
- run:
command: just install
name: Install dependencies
command: |
# Manually craft the submodule update command in order to take advantage
# of the -j parameter, which speeds it up a lot.
git submodule update --init --recursive --force -j 8
working_directory: packages/contracts-bedrock
notify-failures-on-develop:
......@@ -623,14 +627,9 @@ jobs:
flags: contracts-bedrock-tests
contracts-bedrock-tests:
docker:
- image: <<pipeline.parameters.ci_builder_image>>
resource_class: xlarge
machine: true
resource_class: ethereum-optimism/latitude-1
parameters:
test_parallelism:
description: Number of test jobs to run in parallel
type: integer
default: 4
test_list:
description: List of test files to run
type: string
......@@ -654,7 +653,6 @@ jobs:
description: Profile to use for testing
type: string
default: ci
parallelism: <<parameters.test_parallelism>>
steps:
- checkout
- attach_workspace: { at: "." }
......@@ -670,14 +668,6 @@ jobs:
working_directory: packages/contracts-bedrock
- check-changed:
patterns: contracts-bedrock,op-node
- restore_cache:
name: Restore Go modules cache
key: gomod-{{ checksum "go.sum" }}
- restore_cache:
name: Restore Go build cache
keys:
- golang-build-cache-contracts-bedrock-tests-{{ checksum "go.sum" }}
- golang-build-cache-contracts-bedrock-tests-
- run:
name: Print dependencies
command: just dep-status
......@@ -725,17 +715,14 @@ jobs:
- notify-failures-on-develop
contracts-bedrock-checks:
docker:
- image: <<pipeline.parameters.ci_builder_image>>
resource_class: xlarge
machine: true
resource_class: ethereum-optimism/latitude-1
steps:
- checkout
- attach_workspace: { at: "." }
- install-contracts-dependencies
- check-changed:
patterns: contracts-bedrock,op-node
- setup_remote_docker:
docker_layer_caching: true
- run:
name: print forge version
command: forge --version
......@@ -1320,17 +1307,14 @@ workflows:
- contracts-bedrock-tests:
# Test everything except PreimageOracle.t.sol since it's slow.
name: contracts-bedrock-tests
test_parallelism: 4
test_list: find test -name "*.t.sol" -not -name "PreimageOracle.t.sol"
- contracts-bedrock-tests:
# PreimageOracle test is slow, run it separately to unblock CI.
name: contracts-bedrock-tests-preimage-oracle
test_parallelism: 1
test_list: find test -name "PreimageOracle.t.sol"
- contracts-bedrock-tests:
# Heavily fuzz any fuzz tests within added or modified test files.
name: contracts-bedrock-tests-heavy-fuzz-modified
test_parallelism: 1
test_list: git diff origin/develop...HEAD --name-only --diff-filter=AM -- './test/**/*.t.sol' | sed 's|packages/contracts-bedrock/||'
test_timeout: 1h
test_profile: ciheavy
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment