Commit ddf719ea authored by Joshua Gutow's avatar Joshua Gutow Committed by GitHub

Merge pull request #8146 from ethereum-optimism/jg/ci_3

CI: Fix contracts bedrock build and cache
parents 98ee7d5d fe1e6e23
......@@ -127,6 +127,9 @@ jobs:
resource_class: xlarge
steps:
- checkout
- run:
name: git submodules
command: make submodules
- check-changed:
patterns: op-chain-ops,packages/
- restore_cache:
......@@ -317,12 +320,16 @@ jobs:
resource_class: xlarge
steps:
- checkout
- run:
name: git submodules
command: make submodules
- check-changed:
patterns: contracts-bedrock,op-node
- run:
name: print forge version
command: forge --version
working_directory: packages/contracts-bedrock
# We do not use the pre-built contracts becuase forge coverage uses different optimizer settings
- run:
name: test and generate coverage
command: pnpm coverage:lcov
......@@ -339,11 +346,23 @@ jobs:
contracts-bedrock-tests:
docker:
- image: <<pipeline.parameters.ci_builder_image>>
resource_class: xlarge
resource_class: medium
steps:
- checkout
- run:
name: git submodules
command: make submodules
- restore_cache:
name: Restore PNPM Package Cache
keys:
- pnpm-packages-v2-{{ checksum "pnpm-lock.yaml" }}
- attach_workspace: { at: "." }
- check-changed:
patterns: contracts-bedrock,op-node
# populate node modules from the cache
- run:
name: Install dependencies
command: pnpm install --frozen-lockfile --prefer-offline
- run:
name: print forge version
command: forge --version
......@@ -359,22 +378,33 @@ jobs:
contracts-bedrock-checks:
docker:
- image: <<pipeline.parameters.ci_builder_image>>
resource_class: xlarge
resource_class: medium
steps:
- checkout
- run:
name: git submodules
command: make submodules
- restore_cache:
name: Restore PNPM Package Cache
keys:
- pnpm-packages-v2-{{ checksum "pnpm-lock.yaml" }}
- attach_workspace: { at: "." }
- check-changed:
patterns: contracts-bedrock,op-node
# populate node modules from the cache
- run:
name: Install dependencies
command: pnpm install --frozen-lockfile --prefer-offline
# Note: this step needs to come first because one of the later steps modifies the cache & forces a contracts rebuild
- run:
name: build contracts
command: pnpm build
name: semver lock
command: |
pnpm semver-lock
git diff --exit-code semver-lock.json || echo "export SEMVER_LOCK_STATUS=1" >> "$BASH_ENV"
working_directory: packages/contracts-bedrock
- run:
name: check deploy configs
command: pnpm validate-deploy-configs || echo "export DEPLOY_CONFIGS_STATUS=1" >> "$BASH_ENV"
working_directory: packages/contracts-bedrock
- run:
name: lint
......@@ -396,22 +426,12 @@ jobs:
pnpm storage-snapshot
git diff --exit-code .storage-layout || echo "export STORAGE_SNAPSHOT_STATUS=1" >> "$BASH_ENV"
working_directory: packages/contracts-bedrock
- run:
name: semver lock
command: |
pnpm semver-lock
git diff --exit-code semver-lock.json || echo "export SEMVER_LOCK_STATUS=1" >> "$BASH_ENV"
working_directory: packages/contracts-bedrock
- run:
name: invariant docs
command: |
pnpm autogen:invariant-docs
git diff --exit-code ./invariant-docs/*.md || echo "export INVARIANT_DOCS_STATUS=1" >> "$BASH_ENV"
working_directory: packages/contracts-bedrock
- run:
name: check deploy configs
command: pnpm validate-deploy-configs || echo "export DEPLOY_CONFIGS_STATUS=1" >> "$BASH_ENV"
working_directory: packages/contracts-bedrock
- run:
name: check statuses
command: |
......@@ -446,7 +466,7 @@ jobs:
contracts-bedrock-slither:
docker:
- image: <<pipeline.parameters.ci_builder_image>>
resource_class: xlarge
resource_class: medium
steps:
- checkout
- check-changed:
......@@ -1293,7 +1313,9 @@ workflows:
package_name: core-utils
requires:
- pnpm-monorepo
- contracts-bedrock-tests
- contracts-bedrock-tests:
requires:
- pnpm-monorepo
- contracts-bedrock-coverage
- contracts-bedrock-checks:
requires:
......
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