Skip to content

Commit

Permalink
CI: fix Nix build of StarMalloc
Browse files Browse the repository at this point in the history
  • Loading branch information
Antonin Reitz committed Oct 10, 2023
1 parent cf14e39 commit c84db8a
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 3 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/nix.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Nix

on:
push:
branches-ignore: [ '_**' ]
pull_request:
workflow_dispatch:

jobs:
nix:
runs-on: self-hosted
steps:
- name: checkout
uses: actions/checkout@v4
- name: build StarMalloc
run: |
nix build -L .#starmalloc
- name: build StarMalloc logs
run: |
nix log .#starmalloc
#- name: bench StarMalloc
# run: |
# nix build -L .#bench
#- name: bench StarMalloc logs
# run: |
# nix log .#bench
9 changes: 6 additions & 3 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,15 @@
fstar = fstar-src.packages.${system}.fstar;
steel = steel-src.packages.${system}.steel;
karamel = krml-src.packages.${system}.karamel.home;
steel-experiments = pkgs.stdenv.mkDerivation {
starmalloc = pkgs.stdenv.mkDerivation {
name = "steel-experiments";
src = ./.;
enableParallelBuilding = true;
buildInputs = [ fstar steel karamel pkgs.removeReferencesTo ];
FSTAR_HOME = fstar;
STEEL_HOME = steel;
KRML_HOME = karamel;
installPhase = "mkdir $out && cp -r dist bench/starmalloc.so $out";
installPhase = "mkdir $out && cp -r dist out/*.so $out";
buildFlags = [ "lib" "hardened_lib" ];
postInstall = ''
find dist -type f -name "*" -exec remove-references-to -t ${karamel} {} \;
Expand All @@ -50,7 +50,10 @@
};
in
{
packages.${system} = { inherit steel-experiments; default=steel-experiments; };
packages.${system} = {
inherit starmalloc;
default=starmalloc;
};
#checks.${system} = {
# inherit steel-experiments;
#};
Expand Down

0 comments on commit c84db8a

Please sign in to comment.