From e3f53f9df37d62b49878c9596675ca0d0f245ceb Mon Sep 17 00:00:00 2001 From: Kobayashi Date: Sun, 30 Jun 2024 17:32:27 -0500 Subject: [PATCH] update dependencies (#11) --- .github/workflows/haskell-ci.yml | 50 ++++++++++++++++++++------------ .gitignore | 3 +- flake.lock | 24 +++++++-------- flake.nix | 10 ++----- timeline.cabal | 9 +++--- 5 files changed, 52 insertions(+), 44 deletions(-) diff --git a/.github/workflows/haskell-ci.yml b/.github/workflows/haskell-ci.yml index 087800e..ac2fcfb 100644 --- a/.github/workflows/haskell-ci.yml +++ b/.github/workflows/haskell-ci.yml @@ -8,9 +8,9 @@ # # For more information, see https://github.com/haskell-CI/haskell-ci # -# version: 0.16.3 +# version: 0.19.20240608 # -# REGENDATA ("0.16.3",["github","timeline.cabal"]) +# REGENDATA ("0.19.20240608",["github","timeline.cabal"]) # name: Haskell-CI on: @@ -23,24 +23,34 @@ jobs: timeout-minutes: 60 container: - image: buildpack-deps:bionic + image: buildpack-deps:jammy continue-on-error: ${{ matrix.allow-failure }} strategy: matrix: include: - - compiler: ghc-9.6.2 + - compiler: ghc-9.10.1 compilerKind: ghc - compilerVersion: 9.6.2 + compilerVersion: 9.10.1 setup-method: ghcup allow-failure: false - - compiler: ghc-9.4.4 + - compiler: ghc-9.8.2 compilerKind: ghc - compilerVersion: 9.4.4 + compilerVersion: 9.8.2 setup-method: ghcup allow-failure: false - - compiler: ghc-9.2.6 + - compiler: ghc-9.6.5 compilerKind: ghc - compilerVersion: 9.2.6 + compilerVersion: 9.6.5 + setup-method: ghcup + allow-failure: false + - compiler: ghc-9.4.8 + compilerKind: ghc + compilerVersion: 9.4.8 + setup-method: ghcup + allow-failure: false + - compiler: ghc-9.2.8 + compilerKind: ghc + compilerVersion: 9.2.8 setup-method: ghcup allow-failure: false - compiler: ghc-8.10.7 @@ -55,10 +65,10 @@ jobs: apt-get update apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5 mkdir -p "$HOME/.ghcup/bin" - curl -sL https://downloads.haskell.org/ghcup/0.1.19.2/x86_64-linux-ghcup-0.1.19.2 > "$HOME/.ghcup/bin/ghcup" + curl -sL https://downloads.haskell.org/ghcup/0.1.20.0/x86_64-linux-ghcup-0.1.20.0 > "$HOME/.ghcup/bin/ghcup" chmod a+x "$HOME/.ghcup/bin/ghcup" "$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false) - "$HOME/.ghcup/bin/ghcup" install cabal 3.10.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false) + "$HOME/.ghcup/bin/ghcup" install cabal 3.10.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false) env: HCKIND: ${{ matrix.compilerKind }} HCNAME: ${{ matrix.compiler }} @@ -70,11 +80,13 @@ jobs: echo "CABAL_DIR=$HOME/.cabal" >> "$GITHUB_ENV" echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV" HCDIR=/opt/$HCKIND/$HCVER - HC=$HOME/.ghcup/bin/$HCKIND-$HCVER + HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER") + HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#') + HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#') echo "HC=$HC" >> "$GITHUB_ENV" - echo "HCPKG=$HOME/.ghcup/bin/$HCKIND-pkg-$HCVER" >> "$GITHUB_ENV" - echo "HADDOCK=$HOME/.ghcup/bin/haddock-$HCVER" >> "$GITHUB_ENV" - echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.1.0 -vnormal+nowrap" >> "$GITHUB_ENV" + echo "HCPKG=$HCPKG" >> "$GITHUB_ENV" + echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV" + echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.2.0 -vnormal+nowrap" >> "$GITHUB_ENV" HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))') echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV" echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV" @@ -131,7 +143,7 @@ jobs: chmod a+x $HOME/.cabal/bin/cabal-plan cabal-plan --version - name: checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: path: source - name: initial cabal.project for sdist @@ -159,7 +171,7 @@ jobs: echo " ghc-options: -Werror=missing-methods" >> cabal.project cat >> cabal.project <> cabal.project.local + $HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: any.$_ installed\n" unless /^(timeline)$/; }' >> cabal.project.local cat cabal.project cat cabal.project.local - name: dump install plan @@ -167,7 +179,7 @@ jobs: $CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH --dry-run all cabal-plan - name: restore cache - uses: actions/cache/restore@v3 + uses: actions/cache/restore@v4 with: key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }} path: ~/.cabal/store @@ -197,7 +209,7 @@ jobs: rm -f cabal.project.local $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks all - name: save cache - uses: actions/cache/save@v3 + uses: actions/cache/save@v4 if: always() with: key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }} diff --git a/.gitignore b/.gitignore index e9eced2..eac54bf 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,5 @@ .direnv/ .envrc result -dist-newstyle \ No newline at end of file +dist-newstyle +cabal.project.local \ No newline at end of file diff --git a/flake.lock b/flake.lock index 3192735..21fc4f0 100644 --- a/flake.lock +++ b/flake.lock @@ -7,11 +7,11 @@ "nixpkgs": "nixpkgs" }, "locked": { - "lastModified": 1697772615, - "narHash": "sha256-w3yK1C6/JsBVvZRKnZw4HPBajYWpcA2BR3t13mfALzE=", + "lastModified": 1719540486, + "narHash": "sha256-9Pw2PSOhLLr+M2pwd04RuYvem7l88g/Mh9kJNyKhyno=", "owner": "bellroy", "repo": "bellroy-nix-foss", - "rev": "35391828c0526c0ce7bfa52c3dfb49e818f8740f", + "rev": "e0c388f67e4821a3a3526e0a8547711c1de772f0", "type": "github" }, "original": { @@ -23,11 +23,11 @@ "flake-compat": { "flake": false, "locked": { - "lastModified": 1673956053, - "narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=", + "lastModified": 1696426674, + "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", "owner": "edolstra", "repo": "flake-compat", - "rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9", + "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", "type": "github" }, "original": { @@ -41,11 +41,11 @@ "systems": "systems" }, "locked": { - "lastModified": 1687709756, - "narHash": "sha256-Y5wKlQSkgEK2weWdOu4J3riRd+kV/VCgHsqLNTTWQ/0=", + "lastModified": 1710146030, + "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", "owner": "numtide", "repo": "flake-utils", - "rev": "dbabf0ca0c0c4bce6ea5eaf65af5cb694d2082c7", + "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", "type": "github" }, "original": { @@ -56,11 +56,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1688492144, - "narHash": "sha256-xjijhELugHZF8QGoJ20VU0buC7yC/8R5z9W0MeKRrJ4=", + "lastModified": 1719082008, + "narHash": "sha256-jHJSUH619zBQ6WdC21fFAlDxHErKVDJ5fpN0Hgx4sjs=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "ec322bf9e598a510995e7540f17af57ee0c8d5b9", + "rev": "9693852a2070b398ee123a329e68f0dab5526681", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 10f49a7..93edef5 100644 --- a/flake.nix +++ b/flake.nix @@ -6,13 +6,7 @@ }; outputs = inputs: inputs.bellroy-nix-foss.lib.haskellProject { - cabalPackages = [ - { - name = "timeline"; - path = ./package.nix; - } - ]; - supportedCompilers = [ "ghc8107" "ghc92" "ghc94" "ghc962" ]; - defaultCompiler = "ghc92"; + supportedCompilers = [ "ghc92" "ghc94" "ghc96" "ghc98" "ghc910" ]; + defaultCompiler = "ghc96"; }; } diff --git a/timeline.cabal b/timeline.cabal index c277164..063f2ed 100644 --- a/timeline.cabal +++ b/timeline.cabal @@ -15,7 +15,7 @@ author: Bellroy Tech Team maintainer: Bellroy Tech Team category: Development build-type: Simple -tested-with: GHC ==8.10.7 || ==9.2.6 || ==9.4.4 || ==9.6.2 +tested-with: GHC ==8.10.7 || ==9.2.8 || ==9.4.8 || ==9.6.5 || ==9.8.2 || ==9.10.1 extra-source-files: CHANGELOG.md README.md @@ -27,12 +27,13 @@ source-repository head common deps build-depends: - , base >=4.14.3 && <4.20 + , base >=4.14.3 && <4.21 , containers >=0.6.5 && <0.7.1 , hedgehog >=1.1 && <1.5 , indexed-traversable >=0.1.2 && <0.2 , text ^>=1.2.4.1 || >=2.0 && <2.2 - , time >=1.9.3 && <1.13 + , time >=1.9.3 && <1.15 + library import: deps hs-source-dirs: src/ @@ -44,7 +45,7 @@ library ghc-options: -Wall -fno-warn-unused-do-bind -fno-warn-unused-imports build-depends: , semigroupoids >=5.3.7 && <6.1 - , template-haskell >=2.16.0 && <2.22 + , template-haskell >=2.16.0 && <2.23 , th-compat >=0.1.4 && <0.2 test-suite tests