Skip to content
Merged
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
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ CHANGELOG*
*.md
target/
scripts/
!scripts/install_mise.sh

# Ignore CAR files fetched to the project directory which tends to happen during development.
# Without it, the Docker context may bloat to hundreds of gigabytes of data.
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/butterflynet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,12 @@ jobs:
uses: mozilla-actions/sccache-action@v0.0.9
timeout-minutes: ${{ fromJSON(env.CACHE_TIMEOUT_MINUTES) }}
continue-on-error: true
- uses: actions/setup-go@v6
with:
go-version-file: "go.work"
- uses: jdx/mise-action@v3
- name: Build and install Forest binaries
env:
# To minimize compile times: https://nnethercote.github.io/perf-book/build-configuration.html#minimizing-compile-times
RUSTFLAGS: "-C linker=clang -C link-arg=-fuse-ld=lld"
run: make install-slim-quick
run: mise run install --slim
- name: Run butterflynet checks
run: ./scripts/tests/butterflynet_check.sh
timeout-minutes: ${{ fromJSON(env.SCRIPT_TIMEOUT_MINUTES) }}
2 changes: 1 addition & 1 deletion .github/workflows/cargo-advisories.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
runs-on: ubuntu-24.04-arm
steps:
- uses: actions/checkout@v6
- run: make install-cargo-binstall
- uses: jdx/mise-action@v3
- run: cargo binstall --no-confirm cargo-deny
- run: cargo deny check advisories
- name: Set WORKFLOW_URL
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,17 +59,15 @@ jobs:
uses: mozilla-actions/sccache-action@v0.0.9
timeout-minutes: ${{ fromJSON(env.CACHE_TIMEOUT_MINUTES) }}
continue-on-error: true
- uses: actions/setup-go@v6
with:
go-version-file: "go.work"
- uses: jdx/mise-action@v3
- uses: taiki-e/install-action@cargo-llvm-cov
- uses: taiki-e/install-action@nextest
- name: Fetch proof params and RPC test snapshots
run: |
cargo run --bin forest-dev --no-default-features --profile quick -- fetch-rpc-tests
ls -ahl $FIL_PROOFS_PARAMETER_CACHE
- name: Generate code coverage
run: make codecov
run: mise codecov
# Save lcov.info as an artifact for debugging purposes
- uses: actions/upload-artifact@v6
with:
Expand Down
12 changes: 4 additions & 8 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,12 @@ jobs:
uses: mozilla-actions/sccache-action@v0.0.9
timeout-minutes: ${{ fromJSON(env.CACHE_TIMEOUT_MINUTES) }}
continue-on-error: true
- uses: actions/setup-go@v6
with:
go-version-file: "go.work"
- uses: jdx/mise-action@v3
- name: Cargo Install
env:
# To minimize compile times: https://nnethercote.github.io/perf-book/build-configuration.html#minimizing-compile-times
RUSTFLAGS: "-C linker=clang -C link-arg=-fuse-ld=lld"
run: make install
run: mise run install release
- uses: actions/upload-artifact@v6
with:
name: "forest-linux-amd64"
Expand Down Expand Up @@ -104,13 +102,11 @@ jobs:
if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v')
timeout-minutes: ${{ fromJSON(env.CACHE_TIMEOUT_MINUTES) }}
continue-on-error: true
- uses: actions/setup-go@v6
- uses: jdx/mise-action@v3
if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v')
with:
go-version-file: "go.work"
- name: Cargo Install
if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v')
run: make install
run: mise run install release
- uses: actions/upload-artifact@v6
if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v')
with:
Expand Down
15 changes: 4 additions & 11 deletions .github/workflows/forest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,17 +82,15 @@ jobs:
uses: mozilla-actions/sccache-action@v0.0.9
timeout-minutes: ${{ fromJSON(env.CACHE_TIMEOUT_MINUTES) }}
continue-on-error: true
- uses: actions/setup-go@v6
with:
go-version-file: "go.work"
- uses: jdx/mise-action@v3
- name: Go tests
run: |
go test -v ./tools/prometheus_metrics_validator
- name: Cargo Install
- name: Install Forest
env:
# To minimize compile times: https://nnethercote.github.io/perf-book/build-configuration.html#minimizing-compile-times
RUSTFLAGS: "-C linker=clang -C link-arg=-fuse-ld=lld"
run: make install-slim-quick
run: mise run install --slim
- uses: actions/upload-artifact@v6
with:
name: "forest-${{ runner.os }}"
Expand All @@ -108,12 +106,7 @@ jobs:
uses: mozilla-actions/sccache-action@v0.0.9
timeout-minutes: ${{ fromJSON(env.CACHE_TIMEOUT_MINUTES) }}
continue-on-error: true
- name: Install Apt Dependencies
run: |
sudo make install-deps
- uses: actions/setup-go@v6
with:
go-version-file: "go.work"
- uses: jdx/mise-action@v3
- run: cargo publish --dry-run
forest-cli-check:
needs:
Expand Down
10 changes: 4 additions & 6 deletions .github/workflows/go-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,17 @@ on:
- main
paths:
- ".github/workflows/go-lint.yml"
- "Makefile"
- "go.work"
- "mise.toml"
- "f3-sidecar/**"
- "interop-tests/src/tests/**"
push:
branches:
- main
paths:
- ".github/workflows/go-lint.yml"
- "Makefile"
- "go.work"
- "mise.toml"
- "f3-sidecar/**"
- "interop-tests/src/tests/**"

