diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 8252b041b8f0e9082af5a5576dfd39a5e338a503..84df2bce2e9e3d7df754d29901efa88b8700a22b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -23,10 +23,30 @@ hlint: nix run .#hlint -- src/ test/ # Use cabal to build the library and test suite and then run the test suite. -cabal-build-and-test: +"cabal-build-and-test-8.6.5": script: - | - nix run .#cabal-test + nix run .#cabal-test-865 + +"cabal-build-and-test-8.10.7": + script: + - | + nix run .#cabal-test-8107 + +"cabal-build-and-test-9.0.2": + script: + - | + nix run .#cabal-test-902 + +"cabal-build-and-test-9.2.4": + script: + - | + nix run .#cabal-test-924 + +"cabal-build-and-test-9.4.3": + script: + - | + nix run .#cabal-test-943 # Use nix to build the library and test suite and run the test suite. nix-build-and-test: diff --git a/flake.nix b/flake.nix index ced2464ab54332a86ca8ea1deec37bdb93dea1a2..9edd3f8f9612afb46ef444e46deb83f2c3a6f8bd 100644 --- a/flake.nix +++ b/flake.nix @@ -28,20 +28,23 @@ compilerVersion = ghcVersion; packageName = "tahoe-chk"; }; - in { - checks = hslib.checks {}; - devShells = hslib.devShells {}; - packages = hslib.packages {}; - apps.hlint = hslib.apps.hlint {}; - # Using the working directory of `nix run`, do a build with cabal and - # then run the test suite. - apps.cabal-test = { + # string -> flake app + # + # make a flake app that runs the test suite using cabal and the given + # version of ghc. The ghc version is found in the nixpkgs + # `haskell.compiler` attribute set. + mkCabalTest = ghcVersion: { type = "app"; program = "${ pkgs.writeShellApplication { name = "cabal-build-and-test"; - runtimeInputs = with pkgs; [pkg-config haskell.compiler.${ghcVersion} cabal-install]; + runtimeInputs = with pkgs; [ + pkg-config + gcc + haskell.compiler.${ghcVersion} + cabal-install + ]; text = '' set -ex @@ -53,6 +56,21 @@ } }/bin/cabal-build-and-test"; }; + in { + checks = hslib.checks {}; + devShells = hslib.devShells {}; + packages = hslib.packages {}; + apps.hlint = hslib.apps.hlint {}; + + # Using the working directory of `nix run`, do a build with cabal and + # then run the test suite. + apps.cabal-test-865 = mkCabalTest "ghc865Binary"; + apps.cabal-test-8107 = mkCabalTest "ghc8107"; + apps.cabal-test-902 = mkCabalTest "ghc902"; + apps.cabal-test-924 = mkCabalTest "ghc924"; + apps.cabal-test-943 = mkCabalTest "ghc943"; + + apps.cabal-test = self.outputs.apps.${system}.cabal-test-943; apps.release = { type = "app"; diff --git a/tahoe-chk.cabal b/tahoe-chk.cabal index 383af07df5aece4189e7c5c03ac3a1578681aab9..97313b9a4d895ae457c582825014b772fad9f332 100644 --- a/tahoe-chk.cabal +++ b/tahoe-chk.cabal @@ -22,6 +22,9 @@ extra-source-files: ChangeLog.md README.md +tested-with: + GHC ==8.6.5 || ==8.10.7 || ==9.0.2 || ==9.2.4 || ==9.4.3 + source-repository head type: git location: @@ -55,13 +58,13 @@ library aeson >=1.4.7 && <2.2 , async >=2.2.2 && <2.3 , base >=4.7 && <5 - , base32 >=0.2.1 && <0.3 + , base32 >=0.2.1 && <0.4 , base64-bytestring >=1.0.0.3 && <1.3 , binary >=0.8.6 && <0.9 - , bytestring >=0.10.8.2 && <0.11 + , bytestring >=0.10.8.2 && <0.12 , concurrency >=1.11 && <2 , containers >=0.6.0.1 && <0.7 - , cryptonite >=0.27 && <0.30 + , cryptonite >=0.27 && <0.31 , deepseq , directory >=1.3.3 && <1.4 , extra >=1.7.7 && <1.8 @@ -69,11 +72,11 @@ library , filepath >=1.4.2 && <1.5 , lens >=5.0 && <5.3 , megaparsec >=8.0 && <9.3 - , memory >=0.15 && <0.17 + , memory >=0.15 && <0.19 , network-byte-order >=0.1.5 && <0.2 , parser-combinators >=1.2.1 && <1.4 , primitive >=0.7.0.1 && <0.8 - , text >=1.2.3.1 && <1.3 + , text >=1.2.3.1 && <2.2 , tree-diff >=0.1 && <0.3 , utility-ht >=0.0.15 && <0.1 @@ -87,11 +90,11 @@ executable tahoe-chk-encrypt ghc-options: -Wall -threaded -rtsopts -with-rtsopts=-N build-depends: base >=4.7 && <5 - , base32 >=0.2.1 && <0.3 - , bytestring >=0.10.8.2 && <0.11 + , base32 >=0.2.1 && <0.4 + , bytestring >=0.10.8.2 && <0.12 , optparse-applicative >=0.15.1.0 && <0.19 , tahoe-chk - , text >=1.2.3.1 && <1.3 + , text >=1.2.3.1 && <2.2 default-language: Haskell2010 @@ -120,26 +123,26 @@ test-suite tahoe-chk-tests build-depends: aeson >=1.4.7 && <2.2 , base >=4.7 && <5 - , base32 >=0.2.1 && <0.3 + , base32 >=0.2.1 && <0.4 , base64-bytestring >=1.0.0.3 && <1.3 , binary >=0.8.6 && <0.9 - , bytestring >=0.10.8.2 && <0.11 + , bytestring >=0.10.8.2 && <0.12 , containers >=0.6.0.1 && <0.7 - , cryptonite >=0.27 && <0.30 + , cryptonite >=0.27 && <0.31 , directory >=1.3.3 && <1.4 , fec >=0.1.1 && <0.2 , filepath >=1.4.2 && <1.5 - , hedgehog >=1.0.3 && <1.1 + , hedgehog >=1.0.3 && <1.5 , lens >=5.0 && <5.3 , megaparsec >=8.0 && <9.3 - , memory >=0.15 && <0.17 + , memory >=0.15 && <0.19 , scientific >=0.3.6.2 && <0.4 , tahoe-chk , tasty >=1.2.3 && <1.5 - , tasty-hedgehog >=1.0.0.2 && <1.2 + , tasty-hedgehog >=1.0.0.2 && <1.5 , tasty-hunit >=0.10.0.2 && <0.11 , temporary >=1.3 && <1.4 - , text >=1.2.3.1 && <1.3 + , text >=1.2.3.1 && <2.2 , tree-diff >=0.1 && <0.3 , vector >=0.12.1.2 && <0.13 , yaml >=0.11.5.0 && <0.11.9.0 || >=0.11.9.0.0 && <0.12