Skip to content

Commit 196e9f9

Browse files
committed
Convert test-passthru-ascii and use as nix run target for CI.
1 parent f991c9e commit 196e9f9

File tree

4 files changed

+39
-4
lines changed

4 files changed

+39
-4
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,6 @@ jobs:
4141
with:
4242
name: kquick
4343
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
44-
- name: nixbuild_all
44+
- name: ci-build
4545
shell: bash
46-
run: nix run github:galoisinc/eng dev nixbuild:all
46+
run: nix run github:galoisinc/eng dev ci-build

_eng_/dev.eng

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,29 @@ dev
3939
in dir = {TopDir}
4040
needs = nixbuild nixbuild:old nixbuild:recent
4141
exec = echo All nix builds completed
42+
43+
ci-build =
44+
Build target for CI
45+
in dir = {TopDir}
46+
notes =
47+
48+
This uses "nix run" instead of "nix build" for Github CI support. This
49+
is less efficient in that there is no parallelism, but more efficient
50+
because a nix build will fetch all dependencies (from
51+
github:nixos/nixpkgs or cachix) even if there is no actual build needed
52+
and a nix run will only fetch the runtime closure but *will* perform a
53+
nix build if needed.
54+
55+
env vars =
56+
CI_TEST_LEVEL = 1
57+
exec =
58+
echo :::: GHC 8.10
59+
nix run --override-input nixpkgs github:nixos/nixpkgs/25.05 .#tasty-sugar.ghc810
60+
echo :::: GHC 9.0
61+
nix run --override-input nixpkgs github:nixos/nixpkgs/25.05 .#tasty-sugar.ghc90
62+
echo :::: GHC 9.2
63+
nix run --override-input nixpkgs github:nixos/nixpkgs/25.05 .#tasty-sugar.ghc92
64+
for V in 9.4 9.6 9.8 9.10 9.12 ; do
65+
echo :::: GHC $V
66+
nix run .#tasty-sugar.ghc$(echo $V | sed -e s/\\.//)
67+
done

flake.nix

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,16 @@
3434
}:
3535
rec
3636
{
37+
apps = levers.eachSystem (s:
38+
rec
39+
{
40+
test-passthru-ascii = {
41+
type = "app";
42+
program = "${self.packages.${s}.tasty-sugar}/bin/test-passthru-ascii";
43+
};
44+
default = test-passthru-ascii;
45+
});
46+
3747
devShells = levers.haskellShells
3848
{ inherit nixpkgs;
3949
flake = self;

tasty-sugar.cabal

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,8 +183,7 @@ test-suite test-sugar
183183
, text
184184
, transformers
185185

186-
test-suite test-passthru-ascii
187-
type: exitcode-stdio-1.0
186+
executable test-passthru-ascii
188187
hs-source-dirs: examples/example1
189188
default-language: Haskell2010
190189
GHC-options: -fhide-source-paths

0 commit comments

Comments
 (0)