Commit Graph

42 Commits

Author SHA1 Message Date
Hamish Mackenzie
dc49a0f404
ifdLevel 3 2021-05-24 16:47:37 +12:00
Hamish Mackenzie
f5be1a7ca9
ifdLevel 2 2021-05-23 23:49:32 +12:00
Hamish Mackenzie
dcadec4a2d
ifdLevel 1 2021-05-23 23:26:59 +12:00
Hamish Mackenzie
986a800713
Try to fix qAddDependentFile for windows (#1116)
Co-authored-by: Moritz Angermann <moritz.angermann@gmail.com>
2021-05-22 06:54:19 +12:00
Hamish Mackenzie
197eddd4a1
ifdLevel 1 2021-05-20 13:42:23 +12:00
Hamish Mackenzie
1c77a16e45
ifdLevel 3 2021-05-19 10:37:02 +12:00
Hamish Mackenzie
5daad7b286
ifdLevel 2 2021-05-19 00:30:11 +12:00
Hamish Mackenzie
05f999da80
ifdLevel 1 2021-05-18 23:04:44 +12:00
Hamish Mackenzie
7e5eeaabef
ifdLevel 2 2021-05-18 22:24:03 +12:00
Hamish Mackenzie
31aa9319b0
ifdLevel 1 2021-05-18 19:12:25 +12:00
Hamish Mackenzie
72beef11fc
ifdLevel 3 2021-03-21 21:52:11 +13:00
Hamish Mackenzie
ab909a8a5c
ifdLevel 2 2021-03-21 19:18:07 +13:00
Hamish Mackenzie
f600106883
ifdLevel 1 (hydra eval is building ghc for some reason) 2021-03-20 22:55:22 +13:00
Hamish Mackenzie
cd91692380
GHC 8.10.4 (#1033)
* Adds GHC 8.10.4 support

* Drops GHC 8.8.3, 8.10.2 and 8.10.3 from CI

* Adds warning to encourage people to use less buggy ghc
2021-02-09 14:30:32 +13:00
Hamish Mackenzie
0f7c5afc41
Add ghc 8.10.3 (#980) 2021-01-11 18:47:56 +13:00
Hamish Mackenzie
e02d5a8ca4
Smaller required jobs (#990)
We still seem to be getting some OOM errors.  This is likely to be
because some of the required jobs are still very large (with multiple
cross compilation target platforms). Hopefully breaking these out will
help.
2021-01-06 17:40:15 +13:00
Michael Peyton Jones
f6bc2f7315
Better 'required' job that includes everything (#976)
This requires explicitly identifying the things tht don't work and
removing them. I used our own `disabled` attribute, because `broken` is
weird and breaks evaluation, which isn't really what we want.

Cuts the number of jobs from over 2000 to 216. This seems to greatly
speeds up the time it takes small changes (where most stuff remains the
same) to be processed by hydra.

Uses https://github.com/NixOS/hydra/issues/715 to reference the
jobs in required by name avoiding OOM issues.

Co-authored-by: Hamish Mackenzie <Hamish.Mackenzie@iohk.io>
2021-01-06 16:44:43 +13:00
Michael Peyton Jones
738af22ce9
Move more CI to 20.09 (attempt 2) (#975)
* Update default nixpkgs to 20.09

* Move more CI to work on 20.09 by default

* IFD level 1

* Use nixpkgs 20.03 emscripten (needed for ghcjs)

* Add missing materialized files

* Add missing materialized files

* Fix for ghc 8.8 build on darwin

* Fix for ghcjs 8.8 build on darwin

* Fix hls stack test eval for ghc810220201118

* ifdLevel 2

* Oops: accidentally turned on tests for experimental GHC

* Revert "Fix hls stack test eval for ghc810220201118"

This reverts commit b405cd7ee8bd62214bd2d0a61e0317673b5bf1b5.

* ifdLevel 3

* Disable GHC 8.6.5 windows cross on nixpkgs 20.09

* Update supported GHC doc with a table

* Add emscripten comment

Co-authored-by: Hamish Mackenzie <Hamish.Mackenzie@iohk.io>
2020-12-17 15:57:09 +00:00
John A. Lotoski
09526c8555
Spelling, typo and whitespace fixes (#833)
* Spelling and typo fixes in doc and code comments
* Trailing whitespace or whitespace only truncation
* readTheDocs formatting corrections
2020-08-31 11:08:25 +12:00
Hamish Mackenzie
4cac8bd00f
Remove internal deps on default ghc and stackage (#738)
Changes to the interface of haskell.nix (from the changelog.md file):

* Removed `sources.nixpkgs-default`, use `sources.nixpkgs` instead.
* Removed `./nixpkgs` directory, use  `(import ./. {}).sources`
  or `./nix/sources.nix` instead.
* Removes V1 interface for details on how to fix old code see:
    https://github.com/input-output-hk/haskell.nix/issues/709
* Removed defaultCompilerNixName.
* cabalProject, cabalProject', hackage-project and hackage-package
  now require a `compiler-nix-name` argument.
* `haskell-nix.tool` and `.tools` now require a `compiler-nix-name` argument.
  New functions `p.tool` and `p.tools` (where p is a project) do not.
  Like `shellFor { tools = ... }` they will use the compiler nix name
  from the project (including stack projects where it is derived from
  the resolver).
* `haskell-nix.alex` and `haskell-nix.happy` have been removed. Use
  `p.tool "alex" "3.2.5"` or `shellFor { tools = { alex = "3.2.5"; } }`.
* `haskell-nix.nix-tools` -> `haskell-nix.nix-tools.ghc883` (it includes
  the hpack exe now).
* `haskell-nix.cabal-install` -> 
  `p.tool "cabal" "3.2.0.0"` or `shellFor { tools = { cabal = "3.2.0.0"; } }`
* `haskell-nix.haskellNixRoots` -> `haskell-nix.roots ghc883` or `p.roots`

Other changes:

Adds hpack executable to the nix-tools derivations.

Adds a `cabal-hpack` test to make sure `hpack` works with
`cabalProject`.

Reduces the number of calls to `cabalProject` (particularly when
checking materialization), by giving internal tools a per-compiler
attribute.

Uses happy 1.19.12 when building newer ghc versions.

Updates cabal-install 3.2.0.0 to use the source from github that
is compatible with ghc 8.10.1.

Updates the docs for callCabalProjectToNix.

Adds a license mapping to fix a common warning.
2020-07-08 22:54:01 +12:00
Hamish Mackenzie
15fc6b3774
Add ghc 8.10.1 (#541)
* ghc 8.10
* Adds/Updates/Removes materialization files
* Disable one-shot-kqueue-on-macos patch on ghc-8.10
* Test ghc883 and ghc8101 but only with nix 20.03
* Various smaller fixes.

This should fix the infinite recursion issue with #654

Co-authored-by: Lennart Spitzner <hexagoxel@hexagoxel.de>
2020-06-07 11:05:44 +08:00
Hamish Mackenzie
ff9a01e82e
Add missing pins and test ghc865 and ghc883 (#641)
Now that the defaultCompilerNixName is used to choose which GHC to use
for tools we need to update haskellNixRoots to make sure the common
tools wind up in the cache.

To do this we add the compilerNixName as a dimension in ci.nix.
This has the added bonus of ensuring the tests a run with the
supported versions of ghc (not just the default one).

haskellNixRoots is also updated to include the tools built with the
defaultCompilerNixName (in particular cabal-install was not pinned
and this was the likely cause of significant builds due to cache
misses).
2020-06-02 11:44:03 +12:00
Hamish Mackenzie
cbe66fffa4
ifdLevel 3 2020-05-12 12:07:41 +12:00
Hamish Mackenzie
ce8abdb1c1
ifdLevel 2 2020-05-12 02:28:57 +12:00
Hamish Mackenzie
e37927d4ed
ifdLevel 1 2020-05-12 02:07:01 +12:00
Maxim Koltsov
fea02bdaba
Update nix-tools with Cabal-3.2 (#591)
Update nix-tools and regenerate nix-tools plan

Co-authored-by: Hamish Mackenzie <Hamish.Mackenzie@iohk.io>
2020-05-11 23:54:13 +12:00
Michael Peyton Jones
701c83fb43
Update nixpkgs pins to include 20.03 (#557)
* Update nixpkgs pins to include 20.03, wobble

- Add 20.03
- Remove 19.03 (and old 18.09 file)
- Update 19.09 to latest
- Update github pin to 20.03
- Remove workarounds for 19.03

* Mark openssl as allowedInsecure

* Force python3 for mkdocs
2020-04-29 02:49:36 +12:00
Michael Peyton Jones
eb15db0450
Expose our nixpkgs pins by restructuring default.nix (#514)
* Remove unused (and broken) test files

* Make default.nix expose pinned nixpkgs

Also make `nixpkgs/default.nix` just an attribute set of sources.
This is simpler, and consistent with what e.g. `niv` does.

* Add backwards compatibility shim, and version argument to allow evolution in future

* Fix some missed things

* Fix and improve quickstart
2020-03-31 09:12:40 +08:00
Michael Peyton Jones
64700ae79e
CI: share between ci.nix and release.nix (#504)
* Define release.nix in terms of ci.nix

Beef up ci.nix to handle the same things as release.nix, then implement
the one in terms of the other.

* Fix infinite loop in evaluating release.nix with high ifdLevel

* Add tests to cross-compile

* Remove obsolete fix

* Do generic platform filtering

* Undefined variable

* Extract ci-lib.nix

* More undefined variables

* Use filterAttrsOnlyRecursive to avoid forcing all the drv attributes

* Set ifdLevel 0 to see if it fixes hydra eval

* Turn off tests on aarch64 cross

* Ifd level 1

* Ifd level 2

* Ifd level 3

* Maybe it's required that's too big?

Co-authored-by: Hamish Mackenzie <Hamish.Mackenzie@iohk.io>
2020-03-25 11:20:58 +00:00
Hamish Mackenzie
9fbf93e3c7
Fix musl test configuring openssl as linux-x86_64 (#490)
See: https://github.com/NixOS/nixpkgs/pull/82708
2020-03-17 17:28:09 +13:00
Hamish Mackenzie
dee2a9d7ad
Include windows tests in required 2020-03-05 16:41:10 +13:00
Hamish Mackenzie
4c1a151c22
Exclude failing test from required 2020-03-05 16:40:04 +13:00
Hamish Mackenzie
775c8cf756
Fix cross compilation issues for musl and aarch64 (#322)
* Enables tests for Musl and AArch64 (also rasbery pi, but leaves them disabled for now) and includes many fixes for the tests that were broken.

* Makes Musl cross compiler more like native (including making `ghci` and `runghc` work)

* Updates selection of enableShared

* Works around missing configFiles attribute issue

* Use ghc-extra-packages and compiler.nix-name to pick the right extra packages

* Leaves out --cross-compile on hsc2hs for musl

* Fixes haddock and hoogle for musl and disables them for other cross compilers

* Adds ghc 8.8.3

* Static link components (except libraries and `all`) on musl

* Use qemu for the arm cross compile `testWrapper`

* Add isCrossHost and isCrossTarget functions

* Fixes profiling on AArch64

* Disable split sections when compiling for windows (fixes GHC 8.8 cross compile to windows)

* Disable hoogle in cross compiler shells for now
2020-03-04 16:07:01 +13:00
Hamish Mackenzie
5d778f61ba
Enable windows cross for nixpkgs 19.09 on hydra (#410) 2020-01-25 19:39:29 +13:00
Hamish Mackenzie
a9b01221dd
Replace collectRunComponents with haskellLib.check (#316)
This change replaces `passthru.run` and `collectRunComponents` with
`haskellLib.check` and `$pkg.checks`.

Uses `ln -s` instead of `cp` for DLLs to avoid duplicating them.

Adds features to help debugging eval issues with haskell.nix/release.nix.
The ifdInputLevel can be set to limit the jobs included to control
how much work is done at the eval stage when looking for issues.

Reduce CI times by excluding older ghc versions from haskellNixRoots
(GHC 8.6.3 and 8.6.4)

Sets `preferLocalBuild=false` on `callCabalProjectToNix` and `callStackToNix`
to ensure they are cached on hydra for both Linux and macOS.

Fix `data-dir:` when cleaning components.
`normalizeRelativeDir` adds a slash on to the end of `dataDir`.
Adding another one here results in `//` and files are left out by
mistake.
2019-11-29 23:28:47 +13:00
Hamish Mackenzie
79c2c631c3
Run the cross compiled tests on wine (#317)
Changes to the haskell.nix code to fix broken tests:

* Add missing `then` to `call-cabal-project-to-nix.nix`.

* Fix default `hsSourceDirs` so that `.` gets included for `.all` component if one of the components does not have a `hsSourceDir` set.

* Fix `haskellNixRoots` so it works when cross compiling to windows.

Improvements to the haskell.nix tests:

* Run haskell.nix tests of nixpkgs 19.03 and 19.09.

* Run haskell.nix tests cross compiled to Windows under Wine (when possible).

* Add nix used as IFD inputs as tests to ensure they are cached.

* Use `haskell-nix.cabal-install` instead of `nixpkgs.cabal-install` in tests.
2019-11-20 13:47:15 +13:00
Hamish Mackenzie
a5f9f45922
Test setup deps issue depending on ghc and Cabal (#278)
Projects like asterius and leksah that include dependencies on ghc. Sometimes the are needed by a setup.hs file (as is the case for the binaryen package used by asterius). The recent overlays merge broke this and #279 was needed to allow reinstallableLibGhc to be used to fix it. This PR adds a test case to make sure it is not inadvertently broken again. Also gives us a place to try out better ways to make this type of package work.* Test setup deps issue depending on ghc and Cabal

* Uses nixpkgs 19.09 + macOS wine fix on hydra/buildkite

* Enables macOS hydra tests

* disables musl tests for now

* Adds haskellNixRoots to tests

* Uses reinstallableLibGhc to fix the new setup-depends test

* Adds meta.platforms to haskell.nix components

* Set meta.platforms on cabal-install

* Builds some maintainer-scripts on hydra

* Pins hackage index-state for ghc-extra-packages
2019-11-01 12:34:10 +13:00
Rodney Lorrimar
3bb58214f1
Add cross-compiled musl libc builds of tests (#157)
* Add cross-compiled musl libc builds of tests

* Bump nixpkgs to latest 19.03

* tests: Update stack-simple LTS

* docs: Add note about tests

* Regenerate tests

* haskellPackages: lts-13.18 -> lts-13.26

This contains GHC 8.6.5 which can successfully build under
pkgsCross.musl64, whereas GHC 8.6.4 could not.

* Bump nix-tools

* Regenerate nix-tools -- changed compiler from GHC 8.6.4 -> GHC 8.6.5.
2019-07-02 18:25:40 +10:00
Rodney Lorrimar
caf1f61267 Use release-lib.nix for Hydra (#161)
* Use release-lib.nix for Hydra jobset

* Buildkite: Add a script to check Hydra evaluation
2019-06-03 11:26:28 +08:00
Rodney Lorrimar
8512832c32
Fix evaluation on Hydra (#153)
* Fix eval on Hydra

* Bump nixpkgs to latest 19.03

* Change unit tests into a derivation

Prevents Hydra from complaining about them.

* Add unpacked source pins to Hydra jobset

So that they are cached.
2019-06-02 07:21:21 +10:00
Rodney Lorrimar
6e41c11489
Fix eval of hydra jobset 2019-04-02 13:08:25 +10:00
Rodney Lorrimar
286db94d02
Add Hydra jobset and Buildkite pipeline 2019-03-20 12:47:43 +10:00