Skip to content

Commit

Permalink
Add more CI build targets (#771)
Browse files Browse the repository at this point in the history
- Adds more CI jobs
  • Loading branch information
dmjio authored Feb 20, 2025
1 parent 48ea6fb commit 2b30ef1
Show file tree
Hide file tree
Showing 8 changed files with 54 additions and 255 deletions.
27 changes: 25 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,31 @@ jobs:
signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}'
- name: Dependency install
run: nix-build -A pkgs.yarn default.nix && nix-env -i ./result
- name: Miso build
run: nix-build -j1

- name: (JS) Miso GHCJS
run: nix-build -A miso-ghcjs

- name: (x86) Miso GHC
run: nix-build -A miso-ghc

- name: (x86) Haskell-miso.org server
run: nix-build -A haskell-miso-server

- name: (JS) Haskell-miso.org client
run: nix-build -A haskell-miso-client

- name: (JS) Miso examples
run: nix-build -A miso-examples

- name: (x86) Miso examples
run: nix-build -A miso-examples-ghc

- name: (JS) Miso sample app
run: nix-build -A sample-app

- name: (x86) Miso sample app jsaddle
run: nix-build -A sample-app-jsaddle

- name: Diffing tests
run: cd tests && yarn && yarn test

Expand Down
5 changes: 4 additions & 1 deletion default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,10 @@ in
inherit release release-examples;

#website
inherit (pkgs) haskell-miso;
inherit (pkgs)
haskell-miso-client
haskell-miso-server
haskell-miso-runner;

#ci
deploy = pkgs.deploy rev;
Expand Down
7 changes: 1 addition & 6 deletions haskell-miso.org/client/shell.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,2 @@
with (import ../../default.nix {});
let
inherit (pkgs.haskell.packages) ghcjs86;
src = import ../../nix/haskell/packages/source.nix pkgs;
client = ghcjs86.callCabal2nix "haskell-miso" (src.haskell-miso-src) {};
in
client.env
haskell-miso-client.env
22 changes: 13 additions & 9 deletions haskell-miso.org/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,16 @@ let
client = ghcjs86.callCabal2nix "haskell-miso" (src.haskell-miso-src) {};
server = ghc865.callCabal2nix "haskell-miso" (src.haskell-miso-src) {};
in
runCommand "haskell-miso.org" { inherit client server; } ''
mkdir -p $out/{bin,static}
cp ${server}/bin/* $out/bin
${closurecompiler}/bin/closure-compiler --compilation_level ADVANCED_OPTIMIZATIONS \
--jscomp_off=checkVars \
--externs=${client}/bin/client.jsexe/all.js.externs \
${client}/bin/client.jsexe/all.js > temp.js
mv temp.js $out/static/all.js
''
{ haskell-miso-client = client;
haskell-miso-server = server;
haskell-miso-runner =
runCommand "haskell-miso.org" { inherit client server; } ''
mkdir -p $out/{bin,static}
cp ${server}/bin/* $out/bin
${closurecompiler}/bin/closure-compiler --compilation_level ADVANCED_OPTIMIZATIONS \
--jscomp_off=checkVars \
--externs=${client}/bin/client.jsexe/all.js.externs \
${client}/bin/client.jsexe/all.js > temp.js
mv temp.js $out/static/all.js
'';
}
227 changes: 0 additions & 227 deletions haskell-miso.org/nix/aws.nix

This file was deleted.

5 changes: 4 additions & 1 deletion haskell-miso.org/nix/module.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ in {
options.services.haskell-miso.enable = lib.mkEnableOption "Enable the haskell-miso.org service";
config = lib.mkIf cfg.enable {
systemd.services.haskell-miso = {
path = with pkgs; [ haskell-miso bash ];
path = with pkgs;
[ misoPkgs.haskell-miso-runner
bash
];
wantedBy = [ "multi-user.target" ];
script = ''
./bin/server +RTS -N -A4M -RTS
Expand Down
7 changes: 1 addition & 6 deletions haskell-miso.org/server/shell.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,2 @@
with (import ../../default.nix {});
let
inherit (pkgs.haskell.packages) ghc865;
src = import ../../nix/haskell/packages/source.nix pkgs;
server = ghc865.callCabal2nix "haskell-miso" (src.haskell-miso-src) {};
in
server.env
haskell-miso-server.env
9 changes: 6 additions & 3 deletions nix/overlay.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,11 @@ options: self: super: {
sample-app-jsaddle =
(import ../sample-app-jsaddle self).release;

haskell-miso =
import ../haskell-miso.org {};
inherit (import ../haskell-miso.org {})
haskell-miso-client
haskell-miso-server
haskell-miso-runner;

haskell = super.haskell // {
packages = super.haskell.packages // {
ghc865 = super.haskell.packages.ghc865.override {
Expand Down Expand Up @@ -42,7 +45,7 @@ options: self: super: {
nixops import < deploy.json
rm deploy.json
nixops set-args --argstr email $EMAIL -d haskell-miso
nixops modify haskell-miso.org/nix/aws.nix -d haskell-miso \
nixops modify haskell-miso.org/nix/server.nix -d haskell-miso \
-Inixpkgs=https://github.com/nixos/nixpkgs/archive/6d1a044fc9ff3cc96fca5fa3ba9c158522bbf2a5.tar.gz
nix --version
# https://github.com/NixOS/nixops/issues/1557
Expand Down

0 comments on commit 2b30ef1

Please sign in to comment.