Skip to content

Commit aea9683

Browse files
committed
Add heartbleed legacy build to CI quality check
Unlike the automotive demo's legacy component, the heartbleed demo's legacy component had not been added to the Nix flake and the corresponding CI .yml file, meaning that regressions in the ability to build the software were not being caught. Add this so that future breakages to the demo will also cause CI errors. Signed-off-by: Alex Jones <alex.jones@lowrisc.org>
1 parent 0f93819 commit aea9683

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ jobs:
4040
nix build -L .?submodules=1#sonata-exercises
4141
nix build -L .?submodules=1#sonata-examples
4242
nix build -L .?submodules=1#sonata-automotive-demo-legacy-component
43+
nix build -L .?submodules=1#sonata-heartbleed-demo-legacy-component
4344
nix build -L .?submodules=1#sonata-tests
4445
4546
- name: Run Nix Checks

flake.nix

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,21 @@
6060
dontFixup = true;
6161
};
6262

63+
sonata-heartbleed-demo-legacy-component = pkgs.stdenvNoCC.mkDerivation {
64+
name = "sonata-heartbleed-demo-legacy-component";
65+
src = fileset.toSource {
66+
root = ./.;
67+
fileset = fileset.unions [./examples/heartbleed ./common.lua ./third_party];
68+
};
69+
buildInputs = [pkgs.srecord] ++ (with lrPkgs; [xmake lowrisc-toolchain-gcc-rv32imcb uf2conv]);
70+
buildPhase = "xmake -P ./examples/heartbleed/legacy/";
71+
installPhase = ''
72+
mkdir -p $out/share/
73+
cp build/ilp32/rv32imc/release/heartbleed_demo_legacy $out/share
74+
'';
75+
dontFixup = true;
76+
};
77+
6378
sonata-software-documentation = lrDoc.buildMdbookSite {
6479
version = "";
6580
pname = "sonata-software-documentation";
@@ -204,6 +219,7 @@
204219
sonata-tests
205220
sonata-software-documentation
206221
sonata-automotive-demo-legacy-component
222+
sonata-heartbleed-demo-legacy-component
207223
;
208224
};
209225
checks = {inherit tests-simulator;};

0 commit comments

Comments
 (0)