Skip to content

Commit

Permalink
Added nix build of exercises
Browse files Browse the repository at this point in the history
  • Loading branch information
HU90m committed Aug 31, 2024
1 parent d9551b0 commit 1d31098
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ jobs:

- name: Build Software
run: |
nix build -L .?submodules=1#sonata-exercises
nix build -L .?submodules=1#sonata-examples
nix build -L .?submodules=1#sonata-tests
Expand Down
12 changes: 11 additions & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,16 @@
}
// commonSoftwareBuildAttributes);

sonata-exercises = pkgs.stdenvNoCC.mkDerivation ({
name = "sonata-exercises";
src = fileset.toSource {
root = ./.;
fileset = fileset.unions [./exercises ./common.lua ./cheriot-rtos];
};
buildPhase = "xmake -P ./exercises/";
}
// commonSoftwareBuildAttributes);

tests-runner =
pkgs.writers.writePython3Bin "tests-runner" {
libraries = [pkgs.python3Packages.pyserial];
Expand Down Expand Up @@ -176,7 +186,7 @@
SONATA_SIM_BOOT_STUB = "${sonataSystemPkgs.sonata-sim-boot-stub.out}/share/sim_boot_stub";
};
};
packages = {inherit sonata-examples sonata-tests sonata-software-documentation;};
packages = {inherit sonata-exercises sonata-examples sonata-tests sonata-software-documentation;};
checks = {inherit tests-simulator;};
apps = builtins.listToAttrs (map (program: {
inherit (program) name;
Expand Down

0 comments on commit 1d31098

Please sign in to comment.