From 2a6ef41047850620b2fa2993764b4bc39df7a8d5 Mon Sep 17 00:00:00 2001 From: pcw109550 Date: Mon, 25 Mar 2024 15:00:18 +0900 Subject: [PATCH 01/31] ci --- .circleci/config.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .circleci/config.yml diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 00000000..d5d401c5 --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,31 @@ +# Use the latest 2.1 version of CircleCI pipeline process engine. +# See: https://circleci.com/docs/configuration-reference +version: 2.1 + +# Define a job to be invoked later in a workflow. +# See: https://circleci.com/docs/jobs-steps/#jobs-overview & https://circleci.com/docs/configuration-reference/#jobs +jobs: + say-hello: + # Specify the execution environment. You can specify an image from Docker Hub or use one of our convenience images from CircleCI's Developer Hub. + # See: https://circleci.com/docs/executor-intro/ & https://circleci.com/docs/configuration-reference/#executor-job + docker: + # Specify the version you desire here + # See: https://circleci.com/developer/images/image/cimg/base + - image: cimg/base:current + + # Add steps to the job + # See: https://circleci.com/docs/jobs-steps/#steps-overview & https://circleci.com/docs/configuration-reference/#steps + steps: + # Checkout the code as the first step. + - checkout + - run: + name: "Say hello" + command: "echo Hello, World!" + +# Orchestrate jobs using workflows +# See: https://circleci.com/docs/workflows/ & https://circleci.com/docs/configuration-reference/#workflows +workflows: + say-hello-workflow: # This is the name of the workflow, feel free to change it to better match your workflow. + # Inside the workflow, you define the jobs you want to run. + jobs: + - say-hello From fab9793b75045564db14735b27c56ed3ab180fb3 Mon Sep 17 00:00:00 2001 From: pcw109550 Date: Mon, 1 Apr 2024 11:22:36 -0600 Subject: [PATCH 02/31] test pnpm --- .circleci/config.yml | 104 +++++++++++++++++++++++++++++++++---------- 1 file changed, 80 insertions(+), 24 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index d5d401c5..5db5a751 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,31 +1,87 @@ -# Use the latest 2.1 version of CircleCI pipeline process engine. -# See: https://circleci.com/docs/configuration-reference version: 2.1 -# Define a job to be invoked later in a workflow. -# See: https://circleci.com/docs/jobs-steps/#jobs-overview & https://circleci.com/docs/configuration-reference/#jobs +workflows: + main: + jobs: + - pnpm-monorepo: + name: pnpm-monorepo + + jobs: - say-hello: - # Specify the execution environment. You can specify an image from Docker Hub or use one of our convenience images from CircleCI's Developer Hub. - # See: https://circleci.com/docs/executor-intro/ & https://circleci.com/docs/configuration-reference/#executor-job + pnpm-monorepo: docker: - # Specify the version you desire here - # See: https://circleci.com/developer/images/image/cimg/base - - image: cimg/base:current - - # Add steps to the job - # See: https://circleci.com/docs/jobs-steps/#steps-overview & https://circleci.com/docs/configuration-reference/#steps + # TODO(pcw109550) temp hardcode + - image: us-docker.pkg.dev/oplabs-tools-artifacts/images/ci-builder:v0.46.1 + resource_class: xlarge steps: - # Checkout the code as the first step. - checkout - run: - name: "Say hello" - command: "echo Hello, World!" - -# Orchestrate jobs using workflows -# See: https://circleci.com/docs/workflows/ & https://circleci.com/docs/configuration-reference/#workflows -workflows: - say-hello-workflow: # This is the name of the workflow, feel free to change it to better match your workflow. - # Inside the workflow, you define the jobs you want to run. - jobs: - - say-hello + name: "Check L1 geth version" + command: ./ops/scripts/geth-version-checker.sh || (echo "geth version is wrong, update ci-builder"; false) + - run: + name: git submodules + command: make submodules + - restore_cache: + name: Restore PNPM Package Cache + keys: + - pnpm-packages-v2-{{ checksum "pnpm-lock.yaml" }} + - restore_cache: + name: Restore Go modules cache + key: gomod-{{ checksum "go.sum" }} + # Fetch node_modules into the pnpm store + # This will cache node_modules based on pnpm-lock so other steps can instantly install them with `pnpm install --prefer-offline` + # --prefer-offline installs node_modules instantly by just reading from cache if it exists rather than fetching from network + # when installing node_modules pnpm simply adds symlinks instead of copying the files which is why it is pretty much instant to run --prefer-offline + # this allows a caching strategy of only checking pnpm-lockfile so we don't have to keep it in sync with our packages + # For more information see https://pnpm.io/cli/fetch + - run: + name: Fetch dependencies + command: pnpm fetch --frozen-lockfile --prefer-offline + - save_cache: + name: Save PNPM Package Cache + key: pnpm-packages-v2-{{ checksum "pnpm-lock.yaml" }} + paths: + - "node_modules" + - run: + name: Install dependencies + command: pnpm install:ci:offline + - run: + name: print forge version + command: forge --version + - run: + name: Build monorepo + environment: + FOUNDRY_PROFILE: ci + command: pnpm build + - run: + name: Generate FPAC allocs + command: DEVNET_FPAC="true" make devnet-allocs + - run: + name: Copy FPAC allocs to .devnet-fpac + command: cp -r .devnet/ .devnet-fault-proofs/ + - run: + name: Generate Plasma allocs + command: DEVNET_PLASMA="true" make devnet-allocs + - run: + name: Copy Plasma allocs to .devnet-plasma + command: cp -r .devnet/ .devnet-plasma/ + - run: + name: Generate non-FPAC allocs + command: make devnet-allocs + - persist_to_workspace: + root: "." + paths: + - "packages/**/dist" + - "packages/contracts-bedrock/cache" + - "packages/contracts-bedrock/artifacts" + - "packages/contracts-bedrock/forge-artifacts" + - "packages/contracts-bedrock/tsconfig.tsbuildinfo" + - "packages/contracts-bedrock/tsconfig.build.tsbuildinfo" + - ".devnet/allocs-l1.json" + - ".devnet/addresses.json" + - ".devnet-fault-proofs/allocs-l1.json" + - ".devnet-fault-proofs/addresses.json" + - ".devnet-plasma/allocs-l1.json" + - ".devnet-plasma/addresses.json" + - "packages/contracts-bedrock/deploy-config/devnetL1.json" + - "packages/contracts-bedrock/deployments/devnetL1" \ No newline at end of file From c440a2604b9eb0592e092895293af8a317c95093 Mon Sep 17 00:00:00 2001 From: pcw109550 Date: Mon, 1 Apr 2024 11:29:52 -0600 Subject: [PATCH 03/31] test --- .circleci/config.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 5db5a751..1e758bb9 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -15,6 +15,7 @@ jobs: resource_class: xlarge steps: - checkout + path: ./rvsol/lib/optimism - run: name: "Check L1 geth version" command: ./ops/scripts/geth-version-checker.sh || (echo "geth version is wrong, update ci-builder"; false) From 80c31a2a2d4bc6e5171db28c8f431b3460e9785d Mon Sep 17 00:00:00 2001 From: pcw109550 Date: Mon, 1 Apr 2024 11:30:18 -0600 Subject: [PATCH 04/31] test --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 1e758bb9..72a6f704 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -14,7 +14,7 @@ jobs: - image: us-docker.pkg.dev/oplabs-tools-artifacts/images/ci-builder:v0.46.1 resource_class: xlarge steps: - - checkout + - checkout: path: ./rvsol/lib/optimism - run: name: "Check L1 geth version" From aab2fadbd2226cedf8f7de63d1a7c50e54623a11 Mon Sep 17 00:00:00 2001 From: pcw109550 Date: Mon, 1 Apr 2024 11:32:47 -0600 Subject: [PATCH 05/31] test --- .circleci/config.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 72a6f704..385c5971 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -13,9 +13,10 @@ jobs: # TODO(pcw109550) temp hardcode - image: us-docker.pkg.dev/oplabs-tools-artifacts/images/ci-builder:v0.46.1 resource_class: xlarge + working_directory: ~/asterisc/rvsol/lib/optimism steps: - checkout: - path: ./rvsol/lib/optimism + path: ~/asterisc/rvsol/lib/optimism - run: name: "Check L1 geth version" command: ./ops/scripts/geth-version-checker.sh || (echo "geth version is wrong, update ci-builder"; false) From 153911840e0306d388bfe4fbf5ae1f3134537b39 Mon Sep 17 00:00:00 2001 From: pcw109550 Date: Mon, 1 Apr 2024 11:37:18 -0600 Subject: [PATCH 06/31] test --- .circleci/config.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 385c5971..e6e7b631 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -13,10 +13,11 @@ jobs: # TODO(pcw109550) temp hardcode - image: us-docker.pkg.dev/oplabs-tools-artifacts/images/ci-builder:v0.46.1 resource_class: xlarge - working_directory: ~/asterisc/rvsol/lib/optimism steps: - checkout: - path: ~/asterisc/rvsol/lib/optimism + - run: + name: "Fetch submodules for asterisc" + command: git submodule update --init --recursive - run: name: "Check L1 geth version" command: ./ops/scripts/geth-version-checker.sh || (echo "geth version is wrong, update ci-builder"; false) From a63a43174d562a48a74d8feed70fbe7f5c044368 Mon Sep 17 00:00:00 2001 From: pcw109550 Date: Mon, 1 Apr 2024 11:38:37 -0600 Subject: [PATCH 07/31] test --- .circleci/config.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index e6e7b631..44ca959f 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -15,9 +15,6 @@ jobs: resource_class: xlarge steps: - checkout: - - run: - name: "Fetch submodules for asterisc" - command: git submodule update --init --recursive - run: name: "Check L1 geth version" command: ./ops/scripts/geth-version-checker.sh || (echo "geth version is wrong, update ci-builder"; false) From 505af9c48768a6d8351f9d1be225d8b5682f3d50 Mon Sep 17 00:00:00 2001 From: pcw109550 Date: Mon, 1 Apr 2024 11:38:58 -0600 Subject: [PATCH 08/31] test --- .circleci/config.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 44ca959f..774f0b07 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -14,7 +14,10 @@ jobs: - image: us-docker.pkg.dev/oplabs-tools-artifacts/images/ci-builder:v0.46.1 resource_class: xlarge steps: - - checkout: + - checkout + - run: + name: "Fetch submodules for asterisc" + command: git submodule update --init --recursive - run: name: "Check L1 geth version" command: ./ops/scripts/geth-version-checker.sh || (echo "geth version is wrong, update ci-builder"; false) From bf186ce1801a2863a7ba579b8254c79af0676838 Mon Sep 17 00:00:00 2001 From: pcw109550 Date: Mon, 1 Apr 2024 11:40:03 -0600 Subject: [PATCH 09/31] test --- .circleci/config.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 774f0b07..3147e5ff 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -17,7 +17,8 @@ jobs: - checkout - run: name: "Fetch submodules for asterisc" - command: git submodule update --init --recursive + # TODO(pcw109550) Do not recursive + command: git submodule update --init - run: name: "Check L1 geth version" command: ./ops/scripts/geth-version-checker.sh || (echo "geth version is wrong, update ci-builder"; false) From 0ca261c8fb40b74b24dd1f1c18c7b43144317112 Mon Sep 17 00:00:00 2001 From: pcw109550 Date: Mon, 1 Apr 2024 11:45:38 -0600 Subject: [PATCH 10/31] test --- .circleci/config.yml | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 3147e5ff..66eb20a3 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -22,16 +22,20 @@ jobs: - 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 - run: name: git submodules command: make submodules + working_directory: rvsol/lib/optimism - restore_cache: name: Restore PNPM Package Cache keys: - pnpm-packages-v2-{{ checksum "pnpm-lock.yaml" }} + working_directory: rvsol/lib/optimism - restore_cache: name: Restore Go modules cache key: gomod-{{ checksum "go.sum" }} + working_directory: rvsol/lib/optimism # Fetch node_modules into the pnpm store # This will cache node_modules based on pnpm-lock so other steps can instantly install them with `pnpm install --prefer-offline` # --prefer-offline installs node_modules instantly by just reading from cache if it exists rather than fetching from network @@ -41,39 +45,49 @@ jobs: - run: name: Fetch dependencies command: pnpm fetch --frozen-lockfile --prefer-offline + working_directory: rvsol/lib/optimism - save_cache: name: Save PNPM Package Cache key: pnpm-packages-v2-{{ checksum "pnpm-lock.yaml" }} + working_directory: rvsol/lib/optimism paths: - "node_modules" - run: name: Install dependencies command: pnpm install:ci:offline + working_directory: rvsol/lib/optimism - run: name: print forge version command: forge --version + working_directory: rvsol/lib/optimism - run: name: Build monorepo environment: FOUNDRY_PROFILE: ci command: pnpm build + working_directory: rvsol/lib/optimism - run: name: Generate FPAC allocs command: DEVNET_FPAC="true" make devnet-allocs + working_directory: rvsol/lib/optimism - run: name: Copy FPAC allocs to .devnet-fpac command: cp -r .devnet/ .devnet-fault-proofs/ + working_directory: rvsol/lib/optimism - run: name: Generate Plasma allocs command: DEVNET_PLASMA="true" make devnet-allocs + working_directory: rvsol/lib/optimism - run: name: Copy Plasma allocs to .devnet-plasma command: cp -r .devnet/ .devnet-plasma/ + working_directory: rvsol/lib/optimism - run: name: Generate non-FPAC allocs command: make devnet-allocs + working_directory: rvsol/lib/optimism - persist_to_workspace: - root: "." + root: rvsol/lib/optimism paths: - "packages/**/dist" - "packages/contracts-bedrock/cache" From e511f40630333fb5872cf54ad01b3e8cb9d08d40 Mon Sep 17 00:00:00 2001 From: pcw109550 Date: Mon, 1 Apr 2024 11:48:35 -0600 Subject: [PATCH 11/31] test --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 66eb20a3..1e5c9629 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -21,7 +21,7 @@ jobs: command: git submodule update --init - run: name: "Check L1 geth version" - command: ./ops/scripts/geth-version-checker.sh || (echo "geth version is wrong, update ci-builder"; false) + command: ls -al && pwd && ./ops/scripts/geth-version-checker.sh || (echo "geth version is wrong, update ci-builder"; false) working_directory: rvsol/lib/optimism - run: name: git submodules From 8e18bb27289dc6d4e41f00faed1f7cf39fd7d8af Mon Sep 17 00:00:00 2001 From: pcw109550 Date: Mon, 1 Apr 2024 11:52:06 -0600 Subject: [PATCH 12/31] fix docker img --- .circleci/config.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 1e5c9629..64f49583 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -10,8 +10,8 @@ workflows: jobs: pnpm-monorepo: docker: - # TODO(pcw109550) temp hardcode - - image: us-docker.pkg.dev/oplabs-tools-artifacts/images/ci-builder:v0.46.1 + # TODO(pcw109550) temp hardcode. must update. this depends with rvsol/lib/optimism submodule version + - image: us-docker.pkg.dev/oplabs-tools-artifacts/images/ci-builder:v0.43.0 resource_class: xlarge steps: - checkout From bbf60a4ca43fc61ccfa9347adc0e6622de3b895e Mon Sep 17 00:00:00 2001 From: pcw109550 Date: Mon, 1 Apr 2024 11:57:28 -0600 Subject: [PATCH 13/31] test --- .circleci/config.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 64f49583..1cf5f937 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -34,8 +34,8 @@ jobs: working_directory: rvsol/lib/optimism - restore_cache: name: Restore Go modules cache - key: gomod-{{ checksum "go.sum" }} - working_directory: rvsol/lib/optimism + # TODO(pcw109550) fix hardcoded path + key: gomod-{{ checksum "rvsol/lib/optimism/go.sum" }} # Fetch node_modules into the pnpm store # This will cache node_modules based on pnpm-lock so other steps can instantly install them with `pnpm install --prefer-offline` # --prefer-offline installs node_modules instantly by just reading from cache if it exists rather than fetching from network @@ -48,10 +48,10 @@ jobs: working_directory: rvsol/lib/optimism - save_cache: name: Save PNPM Package Cache - key: pnpm-packages-v2-{{ checksum "pnpm-lock.yaml" }} - working_directory: rvsol/lib/optimism + # TODO(pcw109550) fix hardcoded path + key: pnpm-packages-v2-{{ checksum "rvsol/lib/optimism/pnpm-lock.yaml" }} paths: - - "node_modules" + - "rvsol/lib/optimism/node_modules" - run: name: Install dependencies command: pnpm install:ci:offline From c34c1234ea2ea3b206573b2da57330a6273dbfab Mon Sep 17 00:00:00 2001 From: pcw109550 Date: Mon, 1 Apr 2024 11:59:14 -0600 Subject: [PATCH 14/31] test --- .circleci/config.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 1cf5f937..18ab0b70 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -30,7 +30,8 @@ jobs: - restore_cache: name: Restore PNPM Package Cache keys: - - pnpm-packages-v2-{{ checksum "pnpm-lock.yaml" }} + # TODO(pcw109550) fix hardcoded path + - pnpm-packages-v2-{{ checksum "rvsol/lib/optimism/pnpm-lock.yaml" }} working_directory: rvsol/lib/optimism - restore_cache: name: Restore Go modules cache From c12816c585baf14581c46865e431886baff27192 Mon Sep 17 00:00:00 2001 From: pcw109550 Date: Mon, 1 Apr 2024 12:00:47 -0600 Subject: [PATCH 15/31] test --- .circleci/config.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 18ab0b70..7736b0ec 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -17,14 +17,14 @@ jobs: - checkout - run: name: "Fetch submodules for asterisc" - # TODO(pcw109550) Do not recursive + # TODO(pcw109550) Do not recursive update. do we need this? command: git submodule update --init - run: name: "Check L1 geth version" command: ls -al && pwd && ./ops/scripts/geth-version-checker.sh || (echo "geth version is wrong, update ci-builder"; false) working_directory: rvsol/lib/optimism - run: - name: git submodules + name: git submodules for monorepo command: make submodules working_directory: rvsol/lib/optimism - restore_cache: From 5f0003edbe65bfb4f180748bb1d3c52fdaa9bd21 Mon Sep 17 00:00:00 2001 From: pcw109550 Date: Mon, 1 Apr 2024 12:05:12 -0600 Subject: [PATCH 16/31] test gomoudle test --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 7736b0ec..91aa98e5 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -17,7 +17,7 @@ jobs: - checkout - run: name: "Fetch submodules for asterisc" - # TODO(pcw109550) Do not recursive update. do we need this? + # TODO(pcw109550) Do not recursive update. do we need this??? command: git submodule update --init - run: name: "Check L1 geth version" From 11dcdcff025b687be960093baf51a2a0c9c0881b Mon Sep 17 00:00:00 2001 From: pcw109550 Date: Mon, 1 Apr 2024 12:13:18 -0600 Subject: [PATCH 17/31] test --- .circleci/config.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 91aa98e5..eb0e970a 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -21,7 +21,7 @@ jobs: command: git submodule update --init - run: name: "Check L1 geth version" - command: ls -al && pwd && ./ops/scripts/geth-version-checker.sh || (echo "geth version is wrong, update ci-builder"; false) + command: ./ops/scripts/geth-version-checker.sh || (echo "geth version is wrong, update ci-builder"; false) working_directory: rvsol/lib/optimism - run: name: git submodules for monorepo @@ -32,7 +32,6 @@ jobs: keys: # TODO(pcw109550) fix hardcoded path - pnpm-packages-v2-{{ checksum "rvsol/lib/optimism/pnpm-lock.yaml" }} - working_directory: rvsol/lib/optimism - restore_cache: name: Restore Go modules cache # TODO(pcw109550) fix hardcoded path From c1dd8b30c428c08ce20190a9fd3d227313dd116e Mon Sep 17 00:00:00 2001 From: pcw109550 Date: Mon, 1 Apr 2024 12:17:28 -0600 Subject: [PATCH 18/31] add commmments --- .circleci/config.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index eb0e970a..52a82e8c 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -35,6 +35,7 @@ jobs: - restore_cache: name: Restore Go modules cache # TODO(pcw109550) fix hardcoded path + # this go mod cache wil be populated from go-mod-download step key: gomod-{{ checksum "rvsol/lib/optimism/go.sum" }} # Fetch node_modules into the pnpm store # This will cache node_modules based on pnpm-lock so other steps can instantly install them with `pnpm install --prefer-offline` From 15f9fde2b744ea4d29d2862e6c5e8df0ae9f4a00 Mon Sep 17 00:00:00 2001 From: pcw109550 Date: Mon, 1 Apr 2024 13:23:00 -0600 Subject: [PATCH 19/31] test gomod init --- .circleci/config.yml | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 52a82e8c..cde92a56 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -103,4 +103,23 @@ jobs: - ".devnet-plasma/allocs-l1.json" - ".devnet-plasma/addresses.json" - "packages/contracts-bedrock/deploy-config/devnetL1.json" - - "packages/contracts-bedrock/deployments/devnetL1" \ No newline at end of file + - "packages/contracts-bedrock/deployments/devnetL1" + + go-mod-download: + docker: + # TODO(pcw109550) temp hardcode. must update. this depends with rvsol/lib/optimism submodule version + - image: us-docker.pkg.dev/oplabs-tools-artifacts/images/ci-builder:v0.43.0 + parameters: + file: + default: go.sum + description: The file name of checksum for restore_cache and save_cache. + type: string + key: + default: gomod + description: The key of restore_cache and save_cache. + type: string + steps: + - checkout + - restore_cache: + key: << parameters.key >>-{{ checksum "<< parameters.file >>" }} + name: Restore Go modules cache \ No newline at end of file From dd7f384b0dba8631edd59844b7353d4ad78e97dc Mon Sep 17 00:00:00 2001 From: pcw109550 Date: Mon, 1 Apr 2024 13:28:41 -0600 Subject: [PATCH 20/31] test --- .circleci/config.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index cde92a56..e2f4940c 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -5,6 +5,7 @@ workflows: jobs: - pnpm-monorepo: name: pnpm-monorepo + - go-mod-download jobs: From 316a7cb728becc9aa80a6e37ff431ffb4d03d6cc Mon Sep 17 00:00:00 2001 From: pcw109550 Date: Mon, 1 Apr 2024 13:34:31 -0600 Subject: [PATCH 21/31] test --- .circleci/config.yml | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index e2f4940c..471f252c 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -121,6 +121,34 @@ jobs: type: string steps: - checkout + - run: + name: "Fetch submodules for asterisc" + # TODO(pcw109550) Do not recursive update. do we need this??? + command: git submodule update --init - restore_cache: key: << parameters.key >>-{{ checksum "<< parameters.file >>" }} - name: Restore Go modules cache \ No newline at end of file + name: Restore Go modules cache + - run: + name: Sanity check go mod cache path + command: test "$(go env GOMODCACHE)" == "/go/pkg/mod" # yes, it's an odd path + working_directory: rvsol/lib/optimism + - run: + command: go mod download + name: Download Go module dependencies + working_directory: rvsol/lib/optimism + - run: + name: "Go mod tidy" + command: make mod-tidy && git diff --exit-code + working_directory: rvsol/lib/optimism + - run: + name: run Go linter + command: | + # Identify how many cores it defaults to + golangci-lint --help | grep concurrency + make lint-go + working_directory: rvsol/lib/optimism + - save_cache: + key: << parameters.key >>-{{ checksum "<< parameters.file >>" }} + name: Save Go modules cache + paths: + - "/go/pkg/mod" \ No newline at end of file From 0875b9bb45b2913385d66ec213ec98f04882babd Mon Sep 17 00:00:00 2001 From: pcw109550 Date: Mon, 1 Apr 2024 13:39:07 -0600 Subject: [PATCH 22/31] test go mod cache --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 471f252c..8ad6f1d3 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -18,7 +18,7 @@ jobs: - checkout - run: name: "Fetch submodules for asterisc" - # TODO(pcw109550) Do not recursive update. do we need this??? + # TODO(pcw109550) Do not recursive update. do we need this? command: git submodule update --init - run: name: "Check L1 geth version" From 18d6506b99bd253467dc552d4c560fb8e09c8dc4 Mon Sep 17 00:00:00 2001 From: pcw109550 Date: Mon, 1 Apr 2024 13:48:26 -0600 Subject: [PATCH 23/31] spin --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 8ad6f1d3..2008599d 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -112,7 +112,7 @@ jobs: - image: us-docker.pkg.dev/oplabs-tools-artifacts/images/ci-builder:v0.43.0 parameters: file: - default: go.sum + default: rvsol/lib/optimism/go.sum description: The file name of checksum for restore_cache and save_cache. type: string key: From 79c7f00d90ae1c00fb8076c22f25ac9fb837d3bd Mon Sep 17 00:00:00 2001 From: pcw109550 Date: Mon, 1 Apr 2024 13:52:23 -0600 Subject: [PATCH 24/31] check go cache --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 2008599d..ef89d41b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -123,7 +123,7 @@ jobs: - checkout - run: name: "Fetch submodules for asterisc" - # TODO(pcw109550) Do not recursive update. do we need this??? + # TODO(pcw109550) Do not recursive update. do we need this??? ??? command: git submodule update --init - restore_cache: key: << parameters.key >>-{{ checksum "<< parameters.file >>" }} From 08c510ecec6ddac04369c8a4313438bf137627ed Mon Sep 17 00:00:00 2001 From: pcw109550 Date: Mon, 1 Apr 2024 13:57:43 -0600 Subject: [PATCH 25/31] test --- .circleci/config.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index ef89d41b..204ef59e 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -5,8 +5,8 @@ workflows: jobs: - pnpm-monorepo: name: pnpm-monorepo - - go-mod-download - + - go-mod-download-monorepo + - asterisc-prestate: jobs: pnpm-monorepo: @@ -36,7 +36,7 @@ jobs: - restore_cache: name: Restore Go modules cache # TODO(pcw109550) fix hardcoded path - # this go mod cache wil be populated from go-mod-download step + # this go mod cache wil be populated from go-mod-download-monorepo step key: gomod-{{ checksum "rvsol/lib/optimism/go.sum" }} # Fetch node_modules into the pnpm store # This will cache node_modules based on pnpm-lock so other steps can instantly install them with `pnpm install --prefer-offline` @@ -106,7 +106,7 @@ jobs: - "packages/contracts-bedrock/deploy-config/devnetL1.json" - "packages/contracts-bedrock/deployments/devnetL1" - go-mod-download: + go-mod-download-monorepo: docker: # TODO(pcw109550) temp hardcode. must update. this depends with rvsol/lib/optimism submodule version - image: us-docker.pkg.dev/oplabs-tools-artifacts/images/ci-builder:v0.43.0 From 5ada7064db7bf077f4dd3864f32cef12d3aa6676 Mon Sep 17 00:00:00 2001 From: pcw109550 Date: Mon, 1 Apr 2024 13:58:28 -0600 Subject: [PATCH 26/31] fix --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 204ef59e..3c42f834 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -6,7 +6,7 @@ workflows: - pnpm-monorepo: name: pnpm-monorepo - go-mod-download-monorepo - - asterisc-prestate: + # - asterisc-prestate jobs: pnpm-monorepo: From 421f6a52d327db3e30799bda6fe8c4fe750b2724 Mon Sep 17 00:00:00 2001 From: pcw109550 Date: Mon, 1 Apr 2024 14:03:06 -0600 Subject: [PATCH 27/31] go mod asterisc --- .circleci/config.yml | 39 +++++++++++++++++++++++++++++++++++++-- 1 file changed, 37 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 3c42f834..0cc51c39 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -6,6 +6,7 @@ workflows: - pnpm-monorepo: name: pnpm-monorepo - go-mod-download-monorepo + - go-mod-download-asterisc # - asterisc-prestate jobs: @@ -34,7 +35,7 @@ jobs: # TODO(pcw109550) fix hardcoded path - pnpm-packages-v2-{{ checksum "rvsol/lib/optimism/pnpm-lock.yaml" }} - restore_cache: - name: Restore Go modules cache + name: Restore Go modules cache for monorepo # TODO(pcw109550) fix hardcoded path # this go mod cache wil be populated from go-mod-download-monorepo step key: gomod-{{ checksum "rvsol/lib/optimism/go.sum" }} @@ -151,4 +152,38 @@ jobs: key: << parameters.key >>-{{ checksum "<< parameters.file >>" }} name: Save Go modules cache paths: - - "/go/pkg/mod" \ No newline at end of file + - "/go/pkg/mod" + + go-mod-download-asterisc: + docker: + # TODO(pcw109550) temp hardcode. must update. this depends with rvsol/lib/optimism submodule version + # for asterisc, we may use other image + - image: us-docker.pkg.dev/oplabs-tools-artifacts/images/ci-builder:v0.43.0 + parameters: + file: + default: go.sum + description: The file name of checksum for restore_cache and save_cache. + type: string + key: + default: gomod + description: The key of restore_cache and save_cache. + type: string + steps: + - checkout + - restore_cache: + key: << parameters.key >>-{{ checksum "<< parameters.file >>" }} + name: Restore Go modules cache + - run: + name: Sanity check go mod cache path + command: test "$(go env GOMODCACHE)" == "/go/pkg/mod" # yes, it's an odd path + - run: + command: go mod download + name: Download Go module dependencies + - run: + name: "Go mod tidy" + command: make mod-tidy && git diff --exit-code + - save_cache: + key: << parameters.key >>-{{ checksum "<< parameters.file >>" }} + name: Save Go modules cache + paths: + - "/go/pkg/mod" From 4d0c1c6a416445c8b7311dbdb1f0fd19a155180d Mon Sep 17 00:00:00 2001 From: pcw109550 Date: Mon, 1 Apr 2024 14:04:18 -0600 Subject: [PATCH 28/31] fix --- .circleci/config.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 0cc51c39..57349b05 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -179,9 +179,6 @@ jobs: - run: command: go mod download name: Download Go module dependencies - - run: - name: "Go mod tidy" - command: make mod-tidy && git diff --exit-code - save_cache: key: << parameters.key >>-{{ checksum "<< parameters.file >>" }} name: Save Go modules cache From 89ad9392b8f06a0e09d458ec2567efab3c9b757f Mon Sep 17 00:00:00 2001 From: pcw109550 Date: Mon, 1 Apr 2024 14:05:53 -0600 Subject: [PATCH 29/31] test --- .circleci/config.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 57349b05..4dbdf6f0 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -3,8 +3,7 @@ version: 2.1 workflows: main: jobs: - - pnpm-monorepo: - name: pnpm-monorepo + - pnpm-monorepo - go-mod-download-monorepo - go-mod-download-asterisc # - asterisc-prestate From 474a849db3f088ebfd60e7973c4a67840bca4f1c Mon Sep 17 00:00:00 2001 From: pcw109550 Date: Mon, 1 Apr 2024 14:07:00 -0600 Subject: [PATCH 30/31] test --- .circleci/config.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 4dbdf6f0..57349b05 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -3,7 +3,8 @@ version: 2.1 workflows: main: jobs: - - pnpm-monorepo + - pnpm-monorepo: + name: pnpm-monorepo - go-mod-download-monorepo - go-mod-download-asterisc # - asterisc-prestate From edc99a324a3766c9ad25d76a2147308e6424eb8c Mon Sep 17 00:00:00 2001 From: pcw109550 Date: Mon, 1 Apr 2024 14:08:56 -0600 Subject: [PATCH 31/31] no name --- .circleci/config.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 57349b05..4dbdf6f0 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -3,8 +3,7 @@ version: 2.1 workflows: main: jobs: - - pnpm-monorepo: - name: pnpm-monorepo + - pnpm-monorepo - go-mod-download-monorepo - go-mod-download-asterisc # - asterisc-prestate