feat: add nix, use hspec for tests, extended API, and dual cabal/stack support#14
Merged
feat: add nix, use hspec for tests, extended API, and dual cabal/stack support#14
Conversation
acb7f01 to
a821ddb
Compare
fe9852e to
20e03f7
Compare
aab454c to
b25adaa
Compare
+ Use hspec with the existing golden tests + Use cabal instead of stack, and give deps some sensible constraints + Use nix flake to get cabal, ghc, etc.
b25adaa to
9a6323b
Compare
e24bc64 to
77072ca
Compare
+ useful if you want to optimise multiple vars with a single set of constraints + can also send 0 objective functions if you just want to run phase 1
e74f0b8 to
bcba9ec
Compare
bcba9ec to
93dd0a0
Compare
+ we already trigger on every push
497d8d6 to
1ec80c3
Compare
92529e6 to
529aeff
Compare
+ iohk nix was too slow in ci without caching
+ and use stack ghc rather than system ghc
69462cc to
1a67d9d
Compare
1a67d9d to
668f826
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
A comprehensive overhaul covering build tooling, CI, testing, and API.
Build & dev environment
flake.nix) for a reproducible dev environment vianix develop, pinned tonixos-25.11with GHC 9.6, cabal, stack, fourmolu, hlint, and HLSpackage.yamlwith a hand-maintainedsimplex-method.cabalwith updated version bounds (supports GHC 9.2–9.12)Makefilewith generic targets (make build,make test,make ci, etc.) delegating to cabal or stack viaBUILD_TOOL=cabal|stackCI
haskell.yml): cabal matrix across GHC 9.2, 9.4, 9.6, 9.8, 9.10, 9.12 × ubuntu/macos/windowshaskell-stack.yml): Stack LTS 22.44 on ubuntu and macoshaskell-nix.yml): parallel cabal and stack jobs insidenix develop, with flake input freshness checkTesting
hspec-discover; wrapped existing golden tests inTwoPhaseSpecandUtilSpecwith aSpec.hsentry pointAPI changes
VarDomainto support optional upper/lower bounds; updatedtwoPhaseSimplexto use the new APItwoPhaseSimplexnow accepts a list of objective functions, allowing users to optimise multiple variables against one constraint set, or pass an empty list to run Phase 1 onlyCode quality