-
-
Notifications
You must be signed in to change notification settings - Fork 14
/
Makefile.toml
177 lines (143 loc) · 5.15 KB
/
Makefile.toml
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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
[config]
skip_core_tasks = true
default_to_workspace = false
time_summary = true
[env]
CARGO_MAKE_EXTEND_WORKSPACE_MAKEFILE = true
RUST_BACKTRACE = 1
[tasks.install-rust-nightly-rustfmt]
private = true
description = "Installs nightly Rust with rustfmt (hopefully)."
toolchain = "nightly"
install_crate = { rustup_component_name = "rustfmt", binary = "rustfmt", test_arg = "--version" }
[tasks.install-rust-toolchain]
private = true
description = "Installs the used Rust toolchain with specified components."
command = "rustup"
args = ["show"]
[tasks.format]
description = "Formats all Rust code."
install_crate = false
command = "cargo"
args = ["+nightly", "fmt"]
dependencies = ["install-rust-nightly-rustfmt"]
[tasks.formatting]
description = "Checks all Rust code formatting."
install_crate = false
command = "cargo"
args = ["+nightly", "fmt", "--", "--check"]
dependencies = ["install-rust-nightly-rustfmt"]
[tasks.clippy-default]
install_crate = false
command = "cargo"
args = ["clippy", "--workspace", "--all-targets", "--", "-D", "warnings"]
dependencies = ["install-rust-toolchain"]
[tasks.clippy-stu3-no-builders]
install_crate = false
command = "cargo"
args = ["clippy", "-p", "fhir-sdk", "--all-targets", "--no-default-features", "--features", "stu3", "--", "-D", "warnings"]
dependencies = ["install-rust-toolchain"]
[tasks.clippy-stu3-client]
install_crate = false
command = "cargo"
args = ["clippy", "-p", "fhir-sdk", "--all-targets", "--no-default-features", "--features", "stu3,client", "--", "-D", "warnings"]
dependencies = ["install-rust-toolchain"]
[tasks.clippy-r4b-no-builders]
install_crate = false
command = "cargo"
args = ["clippy", "-p", "fhir-sdk", "--all-targets", "--no-default-features", "--features", "r4b", "--", "-D", "warnings"]
dependencies = ["install-rust-toolchain"]
[tasks.clippy-r4b-client]
install_crate = false
command = "cargo"
args = ["clippy", "-p", "fhir-sdk", "--all-targets", "--no-default-features", "--features", "r4b,client", "--", "-D", "warnings"]
dependencies = ["install-rust-toolchain"]
[tasks.clippy-r5-no-builders]
install_crate = false
command = "cargo"
args = ["clippy", "-p", "fhir-sdk", "--all-targets", "--no-default-features", "--features", "r5", "--", "-D", "warnings"]
dependencies = ["install-rust-toolchain"]
[tasks.clippy-r5-client]
install_crate = false
command = "cargo"
args = ["clippy", "-p", "fhir-sdk", "--all-targets", "--no-default-features", "--features", "r5,client", "--", "-D", "warnings"]
dependencies = ["install-rust-toolchain"]
[tasks.clippy-all]
install_crate = false
command = "cargo"
args = ["clippy", "--workspace", "--all-targets", "--all-features", "--", "-D", "warnings"]
dependencies = ["install-rust-toolchain"]
[tasks.clippy]
description = "Runs clippy with all various feature sets."
dependencies = [
"clippy-default",
"clippy-stu3-no-builders",
"clippy-stu3-client",
"clippy-r4b-no-builders",
"clippy-r4b-client",
"clippy-r5-no-builders",
"clippy-r5-client",
"clippy-all",
]
# Builders are implicitly enabled in the client.
[tasks.test-all]
description = "Runs all tests via cargo test."
install_crate = false
command = "cargo"
args = ["test", "--workspace", "--all-features"]
dependencies = ["install-rust-toolchain"]
[tasks.test-nextest]
description = "Runs all tests via nextest (installs nextest if necessary)."
install_crate = true
command = "cargo"
args = ["nextest", "run", "--workspace", "--all-features"]
dependencies = ["install-rust-toolchain"]
[tasks.test-docs]
description = "Runs all doc-tests (since nextest does not)."
install_crate = false
command = "cargo"
args = ["test", "--workspace", "--doc"]
dependencies = ["install-rust-toolchain"]
[tasks.test]
description = "Runs all tests."
dependencies = ["test-nextest", "test-docs"]
[tasks.docker]
description = "Runs docker compose with your given arguments. Without profiles, it will do nothing."
install_crate = false
cwd = "./docker/"
command = "docker"
args = ["compose", "${@}"]
[tasks.docker-ci-up]
description = "Runs `docker compose up -d` for all services (ci profile)."
install_crate = false
cwd = "./docker/"
command = "docker"
args = ["compose", "--profile", "ci", "up", "-d"]
[tasks.docker-ci-down]
description = "Runs `docker compose down -v` for all services (ci profile)."
install_crate = false
cwd = "./docker/"
command = "docker"
args = ["compose", "--profile", "ci", "down", "-v"]
[tasks.ci-tests]
description = "Runs all tests with the necessary services via docker."
run_task.fork = true
run_task.name = ["docker-ci-up", "test", "docker-ci-down"]
run_task.cleanup_task = "docker-ci-down"
[tasks.ci]
description = """
Runs all checks necessary for CI to pass.
It is recommended to start docker once via "docker-ci-up" during development.
Then run "formatting", "test" and "clippy" as needed.
Shut down docker via "docker-ci-down" when done.
"""
dependencies = ["formatting", "ci-tests", "clippy"]
[tasks.generate]
description = "Run the code generator for fhir-model to produce all FHIR code."
install_crate = false
condition = { files_modified = { input = ["./crates/generate/**/*"], output = ["./target/**/generate"] } }
command = "cargo"
args = ["run", "-p", "generate"]
dependencies = ["install-rust-toolchain"]
[tasks.default]
alias = "ci"