on master help sign in
Fix profiling CI and speed up eval via sharing
commitce4d08afca67912847676922a229f4abb5822d2a authorJohn Ericson <John.Ericson@Obsidian.Systems> dateWed 9 Oct 2019, 14:53 (7 years ago) parent2880f6f
2 files changed+14−10
default.nix+10−9 release.nix+4−1
default.nix+10−9
@@ -222,7 +222,7 @@ in rec {
222222 pkgs.runCommand "serverExe" {} ''
223223 mkdir $out
224224 set -eux
225− ln -s "${haskellLib.justStaticExecutables backend}"/bin/* $out/
225+ ln -s "${if profiling then backend else haskellLib.justStaticExecutables backend}"/bin/* $out/
226226 ln -s "${mkAssets assets}" $out/static.assets
227227 ln -s ${mkAssets (compressedJs frontend optimizationLevel)} $out/frontend.jsexe.assets
228228 echo ${version} > $out/version
@@ -320,18 +320,19 @@ in rec {
320320 passthru = { inherit android ios packages overrides tools shellToolOverrides withHoogle staticFiles staticFilesImpure __closureCompilerOptimizationLevel processedStatic __iosWithConfig __androidWithConfig; };
321321 };
322322 in mkProject (projectDefinition args));
323− serverOn = sys: version: serverExe
324− (projectOut sys).ghc.backend
325− (projectOut system).ghcjs.frontend
326− (projectOut sys).passthru.staticFiles
327− (projectOut sys).passthru.__closureCompilerOptimizationLevel
323+ mainProjectOut = projectOut system;
324+ serverOn = projectInst: version: serverExe
325+ projectInst.ghc.backend
326+ mainProjectOut.ghcjs.frontend
327+ projectInst.passthru.staticFiles
328+ projectInst.passthru.__closureCompilerOptimizationLevel
328329 version;
329− linuxExe = serverOn "x86_64-linux";
330+ linuxExe = serverOn (projectOut "x86_64-linux");
330331 dummyVersion = "Version number is only available for deployments";
331− in projectOut system // {
332+ in mainProjectOut // {
332333 linuxExeConfigurable = linuxExe;
333334 linuxExe = linuxExe dummyVersion;
334− exe = serverOn system dummyVersion;
335+ exe = serverOn mainProjectOut dummyVersion;
335336 server = args@{ hostName, adminEmail, routeHost, enableHttps, version }:
336337 server (args // { exe = linuxExe version; });
337338 obelisk = import (base + "/.obelisk/impl") {};
release.nix+4−1
@@ -8,7 +8,10 @@
88let
99 inherit (local-self.nixpkgs) lib runCommand nix;
1010
11− cacheBuildSystems = [ "x86_64-linux" "x86_64-darwin" ];
11+ cacheBuildSystems = [
12+ "x86_64-linux"
13+ "x86_64-darwin"
14+ ];
1215
1316 obeliskPackagesCommon = [
1417 "obelisk-frontend"