-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathMakefile
More file actions
109 lines (74 loc) · 2.96 KB
/
Makefile
File metadata and controls
109 lines (74 loc) · 2.96 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
# SPDX-FileCopyrightText: 2025 TriliTech <contact@trili.tech>
#
# SPDX-License-Identifier: MIT
# The version of nightly that we use for anything that requires it
NIGHTLY_VERSION = nightly-2026-02-24
### Generic top-level targets
all: riscv/all sandbox/all jstz/all dummy/all page-cache-tester/all etherlink/all docs/all
check: riscv/check durable/check jstz/check dummy/check dummy-no-std/check page-cache-tester/check etherlink/check assets/check docs/check check-format
build: sandbox/build jstz/build dummy/build dummy-no-std/build page-cache-tester/build etherlink/build
clean: sandbox/clean jstz/clean dummy/clean page-cache-tester/clean etherlink/clean cargo-clean
### Specific top-level targets
audit:
@cargo audit
build-deps-slim: jstz/build-deps etherlink/build-deps
# Ensure the toolchain is installed.
# The second command triggers installation for Rustup 1.28+.
@rustup show active-toolchain || rustup toolchain install
@rustup component add rustfmt clippy
# Install Nightly for formatting with its Rustfmt
@rustup toolchain install ${NIGHTLY_VERSION} -c rustfmt -c rust-src
# Iterate through all the toolchains. 'rustup show' (before Rustup 1.28) and
# 'rustup toolchain install' (Rustup 1.28+) will install the toolchain.
@find . -iname 'rust-toolchain*' -execdir sh -c "rustup show active-toolchain || rustup toolchain install" \; 2>/dev/null
# Enable 'llvm-cov' subcommand for Cargo
@cargo llvm-cov --version || cargo install --locked cargo-llvm-cov
build-deps: build-deps-slim
# Coverage deps
@scripts/isa-suite-coverage.sh -d
check-nix:
@nix fmt
check-format: taplo-check-format rustfmt-check
taplo-check-format:
@taplo format --check
rustfmt-check:
@exec scripts/format.sh --all --check
test: jstz/test etherlink/test cargo-nextest-run cargo-test-doc
test-deps: dummy/build page-cache-tester/build dummy-no-std/build
codecov.json: test-deps
@cargo llvm-cov \
--package octez-riscv \
--package octez-riscv-data \
--package octez-riscv-durable-storage \
--codecov \
--output-path $@ \
nextest
cargo-nextest-run: test-deps
@cargo nextest run --workspace
cargo-test-doc:
@cargo test --workspace --doc
cargo-clean:
@cargo clean
### Target proxies
riscv/%:
@make -C pvm ${@:riscv/%=%}
durable/%:
@make -C durable-storage ${@:durable/%=%}
sandbox/%:
@make -C tools/sandbox ${@:sandbox/%=%}
jstz/%:
@make -C kernels/jstz ${@:jstz/%=%}
dummy/%:
@make -C kernels/dummy ${@:dummy/%=%}
dummy-no-std/%:
@make -C kernels/dummy-no-std ${@:dummy-no-std/%=%}
page-cache-tester/%:
@make -C kernels/page-cache-tester ${@:page-cache-tester/%=%}
etherlink/%:
@make -C kernels/etherlink ${@:etherlink/%=%}
assets/%:
@make -C assets ${@:assets/%=%}
docs/%:
@make -C docs ${@:docs/%=%}
# Mark all non-pattern targets as phony to make sure they're always executed
.PHONY: all build-deps build-deps-slim check check-nix check-format taplo-check-format rustfmt-check codecov.json audit build test test-deps clean cargo-nextest-run cargo-test-doc cargo-clean