Skip to content

Commit

Permalink
chore: Add mise
Browse files Browse the repository at this point in the history
  • Loading branch information
janjakubnanista committed Jan 17, 2025
1 parent 2963caa commit be57242
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 16 deletions.
30 changes: 14 additions & 16 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,23 @@ orbs:
utils: ethereum-optimism/[email protected]

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:
Expand All @@ -39,7 +37,7 @@ commands:

jobs:
lint-specs:
executor: builder
executor: default
steps:
- checkout
- run:
Expand All @@ -50,7 +48,7 @@ jobs:
command: just lint-specs-toc-check

lint-links:
executor: builder
executor: default
steps:
- checkout
- run:
Expand All @@ -60,7 +58,7 @@ jobs:
channel: C055R639XT9 #notify-link-check

build-book:
executor: builder
executor: default
steps:
- checkout
- install-dependencies
Expand All @@ -76,7 +74,7 @@ jobs:
- html

publish-book:
executor: base
executor: default
steps:
- checkout
- attach_workspace:
Expand Down
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
23 changes: 23 additions & 0 deletions mise.toml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit be57242

Please sign in to comment.