@@ -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' {
|
gyehoek = final.haskell-nix.project' {
|
||||||
src = ./.;
|
src = ./.;
|
||||||
compiler-nix-name = "ghc912";
|
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 = {
|
shell = {
|
||||||
withHoogle = true;
|
withHoogle = true;
|
||||||
inputsFrom = [];
|
inputsFrom = [];
|
||||||
@@ -32,7 +42,6 @@
|
|||||||
buildInputs = with final; [
|
buildInputs = with final; [
|
||||||
haskellPackages.cabal-fmt
|
haskellPackages.cabal-fmt
|
||||||
self.packages.${final.stdenv.hostPlatform.system}.shake
|
self.packages.${final.stdenv.hostPlatform.system}.shake
|
||||||
final.haskellPackages.shelltestrunner
|
|
||||||
final.wabt
|
final.wabt
|
||||||
final.nodejs
|
final.nodejs
|
||||||
final.wasmtime
|
final.wasmtime
|
||||||
@@ -66,14 +75,18 @@
|
|||||||
_pkgs = each-system ({ pkgs, ... }: pkgs);
|
_pkgs = each-system ({ pkgs, ... }: pkgs);
|
||||||
_hf = hf;
|
_hf = hf;
|
||||||
|
|
||||||
packages = each-system ({ pkgs, system, ... }:
|
packages = each-system ({ pkgs, lib, system, ... }:
|
||||||
hf.packages.${system} // {
|
hf.packages.${system} // lib.fix (packages: {
|
||||||
default = hf.packages.${system}."gyehoek:exe:gyehoek";
|
gyehoek = hf.packages.${system}."gyehoek:exe:gyehoek";
|
||||||
|
default = packages.gyehoek;
|
||||||
shake = pkgs.callPackage ./shake-wrapper.nix {};
|
shake = pkgs.callPackage ./shake-wrapper.nix {};
|
||||||
});
|
}));
|
||||||
|
|
||||||
devShells = each-system
|
devShells = each-system
|
||||||
({ pkgs, system, ... }: hf.devShells.${system});
|
({ pkgs, system, ... }: hf.devShells.${system});
|
||||||
|
|
||||||
|
checks = each-system
|
||||||
|
({ pkgs, system, ... }: hf.checks.${system});
|
||||||
};
|
};
|
||||||
|
|
||||||
nixConfig = {
|
nixConfig = {
|
||||||
|
|||||||
Reference in New Issue
Block a user