diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index e3edc515be..0000000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,218 +0,0 @@ -version: 2.1 - -#----------------------------------------------------------------------------- -# packcheck-0.7.0 -# Packcheck global environment variables -#----------------------------------------------------------------------------- - -env: &env - environment: - # ------------------------------------------------------------------------ - # Common options - # ------------------------------------------------------------------------ - # GHC_OPTIONS: "-Werror" - # For updating see: https://downloads.haskell.org/~ghcup/ - GHCUP_VERSION: 0.1.20.0 - CABAL_REINIT_CONFIG: "y" - LC_ALL: "C.UTF-8" - - # ------------------------------------------------------------------------ - # What to build - # ------------------------------------------------------------------------ - # DISABLE_TEST: "y" - # DISABLE_BENCH: "y" - # DISABLE_DOCS: "y" - # DISABLE_SDIST_BUILD: "y" - # DISABLE_DIST_CHECKS: "y" - - # ------------------------------------------------------------------------ - # stack options - # ------------------------------------------------------------------------ - # 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-12" - - # ------------------------------------------------------------------------ - # cabal options - # ------------------------------------------------------------------------ - CABAL_CHECK_RELAX: "y" - CABAL_BUILD_OPTIONS: "-j1 --flag limit-build-mem" - - # ------------------------------------------------------------------------ - # Where to find the required tools - # ------------------------------------------------------------------------ - PATH: /sbin:/usr/sbin:/bin:/usr/bin - - # ------------------------------------------------------------------------ - # 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: "e575ff318c93add2a6d3f9107a52c5e37c666a98" - -executors: - amd64-executor: - docker: - - image: ubuntu:latest - x86-executor: - docker: - - image: i386/ubuntu:focal - -#----------------------------------------------------------------------------- -# Common utility stuff, not to be modified usually -#----------------------------------------------------------------------------- - -preinstall: &preinstall - run: | - apt-get update - # required for https/cache save and restore - apt-get install -y ca-certificates - - # Alternative way of installing ghc and cabal, directly from - # haskell.org instead of using ghcup. NOTE: this is for Debian - # only and is debian release specific. - # gnupg is required for apt-key to work - #apt-get install -y gnupg - #apt-key adv --keyserver keyserver.ubuntu.com --recv-keys BA3CBA3FFE22B574 - #echo "deb http://downloads.haskell.org/debian buster main" >> /etc/apt/sources.list - #apt-get update - - # required for outbound https for stack and for stack setup - apt-get install -y netbase xz-utils make - apt-get install -y zlib1g-dev - - # For ghcup to install ghc - if test -n "$GHCUP_VERSION" - then - apt-get install -y gcc - apt-get install -y g++ - fi - - # libgmp required by ghc for linking - apt-get install -y libgmp-dev - apt-get install -y libtinfo-dev - - # Required by cabal when git URL is specified in project file - apt-get install -y git - - # Required for and by packcheck - apt-get install -y curl - - # Get packcheck if needed - if test ! -e "$PACKCHECK" - then - if test -z "$PACKCHECK_GITHUB_COMMIT" - then - die "PACKCHECK_GITHUB_COMMIT is not specified." - fi - PACKCHECK_URL=${PACKCHECK_GITHUB_URL}/${PACKCHECK_GITHUB_COMMIT}/packcheck.sh - curl --fail -sL -o "$PACKCHECK" $PACKCHECK_URL || exit 1 - chmod +x $PACKCHECK - elif test ! -x "$PACKCHECK" - then - chmod +x $PACKCHECK - fi - -restore: &restore - # Needs to happen after installing ca-certificates - restore_cache: - keys: - - v1-{{ .Environment.CIRCLE_JOB }}-{{ .Branch }} - # Fallback to master branch's cache. - - v1-{{ .Environment.CIRCLE_JOB }}-master - # Fallback to any branch's cache. - - v1-{{ .Environment.CIRCLE_JOB }}- - -save: &save - save_cache: - key: v1-{{ .Environment.CIRCLE_JOB }}-{{ .Branch }} - paths: - - ~/.local - - ~/.cabal - - ~/.stack - - ~/.ghcup - -#----------------------------------------------------------------------------- -# Build matrix -#----------------------------------------------------------------------------- - -jobs: - cabal-ghc-8_6_5: - <<: *env - executor: amd64-executor - steps: - - checkout - - *restore - - *preinstall - - run: - environment: - GHCVER: "8.6.5" - CABALVER: "3.6.2.0" - CABAL_PROJECT: "cabal.project" - DISABLE_SDIST_BUILD: "yes" - CABAL_BUILD_OPTIONS: "--flag debug --flag -opt" - command: | - bash -c "$PACKCHECK cabal" - - *save - cabal-ghc-9_8_1-docspec: - <<: *env - executor: amd64-executor - steps: - - checkout - - *restore - - *preinstall - - run: - environment: - GHCVER: "9.8.1" - CABALVER: "3.10.1.0" - CABAL_PROJECT: "cabal.project.doctest" - 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" - command: | - bash -c "$PACKCHECK cabal" - - *save - hlint-trailing-spaces: - <<: *env - executor: amd64-executor - steps: - - checkout - - *restore - - *preinstall - - run: - name: hlint and trailing spaces - environment: - DISABLE_SDIST_BUILD: "yes" - HLINT_VERSION: 3.6.1 - HLINT_OPTIONS: lint - HLINT_TARGETS: core/src src test benchmark - command: | - bash -c "$PACKCHECK hlint" || exit 1 - echo "Checking trailing spaces..." - count=$(find . -name "*.hs" -exec grep -H '\ $' {} \; | tee /dev/tty | wc -l) - exit $count - - *save - -workflows: - version: 2 - build: - jobs: - #- cabal-ghc-8_6_5: - # name: 8.6.5-debug-unoptimized - - cabal-ghc-9_8_1-docspec: - name: ghc-9.8.1-docspec - - hlint-trailing-spaces: - name: hlint and trailing spaces diff --git a/.cirrus.yml b/.cirrus.yml deleted file mode 100644 index 9e592fe1f3..0000000000 --- a/.cirrus.yml +++ /dev/null @@ -1,74 +0,0 @@ -freebsd_instance: - image_family: freebsd-14-0 - -task: - name: FreeBSD+packcheck+ghc-9.6.3+cabal-v2 - env: - LC_ALL: C.UTF-8 - BUILD: cabal-v2 - GHCUP_VERSION: 0.1.20.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.3 - 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 - - # Cabal 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 - - # Stack options - # STACK_UPGRADE: "y" - # RESOLVER: ${{ matrix.resolver }} - # STACK_YAML: ${{ matrix.stack_yaml }} - # STACK_BUILD_OPTIONS: ${{ matrix.stack_build_options }} - - # packcheck location and revision - PACKCHECK: "./packcheck.sh" - PACKCHECK_GITHUB_URL: "https://raw.githubusercontent.com/composewell/packcheck" - PACKCHECK_GITHUB_COMMIT: "ccc55fd4b895e842ca6e2d8ac63aa4acc1c3209a" - - # 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" - - # Subdir - # SUBDIR: ${{ matrix.subdir }} - - deps_install_script: | - pkg install -y gmake - pkg install -y bash - - packcheck_install_script: | - if test ! -e "$PACKCHECK" - then - if test -z "$PACKCHECK_GITHUB_COMMIT" - then - die "PACKCHECK_GITHUB_COMMIT is not specified." - fi - PACKCHECK_URL=${PACKCHECK_GITHUB_URL}/${PACKCHECK_GITHUB_COMMIT}/packcheck.sh - curl --fail -sL -o "$PACKCHECK" $PACKCHECK_URL || exit 1 - chmod +x $PACKCHECK - elif test ! -x "$PACKCHECK" - then - chmod +x $PACKCHECK - 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" diff --git a/.github/workflows/haskell.yml b/.github/workflows/haskell.yml deleted file mode 100644 index 149c977639..0000000000 --- a/.github/workflows/haskell.yml +++ /dev/null @@ -1,305 +0,0 @@ -name: Haskell CI - -on: - push: - branches: - - master - pull_request: - -jobs: - build: - name: GHC ${{matrix.name}} - env: - # packcheck environment variables - LC_ALL: C.UTF-8 - BUILD: ${{ matrix.build }} - # For updating see: https://downloads.haskell.org/~ghcup/ - GHCUP_VERSION: 0.1.20.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: ${{ 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_CHECK_RELAX: y - - # Stack options - STACK_UPGRADE: "y" - RESOLVER: ${{ matrix.resolver }} - STACK_YAML: ${{ matrix.stack_yaml }} - STACK_BUILD_OPTIONS: ${{ matrix.stack_build_options }} - - # packcheck location and revision - PACKCHECK: "./packcheck.sh" - PACKCHECK_GITHUB_URL: "https://raw.githubusercontent.com/composewell/packcheck" - PACKCHECK_GITHUB_COMMIT: "e575ff318c93add2a6d3f9107a52c5e37c666a98" - - # 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" - - # Subdir - SUBDIR: ${{ matrix.subdir }} - - runs-on: ${{ matrix.runner }} - continue-on-error: true - strategy: - fail-fast: true - matrix: - # The order is important to optimize fail-fast. - name: - - 9.10.1-Werror - # - 9.8.1-docspec - # - 8.10.7-coverage - - # 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. - 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-alpha - ghc_version: head - ghcup_ghc_options: "-u https://downloads.haskell.org/ghc/9.12.1-alpha1/ghc-9.12.20241014-x86_64-deb12-linux.tar.xz" - 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: false - # Note: use linux for warning build for convenient dev testing - - name: 9.10.1-Werror - ghc_version: 9.10.1 - 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 - ignore_error: false - - name: 9.10.1-macos - ghc_version: 9.10.1 - 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 - ignore_error: false - - name: 9.10.1-fusion-inspection - ghc_version: 9.10.1 - 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" - 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 - 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" - 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: false - - name: 9.4.7 - ghc_version: 9.4.7 - runner: ubuntu-latest - build: cabal - cabal_version: 3.8.1.0 - disable_sdist_build: "y" - cabal_project: cabal.project - ignore_error: false - - name: 9.2.8 - ghc_version: 9.2.8 - runner: ubuntu-latest - build: cabal - cabal_project: cabal.project - cabal_version: 3.6.2.0 - disable_sdist_build: "y" - ignore_error: false - - name: 9.0.2-streamly-sdist - ghc_version: 9.0.2 - runner: ubuntu-latest - build: cabal - cabal_version: 3.6.2.0 - cabal_project: cabal.project.streamly - ignore_error: true - - name: 9.0.2-streamly-core-sdist - ghc_version: 9.0.2 - runner: ubuntu-latest - build: cabal - cabal_version: 3.6.2.0 - subdir: core - ignore_error: false - - name: 8.10.7-noopt - 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\"" - 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 - runner: ubuntu-latest - build: cabal - cabal_version: 3.6.2.0 - cabal_project: cabal.project - disable_sdist_build: "y" - disable_docs: "y" - 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" - ignore_error: false - # - name: hlint - # build: hlint - # runner: ubuntu-latest - # ignore_error: true - - steps: - - uses: actions/checkout@v2 - - - uses: actions/cache@v1 - name: Cache common directories - with: - path: | - ~/.local - ~/.cabal - ~/.stack - ~/.ghcup - # Bump the key version to clear the cache - key: ${{ runner.os }}-${{ matrix.ghc_version }}-cabal-v2 - - - name: Download packcheck - run: | - if test ! -e "$PACKCHECK" - then - if test -z "$PACKCHECK_GITHUB_COMMIT" - then - die "PACKCHECK_GITHUB_COMMIT is not specified." - fi - PACKCHECK_URL=${PACKCHECK_GITHUB_URL}/${PACKCHECK_GITHUB_COMMIT}/packcheck.sh - curl --fail -sL -o "$PACKCHECK" $PACKCHECK_URL || exit 1 - chmod +x $PACKCHECK - elif test ! -x "$PACKCHECK" - then - chmod +x $PACKCHECK - fi - - - name: Run tests - run: | - 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 - 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" - fi diff --git a/.github/workflows/packdiff.yml b/.github/workflows/packdiff.yml deleted file mode 100644 index b2915c3e08..0000000000 --- a/.github/workflows/packdiff.yml +++ /dev/null @@ -1,39 +0,0 @@ -name: Packdiff - -on: pull_request - -jobs: - packdiff: - - runs-on: ubuntu-latest - - steps: - - - name: Download ghc - 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 - - - uses: actions/cache@v2 - name: Cache ~/.cabal - with: - path: | - ~/.cabal - # Bump the key version to clear the cache - key: cache-v2 - - - name: Checkout the current branch - uses: actions/checkout@v2 - 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) - - - 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) diff --git a/.github/workflows/regression-check.yml b/.github/workflows/regression-check.yml deleted file mode 100644 index 4b72d52eda..0000000000 --- a/.github/workflows/regression-check.yml +++ /dev/null @@ -1,174 +0,0 @@ -name: Regression checking - -on: - workflow_dispatch: - pull_request: - -# References: -# https://docs.github.com/en/actions/managing-workflow-runs/manually-running-a-workflow -# https://docs.github.com/en/actions/using-workflows/reusing-workflows#reusable-workflows-and-starter-workflows -# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#onworkflow_call -# https://docs.github.com/en/actions/learn-github-actions/contexts#about-contexts-and-expressions - -# You can override the default DIFF_CUTOFF_PERCENT by specifying a cutoff along -# with the benchmark target. -# Eg, "Data.Async:12" where "Data.Async" is the benchmark target, ":" is the -# seperator, and "12" is the new cutoff percent -#---------------------------------------------------------------------- -#-- Benchmarks listed in alphabetical order -#---------------------------------------------------------------------- -jobs: - check-regressions: - env: - CI_BENCHMARKS_WITH_CUTOFF: >- - Data.Array - Data.Array.Generic - Data.Array.Stream - Data.Fold - Data.Fold.Prelude - Data.Fold.Window - Data.MutArray - Data.Parser - Data.ParserK - Data.ParserK.Chunked - Data.ParserK.Chunked.Generic - Data.RingArray - Data.Scanl.Window - Data.Serialize - Data.Stream - Data.Stream.Concurrent - Data.Stream.ConcurrentEager - Data.Stream.ConcurrentInterleaved - Data.Stream.ConcurrentOrdered - Data.StreamK:6 - Data.Unbox - Data.Unbox.Derive.TH - Data.Unfold - FileSystem.Handle - Unicode.Parser - Unicode.Stream - CI_FIELDS: allocated - CI_DIFF_CUTOFF_PERCENT: 3 - - runs-on: ubuntu-latest - - 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: Download ghc - run: | - GHCUP_VER=0.1.18.0 - curl -sL -o ./ghcup https://downloads.haskell.org/~ghcup/$GHCUP_VER/x86_64-linux-ghcup-$GHCUP_VER - chmod +x ./ghcup - GHCVER=9.2.7 - ./ghcup install ghc $GHCVER - ./ghcup set ghc $GHCVER - cabal update - - - uses: actions/cache@v2 - name: Cache ~/.cabal - with: - path: | - ~/.cabal - # Bump the key version to clear the cache - key: cache-v2 - - - name: Cache bench-runner from pr - id: cache-bench-runner-pr - uses: actions/cache@v2 - with: - path: bench-runner - # Bump the key version to clear the cache - key: bench-runner-v1 - - # ----------------------------------------------------------------- - # -- Install bench-report in the current directory - # ----------------------------------------------------------------- - - - name: Checkout the current branch - uses: actions/checkout@v2 - with: - clean: false - - - name: Install bench-runner - run: | - cabal install bench-runner --project-file=cabal.project.report --installdir=./ - - # ----------------------------------------------------------------- - # -- Generate reports for the base branch and upload - # ----------------------------------------------------------------- - - - name: Checkout the base branch - uses: actions/checkout@v2 - with: - ref: master - clean: false - - - name: Run benchmarks - run: | - ./bench-runner --package-name streamly-benchmarks --package-version 0.0.0 --targets "$CI_BENCHMARKS" --raw - - - name: Move charts to charts-master - run: mv charts charts-master - - # ----------------------------------------------------------------- - # -- Download, generate reports for the current branch and append - # ----------------------------------------------------------------- - - - name: Checkout the current branch - uses: actions/checkout@v2 - with: - 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 --targets "$CI_BENCHMARKS" --raw --append - - # ----------------------------------------------------------------- - # -- Compare - # ----------------------------------------------------------------- - - - name: List all benchmarks - run: | - ./bench-runner --package-name streamly-benchmarks --package-version 0.0.0 --targets "$CI_BENCHMARKS" --no-measure - - - name: Compare benchmarks - run: | - - EXIT_STATUS=0 - - for i in $CI_BENCHMARKS_WITH_CUTOFF - do - arrI=(${i//:/ }) - - bname=${arrI[0]} - cutoff=${arrI[1]} - - test -z "$cutoff" && cutoff=$CI_DIFF_CUTOFF_PERCENT - - echo - echo "Checking $bname for regressions greater than $cutoff percent" - ! ./bench-runner \ - --package-name streamly-benchmarks \ - --package-version 0.0.0 \ - --targets "$bname" \ - --fields "$CI_FIELDS" \ - --no-measure --silent \ - --diff-cutoff-percent $cutoff \ - | grep -v "^$" - test $? -eq 1 && EXIT_STATUS=1 - done - - exit $EXIT_STATUS