diff --git a/.circleci/config.yml b/.circleci/config.yml index a68afcfbd4..a5718b5526 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -57,7 +57,7 @@ env: &env # If you have not committed packcheck.sh in your repo at PACKCHECK # then it is automatically pulled from this URL. PACKCHECK_GITHUB_URL: "https://raw.githubusercontent.com/composewell/packcheck" - PACKCHECK_GITHUB_COMMIT: "e575ff318c93add2a6d3f9107a52c5e37c666a98" + PACKCHECK_GITHUB_COMMIT: "dd6862df527f317fd4987afa523fba3f4fde7e19" executors: amd64-executor: diff --git a/.cirrus.yml b/.cirrus.yml index 888cf88f08..6dfe6d7f3c 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -1,54 +1,82 @@ freebsd_instance: - image_family: freebsd-14-2 + image_family: freebsd-14-3 task: - name: FreeBSD+ghc-9.6.6+cabal + name: FreeBSD+ghc-9.10.3+cabal env: - LC_ALL: C.UTF-8 - BUILD: cabal - GHCUP_VERSION: 0.1.40.0 - DOCSPEC_URL: https://github.com/phadej/cabal-extras/releases/download/cabal-docspec-0.0.0.20210111/cabal-docspec-0.0.0.20210111.xz - DOCSPEC_OPTIONS: "--timeout 60 --check-properties --property-variables xs" - # GHCUP_GHC_OPTIONS: ${{ matrix.ghcup_ghc_options }} - GHCVER: 9.6.6 - CABALVER: 3.10.1.0 - DISABLE_DOCS: n - ENABLE_DOCSPEC: n - DISABLE_TEST: n - DISABLE_BENCH: n - DISABLE_DIST_CHECKS: y - # SDIST_OPTIONS: ${{ matrix.sdist_options }} - DISABLE_SDIST_BUILD: y + PACKCHECK_COMMAND: cabal - # Cabal options + # ------------------------------------------------------------------------ + # Common options + # ------------------------------------------------------------------------ CABAL_REINIT_CONFIG: y - # CABAL_BUILD_OPTIONS: ${{ matrix.cabal_build_options }} --flag limit-build-mem - # CABAL_BUILD_TARGETS: ${{ matrix.cabal_build_targets }} - CABAL_PROJECT: cabal.project - CABAL_CHECK_RELAX: y + LC_ALL: C.UTF-8 + + # ------------------------------------------------------------------------ + # What to build + # ------------------------------------------------------------------------ + # DISABLE_TEST: "y" + # DISABLE_BENCH: "y" + # DISABLE_DOCS: "y" + DISABLE_SDIST_BUILD: "y" + # DISABLE_SDIST_GIT_CHECK: "y" + DISABLE_DIST_CHECKS: "y" + + # ------------------------------------------------------------------------ + # Selecting tool versions + # ------------------------------------------------------------------------ + # For updating see: https://downloads.haskell.org/~ghcup/ + GHCUP_VERSION: 0.1.50.2 + GHCVER: 9.10.3 - # Stack options - # STACK_UPGRADE: "y" - # RESOLVER: ${{ matrix.resolver }} - # STACK_YAML: ${{ matrix.stack_yaml }} - # STACK_BUILD_OPTIONS: ${{ matrix.stack_build_options }} + # ------------------------------------------------------------------------ + # stack options (if using stack builds) + # ------------------------------------------------------------------------ + # Note requiring a specific version of stack using STACKVER may fail due to + # github API limit while checking and upgrading/downgrading to the specific + # version. + #STACKVER: "1.6.5" + #STACK_UPGRADE: "y" + #STACK_YAML: "stack.yaml" - # packcheck location and revision + # ------------------------------------------------------------------------ + # cabal options + # ------------------------------------------------------------------------ + CABAL_CHECK_RELAX: y + CABAL_PROJECT: cabal.project + + # ------------------------------------------------------------------------ + # Location of packcheck.sh (the shell script invoked to perform CI tests ). + # ------------------------------------------------------------------------ + # You can either commit the packcheck.sh script at this path in your repo or + # you can use it by specifying the PACKCHECK_REPO_URL option below in which + # case it will be automatically copied from the packcheck repo to this path + # during CI tests. In any case it is finally invoked from this path. PACKCHECK: "./packcheck.sh" + # If you have not committed packcheck.sh in your repo at PACKCHECK + # then it is automatically pulled from this URL. PACKCHECK_GITHUB_URL: "https://raw.githubusercontent.com/composewell/packcheck" - PACKCHECK_GITHUB_COMMIT: "v0.7.1" + PACKCHECK_GITHUB_COMMIT: "dd6862df527f317fd4987afa523fba3f4fde7e19" + + ghcup_cache: + folder: ~/.ghcup + fingerprint_script: echo $GHCUP_VERSION $GHCVER + + cabal_packages_cache: + folder: ~/.cabal/packages + fingerprint_script: echo $GHCVER - # Pull token from "secrets" setting of the github repo - # COVERALLS_TOKEN: ${{ secrets.COVERALLS_TOKEN }} - # COVERAGE: ${{ matrix.coverage }} + cabal_cache: + folder: ~/.cabal/store + fingerprint_script: echo $GHCVER - # hlint - # HLINT_VERSION: 3.6.1 - # HLINT_OPTIONS: "lint" - # HLINT_TARGETS: "core/src src test benchmark" + #local_cache: + # folder: ~/.local + # fingerprint_script: echo $GHCVER - # Subdir - # SUBDIR: ${{ matrix.subdir }} + #local_bin_cache: + # folder: ~/.local/bin + # fingerprint_script: echo $HLINT_VERSION deps_install_script: | pkg install -y gmake @@ -70,5 +98,9 @@ task: fi packcheck_run_script: | - export PATH=$HOME/.local/bin:$HOME/.ghcup/bin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/opt/curl/bin - bash -c "$PACKCHECK $BUILD" + # Commands like mount, sysctl for info require sbin + PTH=/usr/local/bin:/usr/bin:/bin:/sbin:/usr/sbin + # Use "bash -c" instead of invoking directly to preserve quoted + # arguments in PACKCHECK_COMMAND e.g. DOCSPEC_OPTIONS="--timeout 60". + # Direct invocation would word-split on spaces inside quoted values. + bash -c "$PACKCHECK $PACKCHECK_COMMAND PATH=$PTH" diff --git a/.github/workflows/haskell.yml b/.github/workflows/haskell.yml index edbc1ec3b7..c68ca00876 100644 --- a/.github/workflows/haskell.yml +++ b/.github/workflows/haskell.yml @@ -1,274 +1,408 @@ -name: Haskell CI +# packcheck-0.7.1 +# You can use any of the options supported by packcheck as environment +# variables here. See https://github.com/composewell/packcheck for all +# options and their explanation. + +name: TEST + +#----------------------------------------------------------------------------- +# Events on which the build should be triggered +#----------------------------------------------------------------------------- on: + workflow_dispatch: + pull_request: push: branches: - master - pull_request: + +#----------------------------------------------------------------------------- +# Build matrix +#----------------------------------------------------------------------------- jobs: build: - name: GHC ${{matrix.name}} + name: >- + ${{ matrix.runner }} + ${{ matrix.command }} + ${{ matrix.ghc_version }} + ${{ matrix.name }} env: - # packcheck environment variables + # ------------------------------------------------------------------------ + # Common options + # ------------------------------------------------------------------------ + CABAL_REINIT_CONFIG: y LC_ALL: C.UTF-8 - BUILD: ${{ matrix.build }} + + # ------------------------------------------------------------------------ + # What to build + # ------------------------------------------------------------------------ + # DISABLE_TEST: "y" + # DISABLE_BENCH: "y" + # DISABLE_DOCS: "y" + # DISABLE_SDIST_BUILD: "y" + # DISABLE_SDIST_GIT_CHECK: "y" + # DISABLE_DIST_CHECKS: "y" + + # ------------------------------------------------------------------------ + # Selecting tool versions + # ------------------------------------------------------------------------ # For updating see: https://downloads.haskell.org/~ghcup/ GHCUP_VERSION: 0.1.50.2 - DOCSPEC_URL: https://github.com/phadej/cabal-extras/releases/download/cabal-docspec-0.0.0.20210111/cabal-docspec-0.0.0.20210111.xz - DOCSPEC_OPTIONS: "--timeout 60 --check-properties --property-variables xs" - GHCUP_GHC_OPTIONS: ${{ matrix.ghcup_ghc_options }} GHCVER: ${{ matrix.ghc_version }} - CABALVER: ${{ matrix.cabal_version }} - DISABLE_DOCS: ${{ matrix.disable_docs }} - ENABLE_DOCSPEC: ${{ matrix.enable_docspec }} - DISABLE_TEST: ${{ matrix.disable_test }} - DISABLE_BENCH: ${{ matrix.disable_bench }} - DISABLE_DIST_CHECKS: ${{ matrix.disable_dist_checks }} - SDIST_OPTIONS: ${{ matrix.sdist_options }} - DISABLE_SDIST_BUILD: ${{ matrix.disable_sdist_build }} - - # Cabal options - CABAL_REINIT_CONFIG: y - # Github has machines with 2 CPUS and 6GB memory so the cabal jobs - # default (ncpus) is good, this can be checked from the packcheck - # output in case it changes. - CABAL_BUILD_OPTIONS: ${{ matrix.cabal_build_options }} - CABAL_BUILD_TARGETS: ${{ matrix.cabal_build_targets }} - CABAL_PROJECT: ${{ matrix.cabal_project }} + + # ------------------------------------------------------------------------ + # cabal options + # ------------------------------------------------------------------------ CABAL_CHECK_RELAX: y - # Stack options - STACK_UPGRADE: "y" - RESOLVER: ${{ matrix.resolver }} - STACK_YAML: ${{ matrix.stack_yaml }} - STACK_BUILD_OPTIONS: ${{ matrix.stack_build_options }} + # CABAL_BUILD_OPTIONS="-j1" + # Enable the above option if you: + # 1. want logs in serial order to be able to correlate them better. + # + # 2. run into memory issues due to Build paralellism. We need to + # have sufficient per CPU memory, if not we can use a lower -j + # option; cabal default is ncpus. + # + # Currently (2026-03-12) from packcheck output we see: + # Linux: 15GB, 4 cpus + # macOS: 7GB, 3 cpus + # Windows: 16GB, 4 cpus + + # ------------------------------------------------------------------------ + # stack options (if using stack builds) + # ------------------------------------------------------------------------ + # Note requiring a specific version of stack using STACKVER may fail due to + # github API limit while checking and upgrading/downgrading to the specific + # version. + #STACKVER: "1.6.5" + #STACK_UPGRADE: "y" + STACK_YAML: "stack.yaml" - # packcheck location and revision + # ------------------------------------------------------------------------ + # Location of packcheck.sh (the shell script invoked to perform CI tests ). + # ------------------------------------------------------------------------ + # You can either commit the packcheck.sh script at this path in your repo or + # you can use it by specifying the PACKCHECK_REPO_URL option below in which + # case it will be automatically copied from the packcheck repo to this path + # during CI tests. In any case it is finally invoked from this path. PACKCHECK: "./packcheck.sh" + # If you have not committed packcheck.sh in your repo at PACKCHECK + # then it is automatically pulled from this URL. PACKCHECK_GITHUB_URL: "https://raw.githubusercontent.com/composewell/packcheck" - PACKCHECK_GITHUB_COMMIT: "8c61fb67ee860ad86049ab17e31bfa8f368b73cf" + PACKCHECK_GITHUB_COMMIT: "dd6862df527f317fd4987afa523fba3f4fde7e19" - # Pull token from "secrets" setting of the github repo - COVERALLS_TOKEN: ${{ secrets.COVERALLS_TOKEN }} - COVERAGE: ${{ matrix.coverage }} - - # hlint - HLINT_VERSION: 3.6.1 - HLINT_OPTIONS: "lint" - HLINT_TARGETS: "core/src src test benchmark" + # ------------------------------------------------------------------------ + # Final build variables + # ------------------------------------------------------------------------ + PACKCHECK_COMMAND: ${{ matrix.command }} ${{ matrix.pack_options }} # Subdir SUBDIR: ${{ matrix.subdir }} + # Pull token from "secrets" setting of the github repo + #COVERALLS_TOKEN: ${{ secrets.COVERALLS_TOKEN }} + #COVERAGE: ${{ matrix.coverage }} + + # ubuntu seems to have better support than debian on CI systems runs-on: ${{ matrix.runner }} continue-on-error: ${{ matrix.ignore_error }} strategy: - fail-fast: true + fail-fast: false matrix: - # The order is important to optimize fail-fast. + + # The order of jobs is important to optimize fail-fast. + + # This section is to order the important jobs first especially for + # "fail-fast" so that these are the ones started first. name: - - 9.10.3-Werror - # - 9.8.1-docspec - # - 8.10.7-coverage + - werror + + # The name of the CI is built using the name and other info from CI, + # therefore, the "name" field can be same for all tests here. + # + # The reason we have an explicit "name" field here is to force + # an additional config instead of adding to an existing config + # while adding additional configs. + # Look at + # for more info about adding matrix elements. + # Adding any element to the list will increase the number of matrix + # elements proportional to the cross product. - # Note: if cabal.project is not specified benchmarks and tests won't - # run. But we need at least one test where we test without - # cabal.project because that is how hackage would build it. + # Note: if cabal.project is not specified then benchmarks and + # tests won't run. But we need at least one test where we test + # without cabal.project because that is how hackage would build + # it. include: - - name: head - ghc_version: head - # The URL may change, to find a working URL go to https://gitlab.haskell.org/ghc/ghc/-/jobs/ - # Find a debian10/11/12 job, click on a passed/failed status, at the - # end of the output you will find the tar.xz name, put that tar - # name after "raw/", and put the job name after "job=". - # Also see https://github.com/mpickering/ghc-artefact-nix/blob/master/gitlab-artifact.nix - # - # May also use ghcup for installing ghc head version, use the - # version "LatestNightly", and the following config: - # ghcup config add-release-channel https://ghc.gitlab.haskell.org/ghcup-metadata/ghcup-nightlies-0.0.7.yaml - ghcup_ghc_options: "-u https://gitlab.haskell.org/ghc/ghc/-/jobs/artifacts/master/raw/ghc-x86_64-linux-deb10-int_native-validate.tar.xz?job=x86_64-linux-deb10-int_native-validate" - runner: ubuntu-latest - build: cabal - cabal_build_options: "--flag limit-build-mem" - cabal_version: 3.12.1.0 - cabal_project: cabal.project.ghc-head - disable_sdist_build: "y" - ignore_error: true - - name: 9.12.1 - ghc_version: 9.12.1 + + #- name: ci + # runner: ubuntu-latest + # command: cabal + # ghc_version: head + # # The URL may change, to find a working URL go to https://gitlab.haskell.org/ghc/ghc/-/jobs/ + # # Find a debian10/11/12 job, click on a passed/failed status, at the + # # end of the output you will find the tar.xz name, put that tar + # # name after "raw/", and put the job name after "job=". + # # Also see https://github.com/mpickering/ghc-artefact-nix/blob/master/gitlab-artifact.nix + # # + # # May also use ghcup for installing ghc head version, use the + # # version "LatestNightly", and the following config: + # # ghcup config add-release-channel https://ghc.gitlab.haskell.org/ghcup-metadata/ghcup-nightlies-0.0.7.yaml + # # WARNING! cannot use # comments inside pack_options. + # pack_options: >- + # GHCUP_GHC_OPTIONS="-u https://gitlab.haskell.org/ghc/ghc/-/jobs/artifacts/master/raw/ghc-x86_64-linux-deb10-int_native-validate.tar.xz?job=x86_64-linux-deb10-int_native-validate" + # CABAL_PROJECT=cabal.project.ghc-head + # CABAL_BUILD_OPTIONS="--flag limit-build-mem" + # DISABLE_SDIST_BUILD="y" + # ignore_error: true + + - name: streamly-core-sdist runner: ubuntu-latest - build: cabal - cabal_build_options: "--flag limit-build-mem --flag fusion-plugin" - cabal_version: 3.12.1.0 - disable_sdist_build: "y" - cabal_project: cabal.project + command: cabal + ghc_version: 9.14.1 + subdir: core ignore_error: false - # Note: use linux for warning build for convenient dev testing - - name: 9.10.3-Werror - ghc_version: 9.10.3 - runner: ubuntu-latest - build: cabal - cabal_build_options: "--flag limit-build-mem" - cabal_version: 3.12.1.0 - disable_sdist_build: "y" - cabal_project: cabal.project.Werror + + - name: debug-unoptimized + runner: macos-latest + command: cabal + ghc_version: 9.14.1 + # WARNING! cannot use # comments inside pack_options. + pack_options: >- + CABAL_PROJECT=cabal.project + CABAL_BUILD_OPTIONS="--flag debug --flag -opt" + DISABLE_SDIST_BUILD="y" + DISABLE_DOCS="y" + DISABLE_BENCH="y" ignore_error: false - - name: 9.10.3-macos - ghc_version: 9.10.3 + + # Takes too long, so bench is disabled + - name: ghc-9.12.3 runner: macos-latest - build: cabal - cabal_build_options: "--flag limit-build-mem" - cabal_version: 3.12.1.0 - disable_sdist_build: "y" - cabal_project: cabal.project + command: stack + # WARNING! cannot use # comments inside pack_options. + pack_options: >- + CABALVER=3.14.2.0 + STACK_UPGRADE="y" + RESOLVER=nightly-2026-03-10 + STACK_YAML=stack.yaml + DISABLE_SDIST_BUILD="y" + SDIST_OPTIONS="--ignore-check" + DISABLE_DIST_CHECKS="y" + DISABLE_DOCS="y" + DISABLE_BENCH="y" ignore_error: false - - name: 9.10.3-fusion-inspection - ghc_version: 9.10.3 + + - name: fusion runner: ubuntu-latest - build: cabal - cabal_version: 3.12.1.0 - disable_sdist_build: "y" - cabal_project: cabal.project - cabal_build_options: "--flag fusion-plugin --flag inspection" + command: cabal + ghc_version: 9.12.2 + # WARNING! cannot use # comments inside pack_options. + pack_options: >- + CABAL_PROJECT=cabal.project + CABAL_BUILD_OPTIONS="--flag limit-build-mem --flag fusion-plugin" + DISABLE_SDIST_BUILD="y" + DISABLE_DOCS="y" + DISABLE_BENCH="y" ignore_error: false - - name: 9.8.2-macos-stack - runner: macos-latest - build: stack - resolver: nightly-2024-09-26 - stack_yaml: stack.yaml - disable_docs: "y" - disable_sdist_build: "y" - disable_dist_checks: "y" - disable_test: "y" - disable_bench: "y" - #sdist_options: "--ignore-check" - stack_build_options: "-v" - cabal_version: 3.12.1.0 - ignore_error: true - # - name: 9.8.1-docspec - # ghc_version: 9.8.1 - # runner: ubuntu-latest - # build: cabal - # cabal_version: 3.10.1.0 - # cabal_project: cabal.project.doctest - # disable_test: "y" - # disable_bench: "y" - # disable_docs: "y" - # enable_docspec: "y" - # disable_sdist_build: "y" - # ignore_error: false - - name: 9.8.1-fusion-inspection - ghc_version: 9.8.1 + + # Note: use linux for warning build for convenient dev testing + - name: werror runner: ubuntu-latest - build: cabal - cabal_version: 3.12.1.0 - disable_sdist_build: "y" - cabal_project: cabal.project - cabal_build_options: "--flag fusion-plugin --flag inspection" + command: cabal + ghc_version: 9.10.3 + # WARNING! cannot use # comments inside pack_options. + pack_options: >- + CABAL_PROJECT=cabal.project.Werror + CABAL_BUILD_OPTIONS="--flag limit-build-mem" + DISABLE_SDIST_BUILD="y" + DISABLE_BENCH="y" ignore_error: false - - name: 9.6.3-macos - ghc_version: 9.6.3 - runner: macos-latest - build: cabal - cabal_version: 3.10.1.0 - disable_sdist_build: "y" - cabal_project: cabal.project - ignore_error: true - - name: 9.4.7-lstat-readir - ghc_version: 9.4.7 + + - name: fusion-inspection runner: ubuntu-latest - build: cabal - cabal_build_options: "--flag force-lstat-readdir" - cabal_version: 3.8.1.0 - disable_sdist_build: "y" - cabal_project: cabal.project + command: cabal + ghc_version: 9.10.3 + # WARNING! cannot use # comments inside pack_options. + pack_options: >- + CABAL_PROJECT=cabal.project + CABAL_BUILD_OPTIONS="--flag fusion-plugin --flag inspection" + DISABLE_SDIST_BUILD="y" + DISABLE_DOCS="y" ignore_error: false - - name: 9.2.8 - ghc_version: 9.2.8 - ghcup_ghc_options: "-u https://s3.ap-south-1.amazonaws.com/downloads.portal.composewell.com/ghc/ghc-9.2.8-x86_64-unknown-linux.tar.xz" + + - name: ci runner: ubuntu-latest - build: cabal - cabal_project: cabal.project - cabal_version: 3.6.2.0 - disable_sdist_build: "y" + command: cabal + ghc_version: 9.8.4 + # WARNING! cannot use # comments inside pack_options. + pack_options: >- + CABAL_PROJECT=cabal.project + DISABLE_SDIST_BUILD="y" + DISABLE_DOCS="y" + DISABLE_BENCH="y" ignore_error: false - - name: 9.0.2-streamly-sdist - ghc_version: 9.0.2 + + - name: streamly-sdist runner: ubuntu-latest - build: cabal - cabal_version: 3.6.2.0 - cabal_project: cabal.project.streamly + command: cabal + ghc_version: 9.6.3 + # WARNING! cannot use # comments inside pack_options. + pack_options: >- + CABAL_PROJECT=cabal.project.streamly ignore_error: true - - name: 9.0.2-streamly-core-sdist - ghc_version: 9.0.2 + + - name: lstat-readdir runner: ubuntu-latest - build: cabal - cabal_version: 3.6.2.0 - subdir: core + command: cabal + ghc_version: 9.4.7 + # WARNING! cannot use # comments inside pack_options. + pack_options: >- + CABAL_PROJECT=cabal.project + CABAL_BUILD_OPTIONS="--flag force-lstat-readdir" + DISABLE_SDIST_BUILD="y" + DISABLE_DOCS="y" + DISABLE_BENCH="y" ignore_error: false - - name: 8.10.7-noopt - ghc_version: 8.10.7 + + - name: ci runner: ubuntu-latest - build: cabal - cabal_version: 3.6.2.0 - cabal_project: cabal.project - disable_sdist_build: "y" - disable_docs: "y" - disable_dist_checks: "y" - cabal_build_options: "--flags \"-opt\"" + command: cabal + ghc_version: 9.2.8 + # WARNING! cannot use # comments inside pack_options. + # GHCUP_GHC_OPTIONS="-u https://s3.ap-south-1.amazonaws.com/downloads.portal.composewell.com/ghc/ghc-9.2.8-x86_64-unknown-linux.tar.xz" + pack_options: >- + CABAL_PROJECT=cabal.project + DISABLE_SDIST_BUILD="y" + DISABLE_DOCS="y" + DISABLE_BENCH="y" ignore_error: false - # - name: 8.10.7-coverage - # ghc_version: 8.10.7 - # runner: ubuntu-latest - # coverage: "y" - # cabal_version: 3.6.2.0 - # ignore_error: false - - name: 8.8.4 - ghc_version: 8.8.4 + + - name: unoptimized runner: ubuntu-latest - build: cabal - cabal_version: 3.6.2.0 - cabal_project: cabal.project - disable_sdist_build: "y" - disable_docs: "y" + command: cabal + ghc_version: 8.10.7 + # WARNING! cannot use # comments inside pack_options. + pack_options: >- + CABAL_PROJECT=cabal.project + DISABLE_SDIST_BUILD="y" + DISABLE_DOCS="y" + DISABLE_BENCH="y" + DISABLE_DIST_CHECKS="y" + CABAL_BUILD_OPTIONS="--flags \"-opt\"" ignore_error: false - - name: 8.6.5-debug-unoptimized - ghc_version: 8.6.5 - runner: ubuntu-latest - build: cabal - cabal_version: 3.6.2.0 - cabal_project: cabal.project - cabal_build_options: "--flag debug --flag -opt" - disable_sdist_build: "y" - disable_docs: "y" + + - name: ci + runner: windows-latest + command: cabal + ghc_version: 9.10.3 + # WARNING! cannot use # comments inside pack_options. + pack_options: >- + CABAL_PROJECT=cabal.project + CABAL_BUILD_OPTIONS="--flag limit-build-mem" + DISABLE_SDIST_BUILD="y" ignore_error: false - # - name: hlint - # build: hlint - # runner: ubuntu-latest - # ignore_error: true + + #- name: ci + # runner: ubuntu-latest + # command: hlint + # # WARNING! cannot use # comments inside pack_options. + # pack_options: >- + # HLINT_VERSION=3.6.1 + # HLINT_OPTIONS="lint" + # HLINT_TARGETS="src" + # ignore_error: false + + # NOTE: need to expose other-modules in cabal to doctest those + #- name: docspec + # runner: ubuntu-latest + # command: cabal + # ghc_version: 9.12.2 + # # WARNING! cannot use # comments inside pack_options. + # pack_options: >- + # DISABLE_SDIST_BUILD="y" + # DISABLE_TEST="y" + # DISABLE_BENCH="y" + # DISABLE_DOCS="y" + # ENABLE_DOCSPEC="y" + # DOCSPEC_URL=https://github.com/phadej/cabal-extras/releases/download/cabal-docspec-0.0.0.20210111/cabal-docspec-0.0.0.20210111.xz + # DOCSPEC_OPTIONS="--timeout 60 --check-properties --property-variables xs" + # CABAL_PROJECT="cabal.project.doctest" + # ignore_error: false + + # - name: 8.10.7-coverage + # ghc_version: 8.10.7 + # runner: ubuntu-latest + # coverage: "y" + # cabal_version: 3.6.2.0 + # ignore_error: false steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - - uses: actions/cache@v4 - name: Cache common directories + # This should happen before cache restore. + - name: Remove ~/.ghcup symlink (non-Windows) + if: runner.os != 'Windows' + run: | + rm -f ~/.ghcup + + - name: Cache hackage package index (non-Windows) + uses: actions/cache@v4 + if: runner.os != 'Windows' + with: + path: | + ~/.cache/cabal/packages + # Bump the key version to clear the cache + key: cache-cabal-packages + + # See the "cabal path" output in the CI logs to tweak the cache locations + # ghc is big but cheap to install, if cache size is a concern we can avoid + # caching it. + - name: Cache ghcup and ghc (non-Windows) + uses: actions/cache@v4 + if: runner.os != 'Windows' with: path: | - ~/.local - ~/.cabal - ~/.stack ~/.ghcup + key: ${{ matrix.runner }}-ghcup-${{ env.GHCUP_VERSION }}-${{ matrix.ghc_version }} + + # XXX If we want to invalidate the cache on resolver change we + # should use a separate cache for stack as it should be keyed on + # resolver as well. But that requires resolver as a matrix element + # and then copied to pack_options from there, needs some work. It + # should be fine as resolver minor version change can only increase + # the cache size. + - name: Cache build dependencies (non-Windows) + uses: actions/cache@v4 + if: runner.os != 'Windows' + with: + # cabal: ~/.local/bin, ~/.local/state/cabal + path: | + ~/.local/bin + ~/.local/state/cabal + ~/.stack # Bump the key version to clear the cache - key: ${{ runner.os }}-${{ matrix.ghc_version }}-cabal-v2 + key: ${{ matrix.runner }}-${{ matrix.command }}-${{ matrix.ghc_version }}-${{ matrix.name }} + + - name: Cache common directories (Windows) + uses: actions/cache@v4 + if: runner.os == 'Windows' + with: + path: | + ${{ env.APPDATA }}/local + C:/ghcup + C:/cabal + key: ${{ matrix.runner }}-${{ matrix.command }}-${{ matrix.ghc_version }}-${{ matrix.name }}-v1 - name: Download packcheck + # on windows-latest GitHub Actions defaults to PowerShell + shell: bash run: | if test ! -e "$PACKCHECK" then if test -z "$PACKCHECK_GITHUB_COMMIT" then - die "PACKCHECK_GITHUB_COMMIT is not specified." + die "PACKCHECK_GITHUB_COMMIT env var is not specified." fi PACKCHECK_URL=${PACKCHECK_GITHUB_URL}/${PACKCHECK_GITHUB_COMMIT}/packcheck.sh curl --fail -sL -o "$PACKCHECK" $PACKCHECK_URL || exit 1 @@ -278,30 +412,64 @@ jobs: chmod +x $PACKCHECK fi - - name: Run tests + - name: Run packcheck + # on windows-latest GitHub Actions defaults to PowerShell + shell: bash run: | - if test -n "$COVERAGE" + #if test -n "$COVERAGE" + #then + # # Run tests with coverage + # cabal update + # # Build hpc-coveralls if needed + # sudo apt-get install -y libcurl4-gnutls-dev + # export PATH=$HOME/.cabal/bin:$PATH + # which hpc-coveralls 2>/dev/null || cabal install --project-file cabal.project.hpc-coveralls hpc-coveralls + # # Run tests and upload results to coveralls.io + # bin/test.sh --coverage --raw + # # XXX Uncomment this and fix it properly later + # # hpc-coveralls --repo-token="$COVERALLS_TOKEN" --coverage-mode=StrictlyFullLines + #fi + + if test -n "$SUBDIR" then - # Run tests with coverage - cabal update - # Build hpc-coveralls if needed - sudo apt-get install -y libcurl4-gnutls-dev - export PATH=$HOME/.cabal/bin:$PATH - which hpc-coveralls 2>/dev/null || cabal install --project-file cabal.project.hpc-coveralls hpc-coveralls - # Run tests and upload results to coveralls.io - bin/test.sh --coverage --raw - # XXX Uncomment this and fix it properly later - # hpc-coveralls --repo-token="$COVERALLS_TOKEN" --coverage-mode=StrictlyFullLines - else - # /usr/local/opt/curl/bin for macOS - export PATH=$HOME/.local/bin:$HOME/.ghcup/bin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/opt/curl/bin - if test -n "$SUBDIR" - then - mv "$PACKCHECK" "$SUBDIR/packcheck.sh" - # This is required as dist-newstyle will be created on the top level - # directory as it is considered the working dir. - rm cabal.project - cd "$SUBDIR" - fi - bash -c "$PACKCHECK $BUILD" + mv "$PACKCHECK" "$SUBDIR/packcheck.sh" + # This is required otherwise dist-newstyle will be created in + # the top level directory as it is considered the working dir. + rm cabal.project + cd "$SUBDIR" fi + # Commands like mount, sysctl for info require sbin + PATH_VAR=/bin:/usr/bin:/sbin:/usr/sbin + case "$(uname)" in + Linux) + # On Linux it defaults to /usr/local, during cache restore + # tar is unable to change permissions and restore fails. + export GHCUP_INSTALL_BASE_PREFIX=$HOME + ;; + CYGWIN*|MINGW*|MSYS*) + PATH_VAR="$PATH_VAR:/c/Program Files/7-Zip:/mingw64/bin" + ;; + esac + # Use "bash -c" instead of invoking directly to preserve quoted + # arguments in PACKCHECK_COMMAND e.g. DOCSPEC_OPTIONS="--timeout 60". + # Direct invocation would word-split on spaces inside quoted values. + echo "$PACKCHECK $PACKCHECK_COMMAND PATH=\"$PATH_VAR\"" + bash -c "$PACKCHECK $PACKCHECK_COMMAND PATH=\"$PATH_VAR\"" + + - name: Check cache locations + if: runner.os != 'Windows' + run: | + # We want to see if it is a symlink; e.g. on github ~/.ghcup is a + # pre-existing symlink to /usr/local. + list="$HOME/.local/bin $HOME/.local/state/cabal $HOME/.ghcup $HOME/.stack" + for dir in $list; do + # macOS does not have --no-dereference option + if [ -L "$dir" ]; then + echo "$dir is a symlink -> $(readlink $dir)" + else + du -sh "$dir" 2>/dev/null || echo "$dir missing" + fi + done + echo + #ls -ld $list 2>/dev/null || true + ls -al $list 2>/dev/null || true diff --git a/.github/workflows/markdown-doctest.yml b/.github/workflows/markdown-doctest.yml index 15fac70ecc..f55e236e10 100644 --- a/.github/workflows/markdown-doctest.yml +++ b/.github/workflows/markdown-doctest.yml @@ -1,42 +1,99 @@ -name: Markdown Doctest +name: DOCS -on: pull_request +on: + workflow_dispatch: + pull_request: jobs: markdown-doctest: + name: "Verify haskell snippets in markdown docs" + env: + GHCVER: 9.8.4 + GHCUP_VERSION: 0.1.50.2 runs-on: ubuntu-latest steps: - - name: Download ghc + # This should happen before cache restore. + - name: Remove ~/.ghcup symlink run: | - GHCUP_VER=0.1.20.0 - curl -sL -o ./ghcup https://downloads.haskell.org/~ghcup/$GHCUP_VER/x86_64-linux-ghcup-$GHCUP_VER - chmod +x ./ghcup - GHCVER=9.8.1 - ./ghcup install ghc $GHCVER - ./ghcup set ghc $GHCVER - cabal update + rm -f ~/.ghcup + + - name: Cache ghcup and ghc (non-Windows) + uses: actions/cache@v4 + if: runner.os != 'Windows' + with: + path: | + ~/.ghcup + key: ${{ runner.os }}-ghcup-${{ env.GHCUP_VERSION }}-${{ env.GHCVER }} - - uses: actions/cache@v4 - name: Cache ~/.cabal + - name: Cache hackage package index (non-Windows) + uses: actions/cache@v4 + if: runner.os != 'Windows' with: path: | - ~/.cabal + ~/.cache/cabal/packages # Bump the key version to clear the cache - key: cache-v2 + key: cache-cabal-packages + + # NOTE: we need the cabal state as well because the executable may depend + # on shared libraries in the cabal store. + - name: Cache markdown-doctest (non-Windows) + uses: actions/cache@v4 + if: runner.os != 'Windows' + with: + path: | + ~/.local/state/cabal + ~/.local/bin + # Bump the key version to clear the cache + key: markdown-doctest-ghc-${{ env.GHCVER }} - uses: actions/checkout@v4 with: ref: ${{ github.event.pull_request.head.sha }} - - name: Create env files for ghci - run: cabal build streamly --write-ghc-environment-files=always + # Use a sane PATH, especially to pick the right GHC + - name: Set PATH to add .local and .ghcup + run: echo "$HOME/.local/bin:$HOME/.ghcup/bin:/bin:/usr/bin" > $GITHUB_PATH + + - name: Download ghc + run: | + if ! ghc --version 2>/dev/null | grep -q "$GHCVER" + then + curl -sL -o ./ghcup https://downloads.haskell.org/~ghcup/$GHCUP_VERSION/x86_64-linux-ghcup-$GHCUP_VERSION + chmod +x ./ghcup + export GHCUP_INSTALL_BASE_PREFIX=$HOME + ./ghcup install ghc $GHCVER + ./ghcup set ghc $GHCVER + ./ghcup install cabal + fi + # XXX update only if not present + cabal update - name: Run markdown-doctest run: | - echo "Commit: $(git rev-parse HEAD)" - cabal install markdown-doctest --project-file=cabal.project.markdown-doctest --installdir=./ --overwrite-policy=always - find ./docs -type f -name "*.md" -print0 | while IFS= read -r -d '' file; do echo "CMD: ./markdown-doctest $file" && ./markdown-doctest "$file" || exit 1; done - find ./core/docs -type f -name "*.md" -print0 | while IFS= read -r -d '' file; do echo "CMD: ./markdown-doctest $file" && ./markdown-doctest "$file" || exit 1; done + if [ ! -f $HOME/.local/bin/markdown-doctest ]; then + mkdir -p $HOME/.local/bin + echo "----------------------------------------------------------------" + echo "Build markdown-doctest" + echo "----------------------------------------------------------------" + echo + # IMPORTANT: do not replace $HOME with ~, tilde is not expanded by + # shell in the middle of a command string. + cabal install markdown-doctest --project-file=cabal.project.markdown-doctest --installdir=$HOME/.local/bin --overwrite-policy=always + fi + + echo "----------------------------------------------------------------" + echo "Build streamly commit: $(git rev-parse HEAD)" + echo "----------------------------------------------------------------" + echo + cabal build streamly --write-ghc-environment-files=always + + echo "----------------------------------------------------------------" + echo "Run markdown-doctest" + echo "----------------------------------------------------------------" + echo + find ./docs ./core/docs -type f -name "*.md" -print0 | while IFS= read -r -d '' file; do + echo "CMD: markdown-doctest $file" && markdown-doctest "$file" || exit 1 + done diff --git a/.github/workflows/packdiff.yml b/.github/workflows/packdiff.yml index 6ff313b9e4..f377b4f014 100644 --- a/.github/workflows/packdiff.yml +++ b/.github/workflows/packdiff.yml @@ -1,39 +1,86 @@ -name: Packdiff +name: API -on: pull_request +on: + workflow_dispatch: + pull_request: jobs: packdiff: + name: "Signature diff: master vs PR" + env: + GHCVER: 9.8.4 + GHCUP_VERSION: 0.1.50.2 runs-on: ubuntu-latest steps: - - name: Download ghc + # This should happen before cache restore. + - name: Remove ~/.ghcup symlink run: | - GHCUP_VER=0.1.20.0 - curl -sL -o ./ghcup https://downloads.haskell.org/~ghcup/$GHCUP_VER/x86_64-linux-ghcup-$GHCUP_VER - chmod +x ./ghcup - GHCVER=9.8.1 - ./ghcup install ghc $GHCVER - ./ghcup set ghc $GHCVER - cabal update + rm -f ~/.ghcup + + - name: Cache ghcup and ghc (non-Windows) + uses: actions/cache@v4 + if: runner.os != 'Windows' + with: + path: | + ~/.ghcup + key: ${{ runner.os }}-ghcup-${{ env.GHCUP_VERSION }}-${{ env.GHCVER }} + + - name: Cache hackage package index (non-Windows) + uses: actions/cache@v4 + if: runner.os != 'Windows' + with: + path: | + ~/.cache/cabal/packages + # Bump the key version to clear the cache + key: cache-cabal-packages - - uses: actions/cache@v4 - name: Cache ~/.cabal + - name: Cache packdiff (non-Windows) + uses: actions/cache@v4 + if: runner.os != 'Windows' with: path: | - ~/.cabal + ~/.local/bin + ~/.local/state/cabal # Bump the key version to clear the cache - key: cache-v2 + key: packdiff-ghc-${{ env.GHCVER }} - name: Checkout the current branch - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: fetch-depth: 0 - - name: Run packdiff on streamly-core - run: cabal run packdiff --project-file=cabal.project.packdiff -- diff streamly-core $(git rev-parse origin/master) streamly-core $(git rev-parse HEAD) + # Use a sane PATH, especially to pick the right GHC + - name: Set PATH to add .local and .ghcup + run: echo "$HOME/.local/bin:$HOME/.ghcup/bin:/bin:/usr/bin" > $GITHUB_PATH + + - name: Download ghc + run: | + if ! ghc --version 2>/dev/null | grep -q "$GHCVER" + then + curl -sL -o ./ghcup https://downloads.haskell.org/~ghcup/$GHCUP_VERSION/x86_64-linux-ghcup-$GHCUP_VERSION + chmod +x ./ghcup + export GHCUP_INSTALL_BASE_PREFIX=$HOME + ./ghcup install ghc $GHCVER + ./ghcup set ghc $GHCVER + ./ghcup install cabal + fi + # XXX update only if not present + cabal update + + - name: Install packdiff + run: | + if [ ! -f $HOME/.local/bin/packdiff ]; then + mkdir -p $HOME/.local/bin + # IMPORTANT: do not replace $HOME with ~, tilde is not expanded by + # shell in the middle of a command string. + cabal install packdiff --project-file=cabal.project.packdiff --installdir=$HOME/.local/bin --overwrite-policy=always + fi + + - name: API diff for streamly-core + run: packdiff diff streamly-core $(git rev-parse origin/master) streamly-core $(git rev-parse HEAD) - - name: Run packdiff on streamly - run: cabal run packdiff --project-file=cabal.project.packdiff -- diff streamly $(git rev-parse origin/master) streamly $(git rev-parse HEAD) + - name: API diff for streamly + run: packdiff diff streamly $(git rev-parse origin/master) streamly $(git rev-parse HEAD) diff --git a/.github/workflows/regression-check.yml b/.github/workflows/regression-check.yml index 01c006ad7d..da60a8fb02 100644 --- a/.github/workflows/regression-check.yml +++ b/.github/workflows/regression-check.yml @@ -1,4 +1,4 @@ -name: Regression checking +name: PERF on: workflow_dispatch: @@ -19,8 +19,11 @@ on: #---------------------------------------------------------------------- # Removed Data.Fold.Prelude - was failing for some reason (memory issue?) jobs: - check-regressions: + build: + name: "Comparison: master vs PR (ubuntu-latest ghc-9.10.3)" env: + GHCVER: 9.10.3 + GHCUP_VERSION: 0.1.50.2 CI_BENCHMARKS_WITH_CUTOFF: >- Data.Array Data.Array.Generic @@ -59,52 +62,69 @@ jobs: steps: - - name: Update environment - run: | - CI_BENCHMARKS="" - for i in $CI_BENCHMARKS_WITH_CUTOFF - do - bname=$(echo "$i" | cut -d: -f1) - CI_BENCHMARKS="$CI_BENCHMARKS $bname" - done - echo "CI_BENCHMARKS=$CI_BENCHMARKS" >> $GITHUB_ENV + - name: Checkout the PR branch + uses: actions/checkout@v4 - - name: Download ghc + # This should happen before cache restore. + - name: Remove ~/.ghcup symlink run: | - GHCUP_VER=0.1.50.2 - curl -sL -o ./ghcup https://downloads.haskell.org/~ghcup/$GHCUP_VER/x86_64-linux-ghcup-$GHCUP_VER - chmod +x ./ghcup - GHCVER=9.10.3 - ./ghcup install ghc $GHCVER - ./ghcup set ghc $GHCVER - cabal update + rm -f ~/.ghcup + + - name: Cache ghcup and ghc (non-Windows) + uses: actions/cache@v4 + if: runner.os != 'Windows' + with: + path: | + ~/.ghcup + key: ${{ runner.os }}-ghcup-${{ env.GHCUP_VERSION }}-${{ env.GHCVER }} - - uses: actions/cache@v4 - name: Cache ~/.cabal + - name: Cache hackage package index (non-Windows) + uses: actions/cache@v4 + if: runner.os != 'Windows' with: path: | - ~/.cabal + ~/.cache/cabal/packages # Bump the key version to clear the cache - key: cache-v2 + key: cache-cabal-packages - - name: Cache bench-runner from pr - id: cache-bench-runner-pr + - name: Cache cabal build dependencies (non-Windows) uses: actions/cache@v4 + if: runner.os != 'Windows' with: - path: bench-runner + path: | + ~/.local/state/cabal # Bump the key version to clear the cache - key: bench-runner-v1 + key: performance-comparison-deps - # ----------------------------------------------------------------- - # -- Install bench-report in the current directory - # ----------------------------------------------------------------- + - name: Update CI_BENCHMARKS environment variable + run: | + CI_BENCHMARKS="" + for i in $CI_BENCHMARKS_WITH_CUTOFF + do + bname=$(echo "$i" | cut -d: -f1) + CI_BENCHMARKS="$CI_BENCHMARKS $bname" + done + echo "CI_BENCHMARKS=$CI_BENCHMARKS" >> $GITHUB_ENV - - name: Checkout the current branch - uses: actions/checkout@v2 - with: - clean: false + # Use a sane PATH, especially to pick the right GHC + - name: Set PATH to add .local and .ghcup + run: echo "$HOME/.local/bin:$HOME/.ghcup/bin:/bin:/usr/bin" > $GITHUB_PATH + + - name: Download ghc + run: | + if ! ghc --version 2>/dev/null | grep -q "$GHCVER" + then + curl -sL -o ./ghcup https://downloads.haskell.org/~ghcup/$GHCUP_VERSION/x86_64-linux-ghcup-$GHCUP_VERSION + chmod +x ./ghcup + export GHCUP_INSTALL_BASE_PREFIX=$HOME + ./ghcup install ghc $GHCVER + ./ghcup set ghc $GHCVER + ./ghcup install cabal + fi + # XXX update only if not present + cabal update - - name: Install bench-runner + - name: Install bench-runner from PR branch run: | cabal install bench-runner --project-file=cabal.project.report --installdir=./ @@ -112,34 +132,34 @@ jobs: # -- Generate reports for the base branch and upload # ----------------------------------------------------------------- - - name: Checkout the base branch - uses: actions/checkout@v2 + - name: Checkout the "master" branch + uses: actions/checkout@v4 with: ref: master clean: false - - name: Run benchmarks + - name: Run benchmarks for "master" branch run: | - ./bench-runner --package-name streamly-benchmarks --package-version 0.0.0 --cabal-build-options "-j1" --targets "$CI_BENCHMARKS" --raw - - - name: Move charts to charts-master - run: mv charts charts-master + # CABAL_BUILD_OPTIONS="--cabal-build-options \"-j1\"" + ./bench-runner --package-name streamly-benchmarks --package-version 0.0.0 --targets "$CI_BENCHMARKS" --raw + # XXX Print dependencies of streamly-core and streamly for comparison + # in case there is a regression due to version changes. + # ghc-pkg --package-db=./dist-newstyle/packagedb/ghc-9.10.3/ field streamly depends # ----------------------------------------------------------------- # -- Download, generate reports for the current branch and append # ----------------------------------------------------------------- - - name: Checkout the current branch - uses: actions/checkout@v2 + - name: Checkout the PR branch + uses: actions/checkout@v4 with: + # preserve bench-runner and the "charts" directory created by bench-runner clean: false - - name: Copy charts-master to charts - run: cp -r charts-master charts - - name: Run benchmarks and append run: | - ./bench-runner --package-name streamly-benchmarks --package-version 0.0.0 --cabal-build-options "-j1" --targets "$CI_BENCHMARKS" --raw --append + # CABAL_BUILD_OPTIONS="--cabal-build-options \"-j1\"" + ./bench-runner --package-name streamly-benchmarks --package-version 0.0.0 --targets "$CI_BENCHMARKS" --raw --append # ----------------------------------------------------------------- # -- Compare @@ -176,4 +196,14 @@ jobs: test $? -eq 1 && EXIT_STATUS=1 done - exit $EXIT_STATUS + # Always exit with success so that we are able to use the cache + echo + echo "------------------------------------------------------------------------" + if test $EXIT_STATUS -ne 0 + then + echo "ERROR: Performance regressions are more than ${CI_DIFF_CUTOFF_PERCENT}%." + else + echo "SUCCESS: Performance regressions are within ${CI_DIFF_CUTOFF_PERCENT}%." + fi + echo "------------------------------------------------------------------------" + exit 0 diff --git a/appveyor.yml b/appveyor.yml index 395dd48054..c87f559c9a 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,7 +1,8 @@ -# packcheck-0.4.2 +# packcheck-0.7.1 # You can use any of the options supported by packcheck as environment -# variables here. See https://github.com/harendra-kumar/packcheck for all +# variables here. See https://github.com/composewell/packcheck for all # options and their explanation. +# branches: only: - master @@ -14,45 +15,34 @@ environment: # ------------------------------------------------------------------------ # Common options # ------------------------------------------------------------------------ - # GHC 9.2.7 onwards redundant constraint warnings are incompatible with - # older versions - GHC_OPTIONS: "-Werror" CABAL_REINIT_CONFIG: "y" LC_ALL: "C.UTF-8" # ------------------------------------------------------------------------ - # What to build + # How to build # ------------------------------------------------------------------------ - # DISABLE_TEST: "y" - # DISABLE_BENCH: "y" - # DISABLE_DOCS: "y" - DISABLE_SDIST_BUILD: "y" - DISABLE_DIST_CHECKS: "y" - ENABLE_INSTALL: "y" + # + GHCUP_VERSION: "0.1.50.2" + GHCVER: "9.10.3" + #CABALVER: "3.10.3.0" # ------------------------------------------------------------------------ - # stack options + # What to build # ------------------------------------------------------------------------ - # Note requiring a specific version of stack using STACKVER may fail due to - # github API limit while checking and upgrading/downgrading to the specific - # version. - # STACKVER: "1.6.5" - STACK_UPGRADE: "y" - # RESOLVER: "lts-18.27" - STACK_ROOT: "c:\\sr" - STACK_BUILD_OPTIONS: "--flag streamly-benchmarks:-opt" - STACK_YAML: "stack.yaml" + # DISABLE_TEST: "y" + DISABLE_BENCH: "y" + DISABLE_DOCS: "y" + DISABLE_DIST_CHECKS: "y" + DISABLE_SDIST_BUILD: "y" + # Note: these require the "diff" utility. + # DISABLE_SDIST_GIT_CHECK: "y" + # DISABLE_SDIST_PROJECT_CHECK: "y" # ------------------------------------------------------------------------ # cabal options # ------------------------------------------------------------------------ CABAL_CHECK_RELAX: "y" - - # ------------------------------------------------------------------------ - # Where to find the required tools - # ------------------------------------------------------------------------ - PATH: "%PATH%;%APPDATA%\\local\\bin" - LOCAL_BIN: "%APPDATA%\\local\\bin" + CABAL_PROJECT: "cabal.project" # ------------------------------------------------------------------------ # Location of packcheck.sh (the shell script invoked to perform CI tests ). @@ -65,31 +55,33 @@ environment: # If you have not committed packcheck.sh in your repo at PACKCHECK_LOCAL_PATH # then it is automatically pulled from this URL. PACKCHECK_GITHUB_URL: "https://raw.githubusercontent.com/composewell/packcheck" - PACKCHECK_GITHUB_COMMIT: "101c73b53473ddfb763d65058b80123991cfeb4f" + PACKCHECK_GITHUB_COMMIT: "dd6862df527f317fd4987afa523fba3f4fde7e19" # Override the temp directory to avoid sed escaping issues # See https://github.com/haskell/cabal/issues/5386 TMP: "c:\\tmp" +# Bump the -> version to clear the cache +# packcheck uses "%APPDATA%\\local" to install tools like hlint etc. +# cabal may use "%APPDATA%\\cabal" or "c:\\cabal" +# ghcup may use "%APPDATA%\\ghcup" or "c:\\ghcup" cache: - - "%STACK_ROOT%" - - "%LOCAL_BIN%" + - "%APPDATA%\\local\\bin -> v1" - "%APPDATA%\\cabal" - - "%APPDATA%\\ghc" -# - "%LOCALAPPDATA%\\Programs\\stack" + - "%LOCALAPPDATA%\\cabal" + - "C:\\ghcup" + - "C:\\cabal" +# Folder where the repository is cloned. clone_folder: "c:\\pkg" build: off before_test: -- if not exist %PACKCHECK_LOCAL_PATH% curl -sSkL -o%PACKCHECK_LOCAL_PATH% %PACKCHECK_GITHUB_URL%/%PACKCHECK_GITHUB_COMMIT%/packcheck.sh -- if not exist %LOCAL_BIN% mkdir %LOCAL_BIN% -- where stack.exe || curl -sSkL -ostack.zip http://www.stackage.org/stack/windows-x86_64 && 7z x stack.zip stack.exe && move stack.exe %LOCAL_BIN% -- if defined STACKVER (stack upgrade --binary-only --binary-version %STACKVER%) else (stack upgrade --binary-only || ver > nul) -- stack --version +- if not exist %PACKCHECK_LOCAL_PATH% curl --fail -sSL -o%PACKCHECK_LOCAL_PATH% %PACKCHECK_GITHUB_URL%/%PACKCHECK_GITHUB_COMMIT%/packcheck.sh test_script: -- stack setup > nul - for /f "usebackq tokens=*" %%i in (`where 7z.exe`) do set PATH7Z=%%i\.. - for /f "usebackq tokens=*" %%i in (`where git.exe`) do set PATHGIT=%%i\.. -- chcp 65001 && stack exec bash -- -c "chmod +x %PACKCHECK_LOCAL_PATH%; %PACKCHECK_LOCAL_PATH% stack PATH=/usr/bin:\"%PATH7Z%\":\"%PATHGIT%\"" +- for /f "usebackq tokens=*" %%i in (`where curl.exe`) do set PATHCURL=%%i\.. +- chcp 65001 +- bash %PACKCHECK_LOCAL_PATH% cabal PATH="/usr/bin:%PATH7Z%:%PATHGIT%:%PATHCURL%" diff --git a/cabal.project.markdown-doctest b/cabal.project.markdown-doctest index 77b617a9ca..75a882bf87 100644 --- a/cabal.project.markdown-doctest +++ b/cabal.project.markdown-doctest @@ -1,15 +1,15 @@ -source-repository-package - type: git - location: https://github.com/composewell/streamly.git - tag: d330733874cb57a81ddde444b2b77bac875f3633 - -source-repository-package - type: git - location: https://github.com/composewell/streamly.git - tag: d330733874cb57a81ddde444b2b77bac875f3633 - subdir: core - source-repository-package type: git location: https://github.com/composewell/markdown-doctest.git tag: 05dcf5f03128c49b66cf7c7778f567da1990014c + +-- source-repository-package +-- type: git +-- location: https://github.com/composewell/streamly.git +-- tag: d330733874cb57a81ddde444b2b77bac875f3633 +-- +-- source-repository-package +-- type: git +-- location: https://github.com/composewell/streamly.git +-- tag: d330733874cb57a81ddde444b2b77bac875f3633 +-- subdir: core diff --git a/cabal.project.packdiff b/cabal.project.packdiff index 9474d3853b..6fab998fd8 100644 --- a/cabal.project.packdiff +++ b/cabal.project.packdiff @@ -1,9 +1,9 @@ source-repository-package type: git location: https://github.com/composewell/packdiff.git - tag: c6f0f81bca254861f2873cfa4f782d8323781638 + tag: 6581cf29ff6ef1190bd7f1aec6ef081ad33f9519 -source-repository-package - type: git - location: https://github.com/composewell/streamly-process.git - tag: cc81711774e530601b14d3f34b362941ed80b070 +-- source-repository-package +-- type: git +-- location: https://github.com/composewell/streamly-process.git +-- tag: cc81711774e530601b14d3f34b362941ed80b070 diff --git a/stack.yaml b/stack.yaml index 20d29fb711..bf416d68cc 100644 --- a/stack.yaml +++ b/stack.yaml @@ -1,4 +1,4 @@ -resolver: lts-23.27 +resolver: nightly-2026-03-10 packages: - '.' - './benchmark' @@ -6,10 +6,9 @@ packages: - './core' - './bench-test-lib' +# network 3.2.8 is broken extra-deps: - #- tasty-bench-0.3.1 - - lockfree-queue-0.2.4 - - unicode-data-0.6.0 + - network-3.2.7.0 #allow-newer: true rebuild-ghc-options: true