Skip to content

Commit 9bce36f

Browse files
committed
chore: move from Makefile to mise [skip ci]
1 parent 4628a7f commit 9bce36f

File tree

3 files changed

+82
-81
lines changed

3 files changed

+82
-81
lines changed

Makefile

Lines changed: 0 additions & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -1,82 +1,3 @@
1-
install:
2-
cargo install --locked --path . --force
3-
4-
install-quick:
5-
cargo install --profile quick --locked --path . --force
6-
7-
install-slim:
8-
cargo install --no-default-features --features slim --locked --path . --force
9-
10-
install-slim-quick:
11-
cargo install --profile quick --no-default-features --features slim --locked --path . --force
12-
13-
install-minimum:
14-
cargo install --no-default-features --locked --path . --force
15-
16-
install-lto-fat:
17-
cargo install --locked --force --profile release-lto-fat --path .
18-
19-
install-minimum-quick:
20-
cargo install --profile quick --no-default-features --locked --path . --force
21-
22-
# Installs Forest binaries with default rust global allocator
23-
install-with-rustalloc:
24-
cargo install --locked --path . --force --no-default-features --features rustalloc
25-
26-
install-lint-tools:
27-
cargo install --locked taplo-cli
28-
cargo install --locked cargo-deny
29-
cargo install --locked cargo-spellcheck
30-
31-
# Denotes the architecture of the machine. This is required for direct binary downloads.
32-
# Note that some repositories might use different names for the same architecture.
33-
CPU_ARCH := $(shell \
34-
ARCH=$$(uname -m); \
35-
if [ "$$ARCH" = "arm64" ]; then \
36-
ARCH="aarch64"; \
37-
fi; \
38-
echo "$$ARCH" \
39-
)
40-
41-
install-cargo-binstall:
42-
wget https://github.com/cargo-bins/cargo-binstall/releases/latest/download/cargo-binstall-$(CPU_ARCH)-unknown-linux-musl.tgz
43-
tar xzf cargo-binstall-$(CPU_ARCH)-unknown-linux-musl.tgz
44-
cp cargo-binstall ~/.cargo/bin/cargo-binstall
45-
46-
install-lint-tools-ci: install-cargo-binstall
47-
cargo binstall --no-confirm taplo-cli cargo-spellcheck cargo-deny
48-
49-
clean:
50-
cargo clean
51-
52-
# Lints with everything we have in our CI arsenal
53-
lint-all: lint deny spellcheck
54-
55-
deny:
56-
cargo deny check bans licenses sources || (echo "See deny.toml"; false)
57-
58-
spellcheck:
59-
cargo spellcheck --code 1 || (echo "See .config/spellcheck.md for tips"; false)
60-
61-
lint: license clean lint-clippy
62-
cargo fmt --all --check
63-
taplo fmt --check
64-
taplo lint
65-
66-
# Don't bother linting different allocators
67-
# --quiet: don't show build logs
68-
lint-clippy:
69-
cargo clippy --all-targets --quiet --no-deps -- --deny=warnings
70-
cargo clippy --all-targets --no-default-features --features slim --quiet --no-deps -- --deny=warnings
71-
cargo clippy --all-targets --no-default-features --quiet --no-deps -- --deny=warnings
72-
cargo clippy --benches --features benchmark-private --quiet --no-deps -- --deny=warnings
73-
# check docs.rs build
74-
DOCS_RS=1 cargo clippy --all-targets --quiet --no-deps -- --deny=warnings
75-
76-
DOCKERFILES=$(wildcard Dockerfile*)
77-
lint-docker: $(DOCKERFILES)
78-
docker run --rm -i hadolint/hadolint < $<
79-
801
lint-go:
812
go run github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.3.1 run ./f3-sidecar ./interop-tests/src/tests/go_app
823

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
2-
#
3-
# Checks if the source code contains required license and adds it if necessary.
2+
#MISE description="Checks if the source code contains required license and adds it if necessary."
3+
44
# Returns 1 if there was a missing license, 0 otherwise.
55

66
PAT_APA="^// Copyright 2019-2025 ChainSafe Systems// SPDX-License-Identifier: Apache-2.0, MIT$"

mise.toml

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
[tasks.install]
2+
description = "Installs all Forest binaries with a specified profile."
3+
usage = '''
4+
arg "<profile>" help="Installation profile (quick, release, etc.)" default="quick" {
5+
choices "quick" "release" "dev"
6+
}
7+
flag "--slim" help="Install a slim version"
8+
flag "-v --verbose" help="Enable verbose output"
9+
'''
10+
run = '''
11+
echo "Installing Forest binaries with profile: ${usage_profile?}"
12+
[[ -n "${usage_verbose}" ]] && set -x
13+
if [ "${usage_slim}" = true ]; then
14+
SLIM_FLAGS="--no-default-features --features slim"
15+
fi
16+
cargo install --profile ${usage_profile} ${SLIM_FLAGS} --locked --path . --force
17+
'''
18+
alias = 'i'
19+
20+
[tasks.install-lint-tools]
21+
description = "Installs linting tools for CI"
22+
tools.cargo-binstall = "latest"
23+
run = "cargo binstall --no-confirm taplo-cli cargo-spellcheck cargo-deny"
24+
25+
[tasks."lint:deny"]
26+
description = "Run cargo-deny to check for license and security issues."
27+
run = '''
28+
cargo deny check bans licenses sources || (echo "See deny.toml"; false)
29+
'''
30+
31+
[tasks."lint:spellcheck"]
32+
description = "Run cargo-spellcheck to check for spelling errors."
33+
run = '''
34+
cargo spellcheck --code 1 || (echo "See .config/spellcheck.md for tips"; false)
35+
'''
36+
37+
[tasks."lint:toml"]
38+
description = "Run taplo-cli to check TOML files."
39+
run = '''
40+
taplo fmt --check
41+
taplo lint
42+
'''
43+
44+
[tasks."lint:rust-fmt"]
45+
description = "Run cargo-fmt to check Rust code formatting."
46+
run = '''
47+
cargo fmt --all -- --check
48+
'''
49+
50+
[tasks."lint:clippy"]
51+
description = "Run cargo-clippy to check Rust code for common mistakes."
52+
run = '''
53+
cargo clippy --all-targets --quiet --no-deps -- --deny=warnings
54+
cargo clippy --all-targets --no-default-features --features slim --quiet --no-deps -- --deny=warnings
55+
cargo clippy --all-targets --no-default-features --quiet --no-deps -- --deny=warnings
56+
cargo clippy --benches --features benchmark-private --quiet --no-deps -- --deny=warnings
57+
# check docs.rs build
58+
DOCS_RS=1 cargo clippy --all-targets --quiet --no-deps -- --deny=warnings
59+
'''
60+
61+
[tasks."lint:dockerfile"]
62+
description = "Lint Dockerfiles using hadolint."
63+
tools.hadolint = "latest"
64+
run = '''
65+
hadolint Dockerfile*
66+
'''
67+
68+
[tasks.lint]
69+
description = "Run all linting tasks."
70+
depends = ["lint:*"]
71+
72+
[tasks.clean]
73+
description = "Cleanup all build artifacts and dependencies."
74+
run = '''
75+
cargo clean
76+
rm -rf node_modules
77+
'''
78+
79+
[tools]
80+
cargo-binstall = "latest"

0 commit comments

Comments
 (0)