diff --git a/.github/workflows/haskell-ci.yml b/.github/workflows/haskell-ci.yml index 2ab7d724..8c6090a5 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.19.20240501 +# version: 0.19.20241121 # -# REGENDATA ("0.19.20240501",["--branches","master","--github-patches",".github/workflows/ci-skip-package-map.patch","--doctest","--doctest-options=-i ../../dist-newstyle/build/*/*/cabal2nix-*/build/autogen","--doctest-jobs=>= 8.8 && < 9.4","github","cabal.project"]) +# REGENDATA ("0.19.20241121",["--branches","master","--github-patches",".github/workflows/ci-skip-package-map.patch","--doctest","--doctest-options=-i ../../dist-newstyle/build/*/*/cabal2nix-*/build/autogen","--doctest-jobs=>= 8.8 && < 9.4","github","cabal.project"]) # name: Haskell-CI on: @@ -32,9 +32,19 @@ jobs: strategy: matrix: include: - - compiler: ghc-9.6.5 + - compiler: ghc-9.10.1 compilerKind: ghc - compilerVersion: 9.6.5 + compilerVersion: 9.10.1 + setup-method: ghcup + allow-failure: false + - compiler: ghc-9.8.3 + compilerKind: ghc + compilerVersion: 9.8.3 + setup-method: ghcup-vanilla + allow-failure: false + - compiler: ghc-9.6.6 + compilerKind: ghc + compilerVersion: 9.6.6 setup-method: ghcup allow-failure: false - compiler: ghc-9.4.8 @@ -59,41 +69,59 @@ jobs: allow-failure: false fail-fast: false steps: - - name: apt + - name: apt-get install run: | apt-get update apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5 + - name: Install GHCup + run: | mkdir -p "$HOME/.ghcup/bin" - curl -sL https://downloads.haskell.org/ghcup/0.1.20.0/x86_64-linux-ghcup-0.1.20.0 > "$HOME/.ghcup/bin/ghcup" + curl -sL https://downloads.haskell.org/ghcup/0.1.30.0/x86_64-linux-ghcup-0.1.30.0 > "$HOME/.ghcup/bin/ghcup" chmod a+x "$HOME/.ghcup/bin/ghcup" - "$HOME/.ghcup/bin/ghcup" config add-release-channel https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-prereleases-0.0.8.yaml; + - name: Install cabal-install + run: | + "$HOME/.ghcup/bin/ghcup" install cabal 3.12.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false) + echo "CABAL=$HOME/.ghcup/bin/cabal-3.12.1.0 -vnormal+nowrap" >> "$GITHUB_ENV" + - name: Install GHC (GHCup) + if: matrix.setup-method == 'ghcup' + run: | "$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false) - "$HOME/.ghcup/bin/ghcup" install cabal 3.10.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false) + 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=$HCPKG" >> "$GITHUB_ENV" + echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV" env: HCKIND: ${{ matrix.compilerKind }} HCNAME: ${{ matrix.compiler }} HCVER: ${{ matrix.compilerVersion }} - - name: Set PATH and environment variables + - name: Install GHC (GHCup vanilla) + if: matrix.setup-method == 'ghcup-vanilla' run: | - echo "$HOME/.cabal/bin" >> $GITHUB_PATH - echo "LANG=C.UTF-8" >> "$GITHUB_ENV" - echo "CABAL_DIR=$HOME/.cabal" >> "$GITHUB_ENV" - echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV" - HCDIR=/opt/$HCKIND/$HCVER + "$HOME/.ghcup/bin/ghcup" -s https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-vanilla-0.0.8.yaml install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false) 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=$HCPKG" >> "$GITHUB_ENV" echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV" - echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.2.0 -vnormal+nowrap" >> "$GITHUB_ENV" + env: + HCKIND: ${{ matrix.compilerKind }} + HCNAME: ${{ matrix.compiler }} + HCVER: ${{ matrix.compilerVersion }} + - name: Set PATH and environment variables + run: | + echo "$HOME/.cabal/bin" >> $GITHUB_PATH + echo "LANG=C.UTF-8" >> "$GITHUB_ENV" + echo "CABAL_DIR=$HOME/.cabal" >> "$GITHUB_ENV" + echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$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" echo "ARG_BENCH=--enable-benchmarks" >> "$GITHUB_ENV" echo "HEADHACKAGE=false" >> "$GITHUB_ENV" echo "ARG_COMPILER=--$HCKIND --with-compiler=$HC" >> "$GITHUB_ENV" - echo "GHCJSARITH=0" >> "$GITHUB_ENV" env: HCKIND: ${{ matrix.compilerKind }} HCNAME: ${{ matrix.compiler }} @@ -136,7 +164,7 @@ jobs: - name: cache (tools) uses: actions/cache/restore@v4 with: - key: ${{ runner.os }}-${{ matrix.compiler }}-tools-dd324315 + key: ${{ runner.os }}-${{ matrix.compiler }}-tools-fb82843d path: ~/.haskell-ci-tools - name: install cabal-plan run: | @@ -152,10 +180,10 @@ jobs: if [ $((HCNUMVER < 90400)) -ne 0 ] ; then $CABAL --store-dir=$HOME/.haskell-ci-tools/store v2-install $ARG_COMPILER --ignore-project -j2 doctest --constraint='doctest ^>=0.22.0' ; fi if [ $((HCNUMVER < 90400)) -ne 0 ] ; then doctest --version ; fi - name: save cache (tools) - uses: actions/cache/save@v4 if: always() + uses: actions/cache/save@v4 with: - key: ${{ runner.os }}-${{ matrix.compiler }}-tools-dd324315 + key: ${{ runner.os }}-${{ matrix.compiler }}-tools-fb82843d path: ~/.haskell-ci-tools - name: checkout uses: actions/checkout@v4 @@ -204,7 +232,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 /^(cabal2nix|distribution-nixpkgs|hackage-db|language-nix)$/; }' >> cabal.project.local cat cabal.project cat cabal.project.local - name: dump install plan @@ -258,8 +286,8 @@ jobs: rm -f cabal.project.local $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks all - name: save cache - uses: actions/cache/save@v4 if: always() + uses: actions/cache/save@v4 with: key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }} path: ~/.cabal/store diff --git a/cabal2nix/cabal2nix.cabal b/cabal2nix/cabal2nix.cabal index 4f03d3e8..d7329a5d 100644 --- a/cabal2nix/cabal2nix.cabal +++ b/cabal2nix/cabal2nix.cabal @@ -12,7 +12,7 @@ author: Peter Simons -- list all contributors: git log --pretty='%an' | sort | uniq maintainer: sternenseemann stability: stable -tested-with: GHC == 8.10.7 || == 9.0.2 || == 9.2.8 || == 9.4.8 || == 9.6.5 +tested-with: GHC == 8.10.7 || == 9.0.2 || == 9.2.8 || == 9.4.8 || == 9.6.6 || == 9.8.3 || == 9.10.1 category: Distribution, Nix homepage: https://github.com/nixos/cabal2nix#readme bug-reports: https://github.com/nixos/cabal2nix/issues @@ -48,7 +48,7 @@ library Distribution.Nixpkgs.Haskell.Platform other-modules: Paths_cabal2nix hs-source-dirs: src - build-depends: base > 4.11 + build-depends: base > 4.11 && <5 -- When changing the Cabal version, ensure that it builds -- with all installation methods mentioned in the README! , Cabal >= 3.0 diff --git a/distribution-nixpkgs/distribution-nixpkgs.cabal b/distribution-nixpkgs/distribution-nixpkgs.cabal index 6157df8a..103d4ca9 100644 --- a/distribution-nixpkgs/distribution-nixpkgs.cabal +++ b/distribution-nixpkgs/distribution-nixpkgs.cabal @@ -6,7 +6,7 @@ license: BSD3 license-file: LICENSE author: Peter Simons maintainer: sternenseemann -tested-with: GHC == 8.10.7 || == 9.0.2 || == 9.2.8 || == 9.4.8 || == 9.6.5 +tested-with: GHC == 8.10.7 || == 9.0.2 || == 9.2.8 || == 9.4.8 || == 9.6.6 || == 9.8.3 || == 9.10.1 category: Distribution, Nix homepage: https://github.com/NixOS/cabal2nix/tree/master/distribution-nixpkgs#readme bug-reports: https://github.com/NixOS/cabal2nix/issues diff --git a/distribution-nixpkgs/test/data/all-system-tuples.json b/distribution-nixpkgs/test/data/all-system-tuples.json index 275efc41..9748912d 100644 --- a/distribution-nixpkgs/test/data/all-system-tuples.json +++ b/distribution-nixpkgs/test/data/all-system-tuples.json @@ -1 +1 @@ -["aarch64-darwin","aarch64-genode","aarch64-linux","aarch64-netbsd","aarch64-none","aarch64_be-none","arm-none","armv5tel-linux","armv6l-linux","armv6l-netbsd","armv6l-none","armv7a-darwin","armv7a-linux","armv7a-netbsd","armv7l-linux","armv7l-netbsd","avr-none","i686-cygwin","i686-darwin","i686-freebsd","i686-genode","i686-linux","i686-netbsd","i686-none","i686-openbsd","i686-windows","javascript-ghcjs","loongarch64-linux","m68k-linux","m68k-netbsd","m68k-none","microblaze-linux","microblaze-none","microblazeel-linux","microblazeel-none","mips-linux","mips-none","mips64-linux","mips64-none","mips64el-linux","mipsel-linux","mipsel-netbsd","mmix-mmixware","msp430-none","or1k-none","powerpc-netbsd","powerpc-none","powerpc64-linux","powerpc64le-linux","powerpcle-none","riscv32-linux","riscv32-netbsd","riscv32-none","riscv64-linux","riscv64-netbsd","riscv64-none","rx-none","s390-linux","s390-none","s390x-linux","s390x-none","vc4-none","wasm32-wasi","wasm64-wasi","x86_64-cygwin","x86_64-darwin","x86_64-freebsd","x86_64-genode","x86_64-linux","x86_64-netbsd","x86_64-none","x86_64-openbsd","x86_64-redox","x86_64-solaris","x86_64-windows"] \ No newline at end of file +["aarch64-darwin","aarch64-genode","aarch64-linux","aarch64-netbsd","aarch64-none","aarch64_be-none","arm-none","armv5tel-linux","armv6l-linux","armv6l-netbsd","armv6l-none","armv7a-darwin","armv7a-linux","armv7a-netbsd","armv7l-linux","armv7l-netbsd","avr-none","i686-cygwin","i686-darwin","i686-freebsd","i686-genode","i686-linux","i686-netbsd","i686-none","i686-openbsd","i686-windows","javascript-ghcjs","loongarch64-linux","m68k-linux","m68k-netbsd","m68k-none","microblaze-linux","microblaze-none","microblazeel-linux","microblazeel-none","mips-linux","mips-none","mips64-linux","mips64-none","mips64el-linux","mipsel-linux","mipsel-netbsd","mmix-mmixware","msp430-none","or1k-none","powerpc-netbsd","powerpc-none","powerpc64-linux","powerpc64le-linux","powerpcle-none","riscv32-linux","riscv32-netbsd","riscv32-none","riscv64-linux","riscv64-netbsd","riscv64-none","rx-none","s390-linux","s390-none","s390x-linux","s390x-none","vc4-none","wasm32-none","wasm32-wasi","wasm64-wasi","x86_64-cygwin","x86_64-darwin","x86_64-freebsd","x86_64-genode","x86_64-linux","x86_64-netbsd","x86_64-none","x86_64-openbsd","x86_64-redox","x86_64-solaris","x86_64-windows"] \ No newline at end of file diff --git a/distribution-nixpkgs/test/hspec.hs b/distribution-nixpkgs/test/hspec.hs index d7f559e7..6c2e33d9 100644 --- a/distribution-nixpkgs/test/hspec.hs +++ b/distribution-nixpkgs/test/hspec.hs @@ -76,7 +76,11 @@ nixpkgsSystemMapping = , ("i686-openbsd", Platform I386 OpenBSD) , ("i686-windows", Platform I386 Windows) , ("javascript-ghcjs", Platform JavaScript Ghcjs) +#if MIN_VERSION_Cabal(3,12,0) + , ("loongarch64-linux", Platform LoongArch64 Linux) +#else , ("loongarch64-linux", Platform (OtherArch "loongarch64") Linux) +#endif , ("m68k-linux", Platform M68k Linux) , ("m68k-netbsd", Platform M68k NetBSD) , ("m68k-none", Platform M68k (OtherOS "none")) @@ -102,9 +106,15 @@ nixpkgsSystemMapping = , ("riscv32-linux", Platform (OtherArch "riscv32") Linux) , ("riscv32-netbsd", Platform (OtherArch "riscv32") NetBSD) , ("riscv32-none", Platform (OtherArch "riscv32") (OtherOS "none")) +#if MIN_VERSION_Cabal(3,12,0) + , ("riscv64-linux", Platform RISCV64 Linux) + , ("riscv64-netbsd", Platform RISCV64 NetBSD) + , ("riscv64-none", Platform RISCV64 (OtherOS "none")) +#else , ("riscv64-linux", Platform (OtherArch "riscv64") Linux) , ("riscv64-netbsd", Platform (OtherArch "riscv64") NetBSD) , ("riscv64-none", Platform (OtherArch "riscv64") (OtherOS "none")) +#endif , ("rx-none", Platform (OtherArch "rx") (OtherOS "none")) , ("s390-linux", Platform S390 Linux) , ("s390-none", Platform S390 (OtherOS "none")) @@ -117,9 +127,11 @@ nixpkgsSystemMapping = #endif , ("vc4-none", Platform (OtherArch "vc4") (OtherOS "none")) #if MIN_VERSION_Cabal(3,8,1) + , ("wasm32-none", Platform Wasm32 (OtherOS "none")) , ("wasm32-wasi", Platform Wasm32 Wasi) , ("wasm64-wasi", Platform (OtherArch "wasm64") Wasi) #else + , ("wasm32-none", Platform (OtherArch "wasm32") (OtherOS "none")) , ("wasm32-wasi", Platform (OtherArch "wasm32") (OtherOS "wasi")) , ("wasm64-wasi", Platform (OtherArch "wasm64") (OtherOS "wasi")) #endif diff --git a/hackage-db/hackage-db.cabal b/hackage-db/hackage-db.cabal index b4814f7e..b3c4e897 100644 --- a/hackage-db/hackage-db.cabal +++ b/hackage-db/hackage-db.cabal @@ -9,7 +9,7 @@ license: BSD3 license-file: LICENSE author: Peter Simons, Alexander Altman, Ben James, Kevin Quick maintainer: sternenseemann -tested-with: GHC == 8.10.7 || == 9.0.2 || == 9.2.8 || == 9.4.8 || == 9.6.5 +tested-with: GHC == 8.10.7 || == 9.0.2 || == 9.2.8 || == 9.4.8 || == 9.6.6 || == 9.8.3 || == 9.10.1 category: Distribution homepage: https://github.com/NixOS/cabal2nix/tree/master/hackage-db#readme bug-reports: https://github.com/NixOS/cabal2nix/issues diff --git a/language-nix/language-nix.cabal b/language-nix/language-nix.cabal index 63f6135f..d9d0617a 100644 --- a/language-nix/language-nix.cabal +++ b/language-nix/language-nix.cabal @@ -7,7 +7,7 @@ license: BSD3 license-file: LICENSE author: Peter Simons maintainer: simons@cryp.to -tested-with: GHC == 8.10.7, GHC == 9.0.2, GHC == 9.2.8, GHC == 9.4.8, GHC == 9.6.5 +tested-with: GHC == 8.10.7, GHC == 9.0.2, GHC == 9.2.8, GHC == 9.4.8, GHC == 9.6.6 || == 9.8.3 || == 9.10.1 category: Distribution, Language, Nix homepage: https://github.com/NixOS/cabal2nix/tree/master/language-nix#readme bug-reports: https://github.com/NixOS/cabal2nix/issues