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
6 changes: 3 additions & 3 deletions .github/workflows/quint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
needs: detect
if: needs.detect.outputs.quint == 'true'
runs-on: ubuntu-latest
# The Quint Connect Nix check compiles the CLI crate, so this needs more
# The focused Quint Connect Nix package compiles the CLI crate, so this needs more
# headroom than the pure-Quint steps alone required.
timeout-minutes: 30
steps:
Expand Down Expand Up @@ -96,11 +96,11 @@ jobs:
--max-steps=20

- name: Quint Connect model-based tests (Nix-pinned Rust + Quint)
# The entire MBT invocation goes through this Nix check rather than
# The entire MBT invocation goes through this opt-in Nix package rather than
# `cargo test` on the runner's own Cargo, so both the Rust toolchain
# and the Quint binary come from the repository's pinned flake
# inputs, never a second, unpinned Rust installation.
run: nix build .#checks.x86_64-linux.mutation-trace-quint-connect --print-build-logs
run: nix build .#mutation-trace-quint-connect --print-build-logs

gate:
name: Quint gate
Expand Down
73 changes: 34 additions & 39 deletions context/cli/mutation-trace-quint-connect.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 25 additions & 0 deletions context/sce/flake-build-performance.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

70 changes: 43 additions & 27 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,26 @@

cargoArtifacts = craneLib.buildDepsOnly cargoDepsArgs;

# Keep production artifacts on Crane's release profile. The test and
# Clippy derivations use the unoptimized Cargo test profile with a
# separate dependency cache, so changing CLI sources does not require
# repeatedly optimizing the entire Rust test binary.
testProfileArgs = {
CARGO_PROFILE = "test";
# Preserve useful file/line backtraces without full DWARF debug info.
CARGO_PROFILE_TEST_DEBUG = "line-tables-only";
};

cargoArtifactsTest = craneLib.buildDepsOnly (
cargoDepsArgs
// testProfileArgs
// { pname = "sce-test-deps"; }
);

testCargoArgs = commonCargoArgs // testProfileArgs // {
cargoArtifacts = cargoArtifactsTest;
};

scePackage = craneLib.buildPackage (
commonCargoArgs
// {
Expand Down Expand Up @@ -1529,6 +1549,24 @@
''}
'';

# The dedicated MBT runner is opt-in as a package, not a flake check:
# cli-tests already executes the same mutation_trace::mbt test module.
# Quint CI still invokes this focused runner independently.
mutationTraceQuintConnectCheck = craneLib.cargoTest (
testCargoArgs
// {
pname = "sce-mutation-trace-quint-connect";
doCheck = true;
cargoTestExtraArgs = "mutation_trace::mbt";
nativeCheckInputs = [ pkgs.git pkgs.quint ];
preCheck = ''
rustc --version
cargo --version
quint --version
'';
}
);

sceApp = {
type = "app";
program = "${scePackage}/bin/sce";
Expand All @@ -1552,6 +1590,7 @@
ci-checks = ciChecks;
bun = bunPackage;
quint = pkgs.quint;
mutation-trace-quint-connect = mutationTraceQuintConnectCheck;
quint-language-server = quintLanguageServerPackage;
turso = tursoPackage;
default = scePackage;
Expand All @@ -1562,23 +1601,21 @@
# `mutation_trace::mbt` (the Quint Connect model-based-testing
# harness) is an ordinary `#[cfg(test)]` module reached by the
# full `cargo test` this check runs, so the pinned Quint binary
# must be on PATH here too, not only in the dedicated
# `mutation-trace-quint-connect` check below.
# must be on PATH for this check. The focused MBT runner is
# available separately as .#mutation-trace-quint-connect.
cli-tests = craneLib.cargoTest (
commonCargoArgs
testCargoArgs
// {
pname = "sce-cli-tests";
inherit cargoArtifacts;
doCheck = true;
nativeCheckInputs = [ pkgs.git pkgs.quint ];
}
);

cli-clippy = craneLib.cargoClippy (
commonCargoArgs
testCargoArgs
// {
pname = "sce-cli-clippy";
inherit cargoArtifacts;
cargoClippyExtraArgs = "--all-targets --all-features";
}
);
Expand All @@ -1590,27 +1627,6 @@
}
);

# Focused Quint Connect model-based-testing check: runs only
# `mutation_trace::mbt` under the repository's pinned Rust
# toolchain and pinned Quint binary, reusing the same
# `cargoArtifacts`/`commonCargoArgs` pipeline as `cli-tests`
# rather than a bespoke Rust+Quint environment.
mutation-trace-quint-connect = craneLib.cargoTest (
commonCargoArgs
// {
pname = "sce-mutation-trace-quint-connect";
inherit cargoArtifacts;
doCheck = true;
cargoTestExtraArgs = "mutation_trace::mbt";
nativeCheckInputs = [ pkgs.git pkgs.quint ];
preCheck = ''
rustc --version
cargo --version
quint --version
'';
}
);

cli-generated-input = cliGeneratedInputCheck;
pkl-generated = pklGeneratedCheck;
codex-hook-command = codexHookCommandCheck;
Expand Down
Loading