Skip to content

Commit

Permalink
Fix .circleci/config to not use pnpm
Browse files Browse the repository at this point in the history
  • Loading branch information
mininny committed Sep 25, 2024
1 parent 65d9c4f commit 9676151
Showing 1 changed file with 82 additions and 17 deletions.
99 changes: 82 additions & 17 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ parameters:
workflows:
main:
jobs:
- pnpm-monorepo
- contracts-bedrock-build
- go-mod-download-monorepo
- go-mod-download-asterisc
- op-program-riscv:
Expand All @@ -26,6 +26,83 @@ workflows:
version: ["1.0.0", "1.1.0", "1.2.0"]

jobs:
checkout-with-monorepo:
steps:
- checkout
- run:
name: Fetch submodules for asterisc
# This will also fetch monorepo's submodule.
# Therefore we do not have to call `make submodules` at monorepo root
command: git submodule update --init --recursive
contracts-bedrock-build:
docker:
- image: <<pipeline.parameters.ci_builder_image>>
resource_class: xlarge
parameters:
skip_pattern:
description: Glob pattern of tests to skip
type: string
default: ""
steps:
- checkout-with-monorepo
- run:
name: Check L1 geth version
command: ./ops/scripts/geth-version-checker.sh || (echo "geth version is wrong, update ci-builder"; false)
working_directory: rvsol/lib/optimism
- install-contracts-dependencies
- restore_cache:
name: Restore Go modules cache
keys:
- gomod-contracts-build-{{ checksum "go.sum" }}
- gomod-contracts-build-
- restore_cache:
name: Restore Go build cache
keys:
- golang-build-cache-contracts-build-{{ checksum "go.sum" }}
- golang-build-cache-contracts-build-
- run:
name: Print forge version
command: forge --version
- run:
name: Pull artifacts
command: bash scripts/ops/pull-artifacts.sh
working_directory: rvsol/lib/optimism/packages/contracts-bedrock
- run:
name: Build contracts
command: forge build --deny-warnings --skip <<parameters.skip_pattern>>
environment:
FOUNDRY_PROFILE: ci
working_directory: rvsol/lib/optimism/packages/contracts-bedrock
- run:
name: Generate default allocs
command: make devnet-allocs
working_directory: rvsol/lib/optimism
- save_cache:
name: Save Go modules cache
key: gomod-contracts-build-{{ checksum "go.sum" }}
paths:
- "/go/pkg/mod"
- save_cache:
name: Save Go build cache
key: golang-build-cache-contracts-build-{{ checksum "go.sum" }}
paths:
- "/root/.cache/go-build"
- persist_to_workspace:
root: "."
paths:
- "packages/contracts-bedrock/cache"
- "packages/contracts-bedrock/artifacts"
- "packages/contracts-bedrock/forge-artifacts"
- "packages/contracts-bedrock/deploy-config/devnetL1.json"
- "packages/contracts-bedrock/deployments/devnetL1"
- ".devnet"
install-contracts-dependencies:
description: "Install the dependencies for the smart contracts"
steps:
- run:
command: just install
working_directory: packages/contracts-bedrock

pnpm-monorepo:
docker:
- image: <<pipeline.parameters.ci_builder_image>>
Expand Down Expand Up @@ -104,10 +181,7 @@ jobs:
docker:
- image: <<pipeline.parameters.ci_builder_image>>
steps:
- checkout
- run:
name: Fetch submodules for asterisc
command: git submodule update --init --recursive
- checkout-with-monorepo
- restore_cache:
key: gomod>-{{ checksum "rvsol/lib/optimism/go.sum" }}
name: Restore Go modules cache for monorepo
Expand Down Expand Up @@ -169,10 +243,7 @@ jobs:
description: The key of restore_cache and save_cache.
type: string
steps:
- checkout
- run:
name: Fetch submodules for asterisc
command: git submodule update --init --recursive
- checkout-with-monorepo
- restore_cache:
key: gomod-{{ checksum "rvsol/lib/optimism/go.sum" }}
name: Restore Go modules cache
Expand Down Expand Up @@ -230,12 +301,9 @@ jobs:
docker:
- image: <<pipeline.parameters.ci_builder_image>>
steps:
- checkout
- checkout-with-monorepo
- attach_workspace:
at: /tmp/workspace
- run:
name: Fetch submodules for asterisc
command: git submodule update --init --recursive
- run:
name: Forge build
# We first build here to avoid `failed to read artifact source file` foundry error while running forge script
Expand Down Expand Up @@ -320,12 +388,9 @@ jobs:
resource_class: xlarge
parallelism: 4
steps:
- checkout
- checkout-with-monorepo
- attach_workspace:
at: /tmp/workspace
- run:
name: Fetch submodules for asterisc
command: git submodule update --init --recursive
- restore_cache:
name: Restore Go modules cache for monorepo
# this go mod cache will be populated from go-mod-download-monorepo step
Expand Down

0 comments on commit 9676151

Please sign in to comment.