|
16 | 16 | ;
|
17 | 17 | in
|
18 | 18 | {
|
19 |
| - checks = { |
20 |
| - workspace-clippy = craneLib.cargoClippy ( |
21 |
| - rustWorkspaceArgs |
22 |
| - // { |
23 |
| - inherit cargoArtifacts; |
24 |
| - cargoClippyExtraArgs = "--workspace -- --deny warnings"; |
25 |
| - } |
26 |
| - ); |
| 19 | + checks = |
| 20 | + let |
| 21 | + testWithProfile = |
| 22 | + profile: |
| 23 | + craneLib.cargoNextest ( |
| 24 | + rustWorkspaceArgsWithPython |
| 25 | + // { |
| 26 | + inherit cargoArtifacts; |
27 | 27 |
|
28 |
| - workspace-test = craneLib.cargoNextest ( |
29 |
| - rustWorkspaceArgsWithPython |
30 |
| - // { |
31 |
| - inherit cargoArtifacts; |
32 |
| - RUST_LOG = "info,psyche=trace"; |
33 |
| - partitions = 1; |
34 |
| - partitionType = "count"; |
35 |
| - cargoNextestExtraArgs = "--workspace --exclude psyche-decentralized-testing"; |
36 |
| - } |
37 |
| - ); |
| 28 | + RUST_LOG = "info,psyche=trace"; |
| 29 | + partitions = 1; |
| 30 | + partitionType = "count"; |
| 31 | + cargoNextestExtraArgs = "--workspace --profile ${profile}"; |
| 32 | + } |
| 33 | + ); |
| 34 | + in |
| 35 | + { |
| 36 | + workspace-clippy = craneLib.cargoClippy ( |
| 37 | + rustWorkspaceArgs |
| 38 | + // { |
| 39 | + inherit cargoArtifacts; |
| 40 | + cargoClippyExtraArgs = "--workspace -- --deny warnings"; |
| 41 | + } |
| 42 | + ); |
38 | 43 |
|
39 |
| - validate-all-configs = |
40 |
| - pkgs.runCommandNoCC "validate-configs" |
41 |
| - { nativeBuildInputs = [ self'.packages.psyche-centralized-server ]; } |
42 |
| - '' |
43 |
| - dir="${../config}" |
44 |
| - if [ ! -d "$dir" ]; then |
45 |
| - echo "config dir $dir does not exist." |
46 |
| - exit 1 |
47 |
| - fi |
| 44 | + workspace-test-all = testWithProfile "default"; |
48 | 45 |
|
49 |
| - for f in $dir/*; do |
50 |
| - if [ -f $f/data.toml ]; then |
51 |
| - psyche-centralized-server validate-config --state $f/state.toml --data-config $f/data.toml || exit 1 |
52 |
| - echo "config $f/data.toml and $f/state.toml ok!" |
53 |
| - else |
54 |
| - psyche-centralized-server validate-config --state $f/state.toml|| exit 1 |
55 |
| - echo "config $f/state.toml ok!" |
| 46 | + workspace-test-ci = testWithProfile "ci"; |
| 47 | + |
| 48 | + workspace-test-decentralized = testWithProfile "decentralized"; |
| 49 | + |
| 50 | + workspace-test-parallelism = testWithProfile "parallelism"; |
| 51 | + |
| 52 | + validate-all-configs = |
| 53 | + pkgs.runCommandNoCC "validate-configs" |
| 54 | + { nativeBuildInputs = [ self'.packages.psyche-centralized-server ]; } |
| 55 | + '' |
| 56 | + dir="${../config}" |
| 57 | + if [ ! -d "$dir" ]; then |
| 58 | + echo "config dir $dir does not exist." |
| 59 | + exit 1 |
56 | 60 | fi
|
57 |
| - done; |
58 | 61 |
|
59 |
| - echo "all configs ok!" |
| 62 | + for f in $dir/*; do |
| 63 | + if [ -f $f/data.toml ]; then |
| 64 | + psyche-centralized-server validate-config --state $f/state.toml --data-config $f/data.toml || exit 1 |
| 65 | + echo "config $f/data.toml and $f/state.toml ok!" |
| 66 | + else |
| 67 | + psyche-centralized-server validate-config --state $f/state.toml|| exit 1 |
| 68 | + echo "config $f/state.toml ok!" |
| 69 | + fi |
| 70 | + done; |
| 71 | +
|
| 72 | + echo "all configs ok!" |
60 | 73 |
|
61 |
| - touch $out |
62 |
| - ''; |
63 |
| - }; |
| 74 | + touch $out |
| 75 | + ''; |
| 76 | + }; |
64 | 77 | };
|
65 | 78 | }
|
0 commit comments