mirror of
https://github.com/stackbuilders/hapistrano.git
synced 2024-08-17 03:40:36 +03:00
Run build on ghc8107
This commit is contained in:
parent
81c99d15d3
commit
8698aebc12
24
.github/workflows/build.yml
vendored
24
.github/workflows/build.yml
vendored
@ -1,8 +1,3 @@
|
||||
# The present workflow was made based on the following references:
|
||||
# - https://github.com/actions/cache/blob/main/examples.md#haskell---cabal
|
||||
# - https://github.com/haskell/time/blob/master/.github/workflows/ci.yml
|
||||
# - https://github.com/stackbuilders/stache/blob/master/.github/workflows/ci.yaml
|
||||
# - https://markkarpov.com/post/github-actions-for-haskell-ci.html
|
||||
---
|
||||
name: Build
|
||||
|
||||
@ -15,31 +10,24 @@ concurrency:
|
||||
jobs:
|
||||
haskell:
|
||||
strategy:
|
||||
fail-fast: true
|
||||
matrix:
|
||||
os:
|
||||
- macos-13 # x86_64-darwin
|
||||
# - macos-latest # aarch64-darwin
|
||||
# - ubuntu-latest # x86_64-linux
|
||||
installable:
|
||||
# - test-ghc8107
|
||||
- test-ghc902 # TODO: Rename package to test-ghc924
|
||||
# exclude:
|
||||
# - os: ubuntu-latest
|
||||
# installable: test-ghc902
|
||||
- macos-latest # aarch64-darwin
|
||||
- ubuntu-latest # x86_64-linux
|
||||
fail-fast: true
|
||||
runs-on: ${{ matrix.os }}
|
||||
timeout-minutes: 10
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: DeterminateSystems/nix-installer-action@v12
|
||||
with:
|
||||
extra-conf:
|
||||
accept-flake-config = true
|
||||
extra-conf: accept-flake-config = true
|
||||
- uses: DeterminateSystems/magic-nix-cache-action@v7
|
||||
- name: Compile code
|
||||
run: nix build .#${{ matrix.installable }}
|
||||
run: nix build .#test
|
||||
- name: Run tests
|
||||
run: nix run .#${{ matrix.installable }}
|
||||
run: nix run .#test
|
||||
|
||||
docker:
|
||||
if: false
|
||||
|
72
flake.nix
72
flake.nix
@ -6,7 +6,7 @@
|
||||
};
|
||||
|
||||
nixConfig = {
|
||||
allow-import-from-derivation = true;
|
||||
allow-import-from-derivation = "true";
|
||||
extra-substituters = [ "https://cache.iog.io" ];
|
||||
extra-trusted-public-keys = [ "hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ=" ];
|
||||
};
|
||||
@ -20,59 +20,41 @@
|
||||
inherit (haskellNix) config;
|
||||
overlays = [
|
||||
haskellNix.overlay
|
||||
(final: prev:
|
||||
let
|
||||
mkCabalProject = compiler-nix-name: final.haskell-nix.cabalProject' {
|
||||
inherit compiler-nix-name;
|
||||
src = final.haskell-nix.haskellLib.cleanGit {
|
||||
name = "hapistrano";
|
||||
src = ./.;
|
||||
};
|
||||
(final: prev: {
|
||||
hapistrano = final.haskell-nix.cabalProject' {
|
||||
src = final.haskell-nix.haskellLib.cleanGit {
|
||||
name = "hapistrano";
|
||||
src = ./.;
|
||||
};
|
||||
in
|
||||
{
|
||||
hapistrano-ghc8107 = mkCabalProject "ghc8107";
|
||||
hapistrano-ghc902 = mkCabalProject "ghc924";
|
||||
})
|
||||
compiler-nix-name = "ghc8107";
|
||||
};
|
||||
})
|
||||
];
|
||||
};
|
||||
flake-ghc8107 = pkgs.hapistrano-ghc8107.flake { };
|
||||
flake-ghc902 = pkgs.hapistrano-ghc902.flake { };
|
||||
overrideTestPackage = flake: flake.packages."hapistrano:test:test".overrideAttrs (_: {
|
||||
postFixup = ''
|
||||
wrapProgram $out/bin/test \
|
||||
--set PATH ${pkgs.lib.makeBinPath [
|
||||
pkgs.bash
|
||||
pkgs.coreutils
|
||||
pkgs.findutils
|
||||
pkgs.git
|
||||
pkgs.zsh
|
||||
]}
|
||||
'';
|
||||
});
|
||||
flake = pkgs.hapistrano.flake { };
|
||||
in
|
||||
rec {
|
||||
flake // rec {
|
||||
apps = {
|
||||
test-ghc8107 = {
|
||||
test = {
|
||||
type = "app";
|
||||
program = "${packages.test-ghc8107}/bin/test";
|
||||
};
|
||||
test-ghc902 = {
|
||||
type = "app";
|
||||
program = "${packages.test-ghc902}/bin/test";
|
||||
program = "${packages.test}/bin/test";
|
||||
};
|
||||
};
|
||||
devShells = {
|
||||
default = devShells.ghc902;
|
||||
ghc8107 = flake-ghc8107.devShells.default;
|
||||
ghc902 = flake-ghc902.devShells.default;
|
||||
};
|
||||
legacyPackages = pkgs;
|
||||
packages = {
|
||||
default = packages.hap-ghc902;
|
||||
hap-ghc8107 = flake-ghc8107.packages."hapistrano:exe:hap";
|
||||
hap-ghc902 = flake-ghc902.packages."hapistrano:exe:hap";
|
||||
test-ghc8107 = overrideTestPackage flake-ghc8107;
|
||||
test-ghc902 = overrideTestPackage flake-ghc902;
|
||||
default = flake.packages."hapistrano:exe:hap";
|
||||
test = flake.packages."hapistrano:test:test".overrideAttrs (_: {
|
||||
postFixup = ''
|
||||
wrapProgram $out/bin/test \
|
||||
--set PATH ${pkgs.lib.makeBinPath [
|
||||
pkgs.bash
|
||||
pkgs.coreutils
|
||||
pkgs.findutils
|
||||
pkgs.git
|
||||
pkgs.zsh
|
||||
]}
|
||||
'';
|
||||
});
|
||||
};
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user