Expand All @@ -35,7 +35,5 @@ jobs:
runs-on: ubuntu-24.04-arm
steps:
- uses: actions/checkout@v6
- uses: actions/setup-go@v6
with:
go-version-file: "go.work"
- run: make lint-go
- uses: jdx/mise-action@v3
- run: mise lint:golang
23 changes: 4 additions & 19 deletions .github/workflows/rust-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,33 +50,18 @@ jobs:
uses: mozilla-actions/sccache-action@v0.0.9
timeout-minutes: ${{ fromJSON(env.CACHE_TIMEOUT_MINUTES) }}
continue-on-error: true
- uses: actions/setup-go@v6
with:
go-version-file: "go.work"
- uses: jdx/mise-action@v3
- name: Apt Dependencies
uses: nick-fields/retry@v3
with:
timeout_minutes: 5
max_attempts: 3
command: |
sudo apt-get install -y libclang-dev # required dep for cargo-spellcheck
- name: Install Lint tools
run: make install-lint-tools-ci
- name: Lint
env:
RUSTFLAGS: "-Cstrip=symbols"
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- run: make lint-all

dependencies-check:
name: Check cargo files
runs-on: ubuntu-24.04-arm
steps:
- uses: actions/checkout@v6
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: "3.0"
- name: Run dependencies checks
run: |
gem install toml-rb --no-document
ruby scripts/linters/find_unused_deps.rb
mise install-lint-tools
mise lint:all-rust
30 changes: 10 additions & 20 deletions .github/workflows/scripts-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,25 +16,19 @@ on:

jobs:
shellcheck:
runs-on: ubuntu-24.04
runs-on: ubuntu-24.04-arm
steps:
- uses: actions/checkout@v6
- uses: jdx/mise-action@v3
- name: Run shellcheck
uses: ludeeus/action-shellcheck@2.0.0
env:
SHELLCHECK_OPTS: --external-sources --source-path=SCRIPTDIR
run: mise lint:shellcheck

rubocop:
runs-on: ubuntu-24.04-arm
steps:
- uses: actions/checkout@v6
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: "3.0"
- name: Run rubocop
run: |
gem install rubocop -v 1.58 --no-document
rubocop scripts/
- uses: jdx/mise-action@v3
- run: mise lint:ruby
python-lint:
if: ${{ !startsWith(github.ref, 'refs/heads/gh-readonly-queue/') }}
runs-on: ubuntu-24.04-arm
Expand Down Expand Up @@ -75,18 +69,14 @@ jobs:
runs-on: ubuntu-24.04-arm
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version: 20
package-manager-cache: false
- run: corepack enable
- run: yarn --immutable
- run: yarn yaml-check
- uses: jdx/mise-action@v3
- run: mise lint:yaml
lists-lint:
runs-on: ubuntu-24.04-arm
steps:
- uses: actions/checkout@v6
- uses: jdx/mise-action@v3
- name: Sort and verify lists
run: |
make sort-lists
mise lint:lists
git diff --exit-code
4 changes: 2 additions & 2 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,9 @@ jobs:
run: |
cargo run --bin forest-dev --no-default-features --profile quick -- fetch-rpc-tests
ls -ahl $FIL_PROOFS_PARAMETER_CACHE
- uses: jdx/mise-action@v3
- run: |
make test-release-docs
make test-release
mise test release
env:
# To minimize compile times: https://nnethercote.github.io/perf-book/build-configuration.html#minimizing-compile-times
RUSTFLAGS: "-C linker=clang -C link-arg=-fuse-ld=lld"
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@

### Changed

- [#6368](https://github.com/ChainSafe/forest/pull/6368): Migrated build and development tooling from Makefile to `mise`. Contributors should install `mise` and use `mise run` commands instead of `make` commands.

### Removed

### Fixed
Expand Down
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ You will also need to install Go - the toolchain version is specified in the
the [Go website](https://golang.org/doc/install).

We also use linters and tools to work with the code - you can install them by
running `make install-lint-tools`.
running `mise install-lint-tools`.

#### 👥Fork and clone the repository

Expand All @@ -198,7 +198,7 @@ your local machine. You can read more in the
#### ✅Check that everything works

Before you start making changes, you should make sure that everything works. You
can do this by running the tests with `make test`. Note that you need to have
can do this by running the tests with `mise test`. Note that you need to have
[cargo nextest](https://nexte.st/) installed to run the tests.

#### 💻Make your changes
Expand Down Expand Up @@ -241,7 +241,7 @@ public functions and structs. Please refer to the Forest team's
Formatting is standardised via various formatting tools for different
technologies. Please make sure to run the appropriate formatter before
submitting your code, otherwise it will not pass the CI checks. You can format
the code, including markdown files, with `make fmt`.
the code, including markdown files, with `mise fmt`.

### 💬 Commit Messages

Expand Down
5 changes: 4 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,14 @@ ENV PATH="/root/.cargo/bin:${PATH}"
WORKDIR /forest
COPY . .

RUN ./scripts/install_mise.sh

# Install Forest. Move it out of the cache for the prod image.
RUN --mount=type=cache,sharing=private,target=/root/.cargo/registry \
--mount=type=cache,sharing=private,target=/root/.rustup \
--mount=type=cache,sharing=private,target=/forest/target \
make install && \
mise trust && \
mise run install && \
mkdir /forest_out && \
cp /root/.cargo/bin/forest* /forest_out

Expand Down
Loading
Loading