Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 604f40e

Browse files
authored
Add CI, nix, incorporate GHC updates (#23)
* Add CI, nix build, pin nixpkgs. In lieu of the dap updates, and ghc-whole-program-compiler project updates (to GHC-9.6.6+), we should now be able to test the haskell-debugger with our new dap changes. This is the second PR in a set to upgrade and abstract some facilities for preparing a dap release. - Put project under CI (for both cabal and nix) - Introduce a nixpkgs infra w/ pinning - Add builds for the souffle static analysis C++ code (will make avaialble during runtime) * Prefix with pkgs * Try a different nix installer * Add Github status badge * Use updated souffle code, bump hash, change remote. - Also add some additional linking flags - Remove -D_OPENMP (already done via -fopenmp) * Bump dap to loosen dep. bounds, update digest. * zstd.dev * Shuffle * Add digest flag * Try w/ cabal build inside of nix-shell. * Comment out cabal build for now
1 parent 90146ef commit 604f40e

File tree

7 files changed

+221
-18
lines changed

7 files changed

+221
-18
lines changed

‎.github/workflows/main.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Haskell Debugger CI
2+
on:
3+
push:
4+
branches:
5+
- master
6+
pull_request:
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
if: github.ref != 'refs/heads/master'
12+
steps:
13+
- uses: DeterminateSystems/nix-installer-action@main
14+
- uses: actions/checkout@v3.5.3
15+
- uses: cachix/install-nix-action@v25
16+
with:
17+
nix_path: nixpkgs=channel:nixpkgs-unstable
18+
19+
- name: Nix channel update
20+
run: nix-channel --update
21+
22+
- name: Cabal install
23+
run: nix-env -iA pkgs.cabal-install -f .
24+
25+
- name: Cabal update
26+
run: cabal update
27+
28+
- name: (x86 - C++) Build ext-stg-gc (souffle-produced reachability analysis for GC)
29+
run: nix-build -A ext-stg-gc
30+
31+
- name: (x86 - GHC 9.6.6) Build dap-estgi-server w/ nix
32+
run: nix-build -A dap-estgi-server
33+
34+
# - name: (x86 - GHC 9.6.6) Build dap-estgi-server w/ cabal
35+
# run: nix-shell -p pkgs.ghc -p pkgs.bzip2.dev -p pkgs.zlib.dev --run 'cabal build dap-estgi-server' -I=.

‎README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
# Haskell ESTGi Debugger
1+
# Haskell ESTGi Debugger ![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/haskell-debugger/haskell-estgi-debugger/main.yml?style=flat-square)
2+
23

34
# Table of Contents
45
1. [Introduction](#introduction)

‎cabal.project

Lines changed: 25 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,42 @@
1-
packages: dap-estgi-server
1+
packages:
2+
dap-estgi-server
23

34
source-repository-package
4-
type: git
5-
location: https://github.com/TeofilC/digest
6-
tag: ac9616b94cb8c4a9e07188d19979a6225ebd5a10
5+
type: git
6+
location: https://github.com/david-christiansen/final-pretty-printer
7+
tag: 048e8fa2d8b2b7a6f9e4e209db4f67361321eec8
78

89
source-repository-package
9-
type: git
10-
location: https://github.com/haskell-debugger/dap
11-
tag: 3784cc0e703cbe300d4e4874328b8b8dd998ea5f
10+
type: git
11+
location: https://github.com/luc-tielen/souffle-haskell
12+
tag: 268a11283ca9293b5eacabf7a0b79d9368232478
13+
14+
source-repository-package
15+
type: git
16+
location: https://github.com/TeofilC/digest
17+
tag: 27ffb6396ef322c5185bc919cae563ac449ba235
18+
19+
source-repository-package
20+
type: git
21+
location: https://github.com/haskell-debugger/dap
22+
tag: 99543ed
1223

1324
source-repository-package
1425
type: git
15-
location: https://github.com/grin-compiler/ghc-whole-program-compiler-project
16-
tag: 80e408ebdeaf5c1cea72bfbf86823c32d4fdafbe
26+
location: https://github.com/haskell-debugger/ghc-whole-program-compiler-project
27+
tag: d058105b0bee1ab2e7c7aefd36bf9e0be6e840b7
1728
subdir:
1829
external-stg
1930
external-stg-syntax
2031
external-stg-interpreter
2132

22-
source-repository-package
23-
type: git
24-
location: https://github.com/luc-tielen/souffle-haskell
25-
tag: f8c9fc45eed709110af3d3301393f63f4535c71e
33+
package external-stg-interpreter
34+
flags: +external-ext-stg-gc
2635

27-
constraints:
28-
type-errors-pretty == 0.0.1.2,
29-
souffle-haskell == 3.4.0
36+
package external-stg-compiler
37+
flags: +external-ext-stg-liveness
3038

3139
package digest
3240
flags: -pkg-config
3341

34-
allow-newer: type-errors-pretty:base
42+
allow-newer: type-errors-pretty:base

‎default.nix

Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
with (builtins.fromJSON (builtins.readFile ./nixpkgs.json));
2+
3+
{ nixpkgs ? builtins.fetchTarball {
4+
url = "https://github.com/NixOS/nixpkgs/archive/${rev}.tar.gz";
5+
inherit sha256;
6+
}
7+
}:
8+
9+
let
10+
# all the nix things
11+
pkgs = import nixpkgs {};
12+
sources = builtins.fromJSON (builtins.readFile ./source.json);
13+
14+
ghc-wpo-src =
15+
pkgs.fetchFromGitHub sources.ghc-whole-program-compiler-project;
16+
17+
# this is the reachability analysis binary (cretaed by souffle) that runs
18+
# the mark n' sweep GC pass. This is call by the external-stg-intepreter.
19+
ext-stg-gc =
20+
pkgs.stdenv.mkDerivation {
21+
name = "ext-stg-gc";
22+
src = "${ghc-wpo-src}/external-stg-interpreter";
23+
buildInputs = with pkgs; [ souffle openmpi ];
24+
buildPhase = ''
25+
mkdir -pv $out/bin
26+
g++ -fopenmp $src/datalog/ext-stg-gc.cpp \
27+
-Wl,-u,__factory_Sf_ext_stg_gc_instance \
28+
-std=c++17 \
29+
-o $out/bin/ext-stg-gc
30+
'';
31+
};
32+
33+
overrides = self: super: with pkgs.haskell.lib; {
34+
35+
type-errors-pretty = dontCheck (
36+
doJailbreak (
37+
self.callCabal2nix
38+
"type-errors-pretty"
39+
(pkgs.fetchFromGitHub sources.type-errors-pretty)
40+
{}
41+
)
42+
);
43+
44+
digest =
45+
self.callCabal2nix
46+
"digest"
47+
(pkgs.fetchFromGitHub sources.digest)
48+
{};
49+
50+
final-pretty-printer = doJailbreak (
51+
self.callCabal2nix
52+
"final-pretty-printer"
53+
(pkgs.fetchFromGitHub sources.final-pretty-printer)
54+
{}
55+
);
56+
57+
dap = doJailbreak (
58+
self.callCabal2nix
59+
"dap"
60+
(pkgs.fetchFromGitHub sources.dap)
61+
{}
62+
);
63+
64+
dap-estgi-server =
65+
self.callCabal2nix
66+
"dap-estgi-server"
67+
./dap-estgi-server
68+
{};
69+
70+
external-stg =
71+
self.callCabal2nix
72+
"external-stg"
73+
"${ghc-wpo-src}/external-stg"
74+
{};
75+
76+
external-stg-syntax =
77+
self.callCabal2nix
78+
"external-stg-syntax"
79+
"${ghc-wpo-src}/external-stg-syntax"
80+
{};
81+
82+
external-stg-interpreter =
83+
self.callCabal2nixWithOptions
84+
"external-stg-interpreter"
85+
"${ghc-wpo-src}/external-stg-interpreter"
86+
"-fexternal-ext-stg-gc"
87+
{};
88+
89+
souffle-haskell =
90+
dontCheck
91+
(doJailbreak
92+
(self.callCabal2nix "souffle-haskell"
93+
(pkgs.fetchFromGitHub sources.souffle-haskell) {}
94+
));
95+
};
96+
97+
hPkgs =
98+
pkgs.haskellPackages.override { inherit overrides; };
99+
100+
in
101+
102+
# this is the set we export for CI, and for shell.nix
103+
{
104+
inherit (hPkgs) dap-estgi-server;
105+
inherit ext-stg-gc;
106+
inherit pkgs;
107+
}

‎nixpkgs.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"rev" : "88e992074d86",
3+
"sha256" : "sha256:1k5iv13faiyar5bsfw5klaz898662kcfyn85w5jrl2qkavf6y0y7"
4+
}

‎shell.nix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
(import ./default.nix {}).dap-estgi-server.env

‎source.json

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
{
2+
"dap": {
3+
"fetchSubmodules": true,
4+
"leaveDotGit": false,
5+
"owner": "haskell-debugger",
6+
"repo": "dap",
7+
"rev": "56d44d27c0cc509fc3e8198de448dbb2e9a6380f",
8+
"sha256": "sha256-/FKfSyYJuzXqyBu/yFTlVBQYJ4SXgLGDzQ5xAdXajCE="
9+
},
10+
"digest": {
11+
"fetchSubmodules": true,
12+
"leaveDotGit": false,
13+
"owner": "TeofilC",
14+
"repo": "digest",
15+
"rev": "ac9616b94cb8c4a9e07188d19979a6225ebd5a10",
16+
"sha256": "sha256-2n2SV4GYAwd09QfWynlxgeCrsj49UI3He6X66ynqfSA="
17+
},
18+
"final-pretty-printer": {
19+
"fetchSubmodules": true,
20+
"leaveDotGit": false,
21+
"owner": "david-christiansen",
22+
"repo": "final-pretty-printer",
23+
"rev": "048e8fa2d8b2b7a6f9e4e209db4f67361321eec8",
24+
"sha256": "0d5ya1n85qgs59p2wlx501qa1nrlk7y20riydfknfqkr0fswcpnf"
25+
},
26+
"ghc-whole-program-compiler-project": {
27+
"fetchSubmodules": true,
28+
"leaveDotGit": false,
29+
"owner": "haskell-debugger",
30+
"repo": "ghc-whole-program-compiler-project",
31+
"rev": "65ecaed",
32+
"sha256": "sha256-T9dUWUrGeva8ghwQ5Pu1paBbBgyjoTp3SQreHs94WRQ="
33+
},
34+
"souffle-haskell" : {
35+
"owner" : "luc-tielen",
36+
"repo" : "souffle-haskell",
37+
"rev" : "268a11283ca9293b5eacabf7a0b79d9368232478",
38+
"hash" : "sha256-n8qqNmrDNxLlM7FRfa1Da58jGCNWjBp9+B/yV3U98gg="
39+
},
40+
"type-errors-pretty": {
41+
"fetchSubmodules": false,
42+
"owner": "kowainik",
43+
"repo": "type-errors-pretty",
44+
"rev": "c85d6d0a7bf2278ddb03abddb5782a5b6095d343",
45+
"sha256": "1yylw5c8ffzybcv7cm6ff0k88an4iz0fhc59md09s9zlns03f3d0"
46+
}
47+
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /