diff --git a/.config/project/github-ci.nix b/.config/project/github-ci.nix index 453b88a..8a8ade4 100644 --- a/.config/project/github-ci.nix +++ b/.config/project/github-ci.nix @@ -6,7 +6,9 @@ githubSystems: haskellPackages: { }: let planName = "plan-\${{ matrix.os }}-\${{ matrix.ghc }}\${{ matrix.bounds }}"; ## NB: Prefer the default compiler version. - ghc-version = "9.6.3"; + ghc-version = "9.6.5"; + ## This should be the highest GHC version that this workflow built. + latest-ghc-version = "9.10.1"; cabal-version = "3.12.1.0"; runs-on = "ubuntu-22.04"; in { @@ -40,6 +42,12 @@ in { ghc = "8.6.1"; os = "macos-13"; } + ## TODO: For some reason, this combination fails to build + ## ghc-paths-0.1.0.12. + { + ghc = "9.4.1"; + os = "macos-14"; + } ] ## GitHub can’t install GHC older than 9.4 on macos-14. ++ map (ghc: { @@ -161,7 +169,8 @@ in { id = "setup-haskell-cabal"; "with" = {inherit cabal-version ghc-version;}; } - {run = "cabal install cabal-plan -flicense-report";} + ## The `-Wwarn` offsets an issue where warnings are causing failures. + {run = "cabal install cabal-plan -flicense-report --ghc-option=-Wwarn";} { name = "download Cabal plans"; uses = "actions/download-artifact@v4"; @@ -174,7 +183,7 @@ in { { run = '' mkdir -p dist-newstyle/cache - mv plans/plan-''${{ matrix.os }}-${ghc-version}.json dist-newstyle/cache/plan.json + mv plans/plan-${runs-on}-${latest-ghc-version}.json dist-newstyle/cache/plan.json ''; } { diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0293efa..5161252 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1 +1 @@ -{"jobs":{"build":{"env":{"CONFIG":"--enable-tests --enable-benchmarks ${{ matrix.bounds }}"},"runs-on":"${{ matrix.os }}","steps":[{"uses":"actions/checkout@v4"},{"id":"setup-haskell-cabal","uses":"haskell-actions/setup@v2","with":{"cabal-version":"3.12.1.0","ghc-version":"${{ matrix.ghc }}"}},{"run":"cabal v2-freeze $CONFIG"},{"uses":"actions/cache@v4","with":{"key":"${{ matrix.os }}-${{ matrix.ghc }}-${{ hashFiles('cabal.project.freeze') }}","path":"${{ steps.setup-haskell-cabal.outputs.cabal-store }}\ndist-newstyle\n"}},{"run":"cabal v2-build all $CONFIG"},{"run":"cabal v2-test all $CONFIG"},{"run":"mv dist-newstyle/cache/plan.json plan-${{ matrix.os }}-${{ matrix.ghc }}${{ matrix.bounds }}.json"},{"name":"Upload build plan as artifact","uses":"actions/upload-artifact@v4","with":{"name":"plan-${{ matrix.os }}-${{ matrix.ghc }}${{ matrix.bounds }}","path":"plan-${{ matrix.os }}-${{ matrix.ghc }}${{ matrix.bounds }}.json"}}],"strategy":{"fail-fast":false,"matrix":{"bounds":["--prefer-oldest",""],"exclude":[{"ghc":"7.10.3","os":"ubuntu-22.04"},{"bounds":"--prefer-oldest","ghc":"8.6.1","os":"macos-13"},{"ghc":"8.6.1","os":"macos-14"},{"ghc":"8.8.1","os":"macos-14"},{"ghc":"8.10.1","os":"macos-14"},{"ghc":"9.0.1","os":"macos-14"},{"ghc":"9.2.1","os":"macos-14"}],"ghc":["8.6.1","8.8.1","8.10.1","9.0.1","9.2.1","9.4.1","9.6.1","9.8.1","9.10.1"],"os":["macos-13","macos-14","ubuntu-22.04","windows-2022"]}}},"check-bounds":{"if":"always()","needs":["build"],"runs-on":"ubuntu-22.04","steps":[{"uses":"actions/checkout@v4"},{"id":"setup-haskell-cabal","uses":"haskell-actions/setup@v2","with":{"cabal-version":"3.12.1.0","ghc-version":"9.6.3"}},{"run":"## TODO: Remove the manual cloning once cabal-plan-bounds >0.1.5.1\n## is released. Currently, it’s needed because of\n## nomeata/cabal-plan-bounds#19.\ngit clone https://github.com/nomeata/cabal-plan-bounds\ncd cabal-plan-bounds\ncabal install cabal-plan-bounds\n"},{"name":"download Cabal plans","uses":"actions/download-artifact@v4","with":{"merge-multiple":true,"path":"plans","pattern":"plan-*"}},{"name":"Cabal plans considered in generated bounds","run":"find plans/"},{"name":"check if bounds have changed","run":"diffs=\"$(find . -name '*.cabal' -exec \\\n cabal-plan-bounds \\\n --dry-run \\\n --also yaya-0.5.1.0 --also yaya-0.6.0.0 --also yaya-hedgehog-0.2.1.0 --also yaya-hedgehog-0.3.0.0 --also th-abstraction-0.5.0.0 \\\n plans/*.json \\\n --cabal {} \\;)\"\nif [[ -n \"$diffs\" ]]; then\n echo \"$diffs\"\n exit 1\nfi\n"}]},"check-licenses":{"if":"always()","needs":["build"],"runs-on":"ubuntu-22.04","steps":[{"uses":"actions/checkout@v4"},{"id":"setup-haskell-cabal","uses":"haskell-actions/setup@v2","with":{"cabal-version":"3.12.1.0","ghc-version":"9.6.3"}},{"run":"cabal install cabal-plan -flicense-report"},{"name":"download Cabal plans","uses":"actions/download-artifact@v4","with":{"merge-multiple":true,"path":"plans","pattern":"plan-*"}},{"run":"mkdir -p dist-newstyle/cache\nmv plans/plan-${{ matrix.os }}-9.6.3.json dist-newstyle/cache/plan.json\n"},{"name":"check if licenses have changed","run":"declare -a packages=('yaya')\nfor package in \"${packages[@]}\"; do\n {\n echo \"**NB**: This captures the licenses associated with a particular set of dependency versions. If your own build solves differently, it’s possible that the licenses may have changed, or even that the set of dependencies itself is different. Please make sure you run [\\`cabal-plan license-report\\`](https://hackage.haskell.org/package/cabal-plan) on your own components rather than assuming this is authoritative.\"\n echo\n cabal-plan license-report \"$package:lib:$package\"\n } >\"$package/docs/license-report.md\"\ndone\ngit diff --exit-code */docs/license-report.md\n"}]}},"name":"CI","on":{"pull_request":{"types":["opened","synchronize"]},"push":{"branches":["main"]}}} \ No newline at end of file +{"jobs":{"build":{"env":{"CONFIG":"--enable-tests --enable-benchmarks ${{ matrix.bounds }}"},"runs-on":"${{ matrix.os }}","steps":[{"uses":"actions/checkout@v4"},{"id":"setup-haskell-cabal","uses":"haskell-actions/setup@v2","with":{"cabal-version":"3.12.1.0","ghc-version":"${{ matrix.ghc }}"}},{"run":"cabal v2-freeze $CONFIG"},{"uses":"actions/cache@v4","with":{"key":"${{ matrix.os }}-${{ matrix.ghc }}-${{ hashFiles('cabal.project.freeze') }}","path":"${{ steps.setup-haskell-cabal.outputs.cabal-store }}\ndist-newstyle\n"}},{"run":"cabal v2-build all $CONFIG"},{"run":"cabal v2-test all $CONFIG"},{"run":"mv dist-newstyle/cache/plan.json plan-${{ matrix.os }}-${{ matrix.ghc }}${{ matrix.bounds }}.json"},{"name":"Upload build plan as artifact","uses":"actions/upload-artifact@v4","with":{"name":"plan-${{ matrix.os }}-${{ matrix.ghc }}${{ matrix.bounds }}","path":"plan-${{ matrix.os }}-${{ matrix.ghc }}${{ matrix.bounds }}.json"}}],"strategy":{"fail-fast":false,"matrix":{"bounds":["--prefer-oldest",""],"exclude":[{"ghc":"7.10.3","os":"ubuntu-22.04"},{"bounds":"--prefer-oldest","ghc":"8.6.1","os":"macos-13"},{"ghc":"9.4.1","os":"macos-14"},{"ghc":"8.6.1","os":"macos-14"},{"ghc":"8.8.1","os":"macos-14"},{"ghc":"8.10.1","os":"macos-14"},{"ghc":"9.0.1","os":"macos-14"},{"ghc":"9.2.1","os":"macos-14"}],"ghc":["8.6.1","8.8.1","8.10.1","9.0.1","9.2.1","9.4.1","9.6.1","9.8.1","9.10.1"],"os":["macos-13","macos-14","ubuntu-22.04","windows-2022"]}}},"check-bounds":{"if":"always()","needs":["build"],"runs-on":"ubuntu-22.04","steps":[{"uses":"actions/checkout@v4"},{"id":"setup-haskell-cabal","uses":"haskell-actions/setup@v2","with":{"cabal-version":"3.12.1.0","ghc-version":"9.6.5"}},{"run":"## TODO: Remove the manual cloning once cabal-plan-bounds >0.1.5.1\n## is released. Currently, it’s needed because of\n## nomeata/cabal-plan-bounds#19.\ngit clone https://github.com/nomeata/cabal-plan-bounds\ncd cabal-plan-bounds\ncabal install cabal-plan-bounds\n"},{"name":"download Cabal plans","uses":"actions/download-artifact@v4","with":{"merge-multiple":true,"path":"plans","pattern":"plan-*"}},{"name":"Cabal plans considered in generated bounds","run":"find plans/"},{"name":"check if bounds have changed","run":"diffs=\"$(find . -name '*.cabal' -exec \\\n cabal-plan-bounds \\\n --dry-run \\\n --also yaya-0.5.1.0 --also yaya-0.6.0.0 --also yaya-hedgehog-0.2.1.0 --also yaya-hedgehog-0.3.0.0 --also th-abstraction-0.5.0.0 \\\n plans/*.json \\\n --cabal {} \\;)\"\nif [[ -n \"$diffs\" ]]; then\n echo \"$diffs\"\n exit 1\nfi\n"}]},"check-licenses":{"if":"always()","needs":["build"],"runs-on":"ubuntu-22.04","steps":[{"uses":"actions/checkout@v4"},{"id":"setup-haskell-cabal","uses":"haskell-actions/setup@v2","with":{"cabal-version":"3.12.1.0","ghc-version":"9.6.5"}},{"run":"cabal install cabal-plan -flicense-report --ghc-option=-Wwarn"},{"name":"download Cabal plans","uses":"actions/download-artifact@v4","with":{"merge-multiple":true,"path":"plans","pattern":"plan-*"}},{"run":"mkdir -p dist-newstyle/cache\nmv plans/plan-ubuntu-22.04-9.10.1.json dist-newstyle/cache/plan.json\n"},{"name":"check if licenses have changed","run":"declare -a packages=('yaya')\nfor package in \"${packages[@]}\"; do\n {\n echo \"**NB**: This captures the licenses associated with a particular set of dependency versions. If your own build solves differently, it’s possible that the licenses may have changed, or even that the set of dependencies itself is different. Please make sure you run [\\`cabal-plan license-report\\`](https://hackage.haskell.org/package/cabal-plan) on your own components rather than assuming this is authoritative.\"\n echo\n cabal-plan license-report \"$package:lib:$package\"\n } >\"$package/docs/license-report.md\"\ndone\ngit diff --exit-code */docs/license-report.md\n"}]}},"name":"CI","on":{"pull_request":{"types":["opened","synchronize"]},"push":{"branches":["main"]}}} \ No newline at end of file diff --git a/flake.nix b/flake.nix index 8df362d..b34c594 100644 --- a/flake.nix +++ b/flake.nix @@ -279,6 +279,7 @@ nixpkgs.lib.versionAtLeast hprev.ghc.version "9.2.0" && final.system == "i686-linux" then { + aeson = final.haskell.lib.dontCheck hprev.aeson; enummapset = final.haskell.lib.dontCheck hprev.enummapset; ## Tests run out of memory (at least on garnix) generic-arbitrary = @@ -411,9 +412,14 @@ cabalPackages (hpkgs: [self.projectConfigurations.${system}.packages.path] - ## NB: Haskell Language Server no longer supports GHC <9.2. + ## NB: Haskell Language Server no longer supports GHC <9.2, and 9.4 + ## has an issue with it on i686-linux. ++ nixpkgs.lib.optional - (nixpkgs.lib.versionAtLeast hpkgs.ghc.version "9.2") + ( + if system == "i686-linux" + then nixpkgs.lib.versionAtLeast hpkgs.ghc.version "9.4" + else nixpkgs.lib.versionAtLeast hpkgs.ghc.version "9.2" + ) hpkgs.haskell-language-server); projectConfigurations =