diff --git a/.circleci/config.yml b/.circleci/config.yml index 9c7194a96..c4d689ceb 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -5,25 +5,23 @@ orbs: utils: ethereum-optimism/circleci-utils@0.0.12 executors: - base: + default: machine: - image: ubuntu-2404:current - builder: - docker: - - image: us-docker.pkg.dev/oplabs-tools-artifacts/images/ci-builder-rust:22ebfb824d959a27a372cca10fe39aeb0b610343 + image: ubuntu-2204:2024.08.1 commands: install-dependencies: - description: Install dependencies steps: - # We enable corepack, a nodejs package manager manager - # that is reponsible for automatically determining the correct version of pnpm to use - run: - name: Enable corepack - command: corepack enable + name: Install mise + command: curl https://mise.run | MISE_INSTALL_PATH=/home/circleci/bin/mise sh - run: - name: Install dependencies - command: just deps + name: Activate mise + command: echo 'eval "$(mise activate bash)"' >> $BASH_ENV + - run: + name: Install mise dependencies + command: mise install + notify-failures-on-develop: description: "Notify Slack" parameters: @@ -39,7 +37,7 @@ commands: jobs: lint-specs: - executor: builder + executor: default steps: - checkout - run: @@ -50,7 +48,7 @@ jobs: command: just lint-specs-toc-check lint-links: - executor: builder + executor: default steps: - checkout - run: @@ -60,7 +58,7 @@ jobs: channel: C055R639XT9 #notify-link-check build-book: - executor: builder + executor: default steps: - checkout - install-dependencies @@ -76,7 +74,7 @@ jobs: - html publish-book: - executor: base + executor: default steps: - checkout - attach_workspace: diff --git a/README.md b/README.md index 26c506cce..19d9a0b04 100644 --- a/README.md +++ b/README.md @@ -19,6 +19,26 @@ We welcome your contributions. Read through [CONTRIBUTING.md](./CONTRIBUTING.md) ### Dependencies +#### Using `mise` + +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 +``` + +#### Manual installation + **Rust Toolchain** ```sh diff --git a/mise.toml b/mise.toml new file mode 100644 index 000000000..e7d9067cf --- /dev/null +++ b/mise.toml @@ -0,0 +1,23 @@ +[tools] + +# Core dependencies +rust = "1.83.0" +just = "1.37.0" +node = "20.9.0" + +# Cargo dependencies +"cargo:mdbook" = "0.4.43" +"cargo:mdbook-katex" = "0.9.2" +"cargo:mdbook-linkcheck" = "0.7.7" +"cargo:mdbook-mermaid" = "0.14.1" + +[hooks] +postinstall = [ + # Enabling corepack will install the `pnpm` package manager specified in package.json + 'npx corepack enable', + 'pnpm i --frozen-lockfile' +] + +[settings] +# Needs to be enabled for hooks to work +experimental = true \ No newline at end of file