Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

debug: Failing test run #321

Closed
wants to merge 9 commits into from
Closed
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
37 changes: 19 additions & 18 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ version: 2.1

executors:
default:
docker:
- image: us-docker.pkg.dev/oplabs-tools-artifacts/images/ci-builder:v0.55.0
machine:
image: ubuntu-2204:2024.08.1

orbs:
go: circleci/[email protected]
Expand Down Expand Up @@ -32,23 +32,19 @@ commands:
steps:
- run:
name: Setup golangci-lint
command: curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin << parameters.version >>
command: curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s << parameters.version >>

install-goreleaser:
parameters:
version:
type: string
default: "2.5.1"
install-dependencies:
steps:
- run:
name: Install GoReleaser
command: |
echo 'deb [trusted=yes] https://repo.goreleaser.com/apt/ /' | tee /etc/apt/sources.list.d/goreleaser.list
apt -q update -y
apt -q install -y --no-install-recommends goreleaser=<< parameters.version >>
name: Install mise
command: curl https://mise.run | MISE_INSTALL_PATH=/home/circleci/bin/mise sh
- run:
name: Activate mise
command: echo 'eval "$(mise activate bash)"' >> $BASH_ENV
- run:
name: Output GoReleaser version
command: goreleaser --version
name: Install mise dependencies
command: mise install

install-go-modules:
steps:
Expand All @@ -61,6 +57,7 @@ jobs:
executor: default
steps:
- checkout-with-submodules
- install-dependencies
- run:
name: Check versions
command: just check-monorepo-versions
Expand All @@ -71,6 +68,7 @@ jobs:
FOUNDRY_PROFILE: ci
steps:
- checkout-with-submodules
- install-dependencies
- run:
name: Run Forge build
command: just build-contracts
Expand All @@ -82,7 +80,7 @@ jobs:
executor: default
steps:
- checkout-with-submodules
- install-go-modules
- install-dependencies
- install-golangci-lint
- run:
name: Run linter
Expand All @@ -92,6 +90,7 @@ jobs:
executor: default
steps:
- checkout-with-submodules
- install-dependencies
- install-go-modules
- run:
# We need to "rename" some of the variables coming from the CircleCI context
Expand All @@ -109,10 +108,12 @@ jobs:
executor: default
steps:
- checkout-with-submodules
- install-goreleaser
- install-dependencies
- install-go-modules
- utils/get-github-access-token:
# GoReleaser expects a GITHUB_TOKEN environment variable to be set
# GoReleaser uses the GITHUB_TOKEN environment variable to authenticate with GitHub
#
# It's important that the token has write permissions both to this repository and to the homebrew-tap repository
output-token-name: GITHUB_TOKEN
- run:
name: Run GoReleaser
Expand Down
3 changes: 3 additions & 0 deletions Justfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
set positional-arguments

build-book:
mdbook build ./docs

build-contracts:
forge --version
forge build --sizes --root ./contracts
Expand Down
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,24 @@ L2s: Predeploy Contracts Spec ( https://specs.optimism.io/protocol/predeploys.ht

### Development

#### Software dependencies

We use [`mise`](https://mise.jdx.dev/) as a dependency manager for these tools.
Once properly installed, `mise` will provide the correct versions for each tool. `mise` does not
replace any other installations of these binaries and will only serve these binaries when you are
working inside of the `optimism` directory.

##### Install `mise`

Install `mise` by following the instructions provided on the
[Getting Started page](https://mise.jdx.dev/getting-started.html#_1-install-mise-cli).

##### Install dependencies

```sh
mise install
```

#### Running locally

```sh
Expand Down
12 changes: 12 additions & 0 deletions mise.book.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# These dependencies are only required if you want to build the book

[tools]

# Cargo dependencies
"cargo:mdbook" = "0.4.43"
"cargo:mdbook-mermaid" = "0.14.1"

[env]
# On CI, when using the ci-builder image, we need to set the toolchain explicitly
# so that we avoid the "rustup could not choose a version of cargo to run, because one wasn't specified explicitly" error
RUSTUP_TOOLCHAIN = "1.83.0"
18 changes: 18 additions & 0 deletions mise.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
[tools]

# Core dependencies
go = "1.22.3"
rust = "1.83.0"
just = "1.37.0"

# Go dependencies
"ubi:goreleaser/goreleaser" = "2.5.1"

# Foundry
"ubi:foundry-rs/foundry[exe=forge]" = "nightly-59f354c179f4e7f6d7292acb3d068815c79286d1"

# Foundry provides multiple binaries so we alias them here
[alias]
forge = "ubi:foundry-rs/foundry[exe=forge]"
cast = "ubi:foundry-rs/foundry[exe=cast]"
anvil = "ubi:foundry-rs/foundry[exe=anvil]"
Loading