Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,38 @@ jobs:
# run: |
# make ghcup-build

# The same builds on macOS (Apple Silicon) and Linux on ARM. These do not
# deploy, so a failure here does not hold back the site. (Intel macOS is
# left out: nixpkgs has dropped x86_64-darwin.)
build-other:
strategy:
fail-fast: false
matrix:
os: [ macos-latest, ubuntu-24.04-arm ]
runs-on: ${{ matrix.os }}
timeout-minutes: 240

steps:
- uses: actions/checkout@v6

- uses: cachix/install-nix-action@v31
with:
github_access_token: ${{ secrets.GITHUB_TOKEN }}

- name: Install cachix
uses: cachix/cachix-action@v17
with:
name: haskell-miso-cachix

- name: Build WASM using Nix
run: nix develop .#wasm --command bash -c "make"

- name: Build MicroHs using Nix
run: nix develop .#mhs --command bash -c "make mhs"

- name: Build JS using Nix
run: nix develop .#ghcjs --command bash -c "make js"

deploy:
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
Expand Down
23 changes: 16 additions & 7 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,22 @@
};

outputs = inputs:
inputs.miso.inputs.flake-utils.lib.eachDefaultSystem (system: {
devShell = inputs.miso.outputs.devShells.${system}.default;
devShells.hls = inputs.miso.outputs.devShells.${system}.hls;
devShells.wasm = inputs.miso.outputs.devShells.${system}.wasm;
devShells.ghcjs = inputs.miso.outputs.devShells.${system}.ghcjs;
devShells.mhs = inputs.miso.outputs.devShells.${system}.mhs;
});
inputs.miso.inputs.flake-utils.lib.eachDefaultSystem (system:
let
pkgs = inputs.miso.inputs.nixpkgs.legacyPackages.${system};
in {
devShell = inputs.miso.outputs.devShells.${system}.default;
devShells.hls = inputs.miso.outputs.devShells.${system}.hls;
devShells.wasm = inputs.miso.outputs.devShells.${system}.wasm;
# miso's, with hsc2hs: cabal needs it to build time (and other
# packages with .hsc files) for the JS backend. GitHub's
# ubuntu-latest image has one from GHCup on the PATH, macOS and
# Linux on ARM do not.
devShells.ghcjs = inputs.miso.outputs.devShells.${system}.ghcjs.overrideAttrs (old: {
nativeBuildInputs = (old.nativeBuildInputs or [ ]) ++ [ pkgs.haskellPackages.hsc2hs ];
});
devShells.mhs = inputs.miso.outputs.devShells.${system}.mhs;
});

}

Loading