Skip to content

Commit 50f97aa

Browse files
committed
Merge remote-tracking branch 'origin/develop'
2 parents f5c71ff + cd93d18 commit 50f97aa

File tree

3 files changed

+26
-6
lines changed

3 files changed

+26
-6
lines changed

.github/workflows/test.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,9 @@ jobs:
4545
- name: 'Build pattern matching compiler'
4646
run: GC_DONT_GC=1 nix build --print-build-logs .#llvm-backend-matching
4747

48+
- name: 'Smoke test integration test shell'
49+
run: GC_DONT_GC=1 nix develop --print-build-logs .#integration-test-shell-18 --command lit -v test/defn/imp.kore
50+
4851
- name: 'Test LLVM backend'
4952
run: GC_DONT_GC=1 nix flake check --print-build-logs
5053

flake.nix

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@
111111
{
112112
name = "llvm-backend-${toString args.llvm-version}-${args.build-type}";
113113
value = {
114-
inherit (pkgs) llvm-backend llvm-backend-matching llvm-kompile-testing integration-tests;
114+
inherit (pkgs) llvm-backend llvm-backend-matching llvm-kompile-testing integration-tests integration-test-shell;
115115
};
116116
}
117117
));
@@ -120,6 +120,11 @@
120120
inherit (llvm-backend-18-FastBuild) llvm-backend llvm-backend-matching llvm-kompile-testing;
121121
default = llvm-backend-18-FastBuild.llvm-backend;
122122
llvm-backend-release = llvm-backend-18-Release.llvm-backend;
123+
124+
integration-test-shell-15 = llvm-backend-15-Debug.integration-test-shell;
125+
integration-test-shell-16 = llvm-backend-16-Debug.integration-test-shell;
126+
integration-test-shell-17 = llvm-backend-17-Debug.integration-test-shell;
127+
integration-test-shell-18 = llvm-backend-18-Debug.integration-test-shell;
123128
};
124129

125130
checks = listToChecks [

nix/overlay.nix

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,13 @@ let
5454
patchShebangs "$out/bin/llvm-kompile-testing"
5555
'';
5656

57+
integration-test-env = ''
58+
export PYTHON_INTERPRETER=${llvm-backend.python-interpreter}
59+
export BINDINGS_INSTALL_PATH=${llvm-backend}/lib/kllvm/python
60+
export INCLUDE_INSTALL_PATH=${llvm-backend}/include
61+
export LIT_USE_NIX=1
62+
'';
63+
5764
integration-tests = prev.stdenv.mkDerivation {
5865
name = "llvm-backend-integration-tests";
5966
src = llvm-backend.src;
@@ -66,16 +73,16 @@ let
6673
llvm-backend # the system under test
6774
];
6875
configurePhase = "true";
76+
6977
buildPhase = ''
7078
runHook preBuild
7179
72-
PYTHON_INTERPRETER=${llvm-backend.python-interpreter} \
73-
BINDINGS_INSTALL_PATH=${llvm-backend}/lib/kllvm/python \
74-
INCLUDE_INSTALL_PATH=${llvm-backend}/include \
75-
LIT_USE_NIX=1 lit -v test
80+
${integration-test-env}
81+
lit -v test
7682
7783
runHook postBuild
7884
'';
85+
7986
installPhase = ''
8087
runHook preInstall
8188
@@ -85,8 +92,13 @@ let
8592
runHook postInstall
8693
'';
8794
};
95+
96+
integration-test-shell = prev.mkShell {
97+
inputsFrom = [ integration-tests ];
98+
shellHook = integration-test-env;
99+
};
88100
in {
89101
inherit kllvm llvm-backend llvm-backend-matching llvm-kompile-testing
90-
integration-tests;
102+
integration-tests integration-test-shell;
91103
inherit (prev) clang; # for compatibility
92104
}

0 commit comments

Comments
 (0)