@@ -0,0 +1,13 @@
|
||||
name: build
|
||||
on: [push]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: nixos
|
||||
steps:
|
||||
- name: Check out repository code
|
||||
uses: actions/checkout@v4
|
||||
- name: build gyehoek
|
||||
run: nix build -L .#gyehoek
|
||||
- name: test gyehoek
|
||||
run: nix flake check -L
|
||||
@@ -22,6 +22,16 @@
|
||||
gyehoek = final.haskell-nix.project' {
|
||||
src = ./.;
|
||||
compiler-nix-name = "ghc912";
|
||||
modules = [({ pkgs, lib, ...}: {
|
||||
packages.gyehoek.components.tests.test.preCheck =
|
||||
let bin = [pkgs.wasmtime pkgs.git];
|
||||
in ''
|
||||
# Wasmtime requires a cache in $HOME. This is less
|
||||
# painful than reconfiguring the cache location.
|
||||
export HOME=$(mktemp -d)
|
||||
export PATH=${lib.makeBinPath bin}:$PATH
|
||||
'';
|
||||
})];
|
||||
shell = {
|
||||
withHoogle = true;
|
||||
inputsFrom = [];
|
||||
@@ -32,7 +42,6 @@
|
||||
buildInputs = with final; [
|
||||
haskellPackages.cabal-fmt
|
||||
self.packages.${final.stdenv.hostPlatform.system}.shake
|
||||
final.haskellPackages.shelltestrunner
|
||||
final.wabt
|
||||
final.nodejs
|
||||
final.wasmtime
|
||||
@@ -66,14 +75,18 @@
|
||||
_pkgs = each-system ({ pkgs, ... }: pkgs);
|
||||
_hf = hf;
|
||||
|
||||
packages = each-system ({ pkgs, system, ... }:
|
||||
hf.packages.${system} // {
|
||||
default = hf.packages.${system}."gyehoek:exe:gyehoek";
|
||||
packages = each-system ({ pkgs, lib, system, ... }:
|
||||
hf.packages.${system} // lib.fix (packages: {
|
||||
gyehoek = hf.packages.${system}."gyehoek:exe:gyehoek";
|
||||
default = packages.gyehoek;
|
||||
shake = pkgs.callPackage ./shake-wrapper.nix {};
|
||||
});
|
||||
}));
|
||||
|
||||
devShells = each-system
|
||||
({ pkgs, system, ... }: hf.devShells.${system});
|
||||
|
||||
checks = each-system
|
||||
({ pkgs, system, ... }: hf.checks.${system});
|
||||
};
|
||||
|
||||
nixConfig = {
|
||||
|
||||
Reference in New Issue
Block a user