1name: Regression checking
8# https://docs.github.com/en/actions/managing-workflow-runs/manually-running-a-workflow
9# https://docs.github.com/en/actions/using-workflows/reusing-workflows#reusable-workflows-and-starter-workflows
10# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#onworkflow_call
11# https://docs.github.com/en/actions/learn-github-actions/contexts#about-contexts-and-expressions
13# You can override the default DIFF_CUTOFF_PERCENT by specifying a cutoff along
14# with the benchmark target.
15# Eg, "Data.Async:12" where "Data.Async" is the benchmark target, ":" is the
16# seperator, and "12" is the new cutoff percent
20 CI_BENCHMARKS_WITH_CUTOFF: >-
33 Data.Stream.Concurrent
34 Data.Stream.ConcurrentEager
35 Data.Stream.ConcurrentInterleaved
36 Data.Stream.ConcurrentOrdered
42 CI_DIFF_CUTOFF_PERCENT: 3
44 runs-on: ubuntu-latest
48 - name: Update environment
51 for i in $CI_BENCHMARKS_WITH_CUTOFF
53 bname=$(echo "$i" | cut -d: -f1)
54 CI_BENCHMARKS="$CI_BENCHMARKS $bname"
56 echo "CI_BENCHMARKS=$CI_BENCHMARKS" >> $GITHUB_ENV
61 curl -sL -o ./ghcup https://downloads.haskell.org/~ghcup/$GHCUP_VER/x86_64-linux-ghcup-$GHCUP_VER
64 ./ghcup install ghc $GHCVER
65 ./ghcup set ghc $GHCVER
68 - uses: actions/cache@v2
73 # Bump the key version to clear the cache
76 - name: Cache bench-runner from pr
77 id: cache-bench-runner-pr
78 uses: actions/cache@v2
81 # Bump the key version to clear the cache
84 # -----------------------------------------------------------------
85 # -- Install bench-report in the current directory
86 # -----------------------------------------------------------------
88 - name: Checkout the current branch
89 uses: actions/checkout@v2
93 - name: Install bench-runner
95 cabal install bench-runner --project-file=cabal.project.report --installdir=./
97 # -----------------------------------------------------------------
98 # -- Generate reports for the base branch and upload
99 # -----------------------------------------------------------------
101 - name: Checkout the base branch
102 uses: actions/checkout@v2
107 - name: Run benchmarks
109 ./bench-runner --package-name streamly-benchmarks --package-version 0.0.0 --targets "$CI_BENCHMARKS" --raw
111 - name: Move charts to charts-master
112 run: mv charts charts-master
114 # -----------------------------------------------------------------
115 # -- Download, generate reports for the current branch and append
116 # -----------------------------------------------------------------
118 - name: Checkout the current branch
119 uses: actions/checkout@v2
123 - name: Copy charts-master to charts
124 run: cp -r charts-master charts
126 - name: Run benchmarks and append
128 ./bench-runner --package-name streamly-benchmarks --package-version 0.0.0 --targets "$CI_BENCHMARKS" --raw --append
130 # -----------------------------------------------------------------
132 # -----------------------------------------------------------------
134 - name: List all benchmarks
136 ./bench-runner --package-name streamly-benchmarks --package-version 0.0.0 --targets "$CI_BENCHMARKS" --no-measure
138 - name: Compare benchmarks
143 for i in $CI_BENCHMARKS_WITH_CUTOFF
150 test -z "$cutoff" && cutoff=$CI_DIFF_CUTOFF_PERCENT
153 echo "Checking $bname for regressions greater than $cutoff percent"
155 --package-name streamly-benchmarks \
156 --package-version 0.0.0 \
158 --fields "$CI_FIELDS" \
159 --no-measure --silent \
160 --diff-cutoff-percent $cutoff \
162 test $? -eq 1 && EXIT_STATUS=1
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list