mirror of
https://github.com/stackbuilders/hapistrano.git
synced 2024-12-23 11:32:09 +03:00
Expose minimal flake and use matrix on build code
This commit is contained in:
parent
b87f959b89
commit
dca8e4fb1c
16
.github/workflows/build.yml
vendored
16
.github/workflows/build.yml
vendored
@ -15,6 +15,9 @@ jobs:
|
||||
- macos-13 # x86_64-darwin
|
||||
- macos-latest # aarch64-darwin
|
||||
- ubuntu-latest # x86_64-linux
|
||||
ghc:
|
||||
- ghc8107
|
||||
- ghc902
|
||||
fail-fast: true
|
||||
runs-on: ${{ matrix.os }}
|
||||
timeout-minutes: 15
|
||||
@ -24,15 +27,10 @@ jobs:
|
||||
with:
|
||||
extra-conf: accept-flake-config = true
|
||||
- uses: DeterminateSystems/magic-nix-cache-action@v7
|
||||
# TODO: improve with matrix
|
||||
- name: Compile code ghc8107
|
||||
run: nix build .#test-ghc8107
|
||||
- name: Run tests ghc8107
|
||||
run: nix run .#test-ghc8107
|
||||
- name: Compile code ghc902
|
||||
run: nix build .#test-ghc902
|
||||
- name: Run tests ghc902
|
||||
run: nix run .#test-ghc902
|
||||
- name: Compile code ${{ matrix.ghc }}
|
||||
run: nix build .#test-${{ matrix.ghc }}
|
||||
- name: Run tests ${{ matrix.ghc }}
|
||||
run: nix run .#test-${{ matrix.ghc }}
|
||||
|
||||
docker:
|
||||
uses: ./.github/workflows/reusable-docker.yml
|
||||
|
@ -46,8 +46,7 @@
|
||||
};
|
||||
flake-ghc8107 = pkgs.hapistrano-ghc8107.flake { };
|
||||
flake-ghc902 = pkgs.hapistrano-ghc902.flake { };
|
||||
in
|
||||
flake-ghc8107 // flake-ghc902 // rec {
|
||||
in rec {
|
||||
apps = {
|
||||
test-ghc8107 = {
|
||||
type = "app";
|
||||
@ -58,7 +57,6 @@
|
||||
program = "${packages.test-ghc902}/bin/test";
|
||||
};
|
||||
};
|
||||
legacyPackages = pkgs;
|
||||
packages = {
|
||||
default = flake-ghc8107.packages."hapistrano:exe:hap";
|
||||
test-ghc8107 = flake-ghc8107.packages."hapistrano:test:test".overrideAttrs (_: {
|
||||
@ -86,5 +84,10 @@
|
||||
'';
|
||||
});
|
||||
};
|
||||
devShells = {
|
||||
default = devShells.ghc902;
|
||||
ghc8107 = flake-ghc8107.devShells.default;
|
||||
ghc902 = flake-ghc902.devShells.default;
|
||||
};
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user