@@ -83,6 +83,28 @@ jobs:
8383 # Bump the key version to clear the cache
8484 key: charts-master-v1
8585
86+ - name: Cache bench-runner from pr
87+ id: cache-bench-runner-pr
88+ uses: actions/cache@v2
89+ with:
90+ path: bench-runner
91+ # Bump the key version to clear the cache
92+ key: bench-runner-v1
93+
94+ # -----------------------------------------------------------------
95+ # -- Install bench-report in the current directory
96+ # -----------------------------------------------------------------
97+
98+ - name: Checkout the current branch
99+ uses: actions/checkout@v2
100+ with:
101+ clean: false
102+
103+ - name: Install bench-runner
104+ if: steps.cache-bench-runner-pr.outputs.cache-hit != 'true'
105+ run: |
106+ cabal install bench-runner --project-file=cabal.project.report --installdir=./
107+
86108 # -----------------------------------------------------------------
87109 # -- Generate reports for the base branch and upload
88110 # -----------------------------------------------------------------
@@ -92,11 +114,12 @@ jobs:
92114 uses: actions/checkout@v2
93115 with:
94116 ref: master
117+ clean: false
95118
96119 - name: Run benchmarks
97120 if: steps.cache-charts-master.outputs.cache-hit != 'true'
98121 run: |
99− cabal run bench-runner --project-file=cabal.project.report -- --targets "$CI_BENCHMARKS" --raw
122+ ./bench-runner --targets "$CI_BENCHMARKS" --raw
100123
101124 - name: Move charts to charts-master
102125 if: steps.cache-charts-master.outputs.cache-hit != 'true'
@@ -116,7 +139,7 @@ jobs:
116139
117140 - name: Run benchmarks and append
118141 run: |
119− cabal run bench-runner --project-file=cabal.project.report -- --targets "$CI_BENCHMARKS" --raw --append
142+ ./bench-runner --targets "$CI_BENCHMARKS" --raw --append
120143
121144 # -----------------------------------------------------------------
122145 # -- Compare
@@ -124,7 +147,7 @@ jobs:
124147
125148 - name: List all benchmarks
126149 run: |
127− cabal run bench-runner --project-file=cabal.project.report -- --targets "$CI_BENCHMARKS" --no-measure
150+ ./bench-runner --targets "$CI_BENCHMARKS" --no-measure
128151
129152 - name: Compare benchmarks
130153 run: |
@@ -142,7 +165,7 @@ jobs:
142165
143166 echo
144167 echo "Checking $bname for regressions greater than $cutoff percent"
145− ! cabal run bench-runner --project-file=cabal.project.report -- \
168+ ! ./bench-runner \
146169 --targets "$bname" \
147170 --fields "$CI_FIELDS" \
148171 --no-measure --silent \