Merge pull request #2500 from input-output-hk/github-ci
Create github workflow for tests
Create github workflow for tests
name: "Tests"
on:
pull_request:
jobs:
nix-instantiate:
strategy:
matrix:
os: [ubuntu-latest, macos-10.15]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/[email protected]
- uses: nixbuild/[email protected]
- run: nix-instantiate release.nix --arg supportedSystems '[ builtins.currentSystem ]' --restrict-eval -I . --allowed-uris 'https://github.com/NixOS/nixpkgs https://github.com/input-output-hk https://github.com/NixOS/nixpkgs-channels' --option trusted-public-keys "hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ= iohk.cachix.org-1:DpRUyj7h7V830dp/i6Nti+NEO2/nhblbov/8MW7Rqoo= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" --option substituters "https://hydra.iohk.io https://iohk.cachix.org https://cache.nixos.org/" --show-trace
nix-tests:
strategy:
matrix:
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/[email protected]
- uses: nixbuild/[email protected]
- run: nix-build -A tests --arg supportedSystems '[ builtins.currentSystem ]' --restrict-eval -I . --allowed-uris 'https://github.com/NixOS/nixpkgs https://github.com/input-output-hk https://github.com/NixOS/nixpkgs-channels' --option trusted-public-keys "hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ= iohk.cachix.org-1:DpRUyj7h7V830dp/i6Nti+NEO2/nhblbov/8MW7Rqoo= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" --option substituters "https://hydra.iohk.io https://iohk.cachix.org https://cache.nixos.org/"
Needs latest prettyprinter version.
https://github.com/input-output-hk/cardano-haskell/pull/38
In response to review feedback: https://github.com/input-output-hk/cardano-wallet/pull/2451#discussion_r561029734
Three changes that the hydra eval faster. In order of importance: 1) Split `native` jobs into `linux` and `darwin` Reduces the number of times hydra restarts the eval process because memory is running low. When both linux and darwin versions are in the same attribute the evaluation runs out of memory more often as it alternates between evaluating linux and darwin jobs. Grouping all the linux and darwin jobs together reduces the number of times the memory limit is reached. This is makes the "no change" eval more than 4x faster (270s vs 1300s). 2) Avoid duplicate `cabal configure` To get a list of package names in the project we call `cabalProject`, before using those names to provide the overrides for another call to `cabalProject`. `cabalProjectLocal` is not the same for the two calls and as a result `cabal configure` is run twice (and it is very slow for this project. Passing the same `cabalProjectLocal` value to both calls should improve evaluation greatly when changes are made to the `cabal.project` or `.cabal` files. 3) Include jobs to pin plan-nix Pinning the `plan-nix` output means it is copied to the hydra cache. This may not improve eval on the hydra machine itself, it will make testing evaluation on other machines faster (since they will have access to the cached plans).
In response to review feedback: https://github.com/input-output-hk/cardano-wallet/pull/2451#discussion_r560856424
Bump dependencies
https://github.com/input-output-hk/cardano-haskell/pull/38