on master help sign in
Install bench-runner from the PR and use the executable in the CI
066f302Adithya Kumar
.github/workflows/regression-check.yml+27−4
@@ -83,6 +83,28 @@ jobs:
83 # Bump the key version to clear the cache
83 # Bump the key version to clear the cache
84 key: charts-master-v1
84 key: charts-master-v1
85
85
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+
86 # -----------------------------------------------------------------
108 # -----------------------------------------------------------------
87 # -- Generate reports for the base branch and upload
109 # -- Generate reports for the base branch and upload
88 # -----------------------------------------------------------------
110 # -----------------------------------------------------------------
@@ -92,11 +114,12 @@ jobs:
92 uses: actions/checkout@v2
114 uses: actions/checkout@v2
93 with:
115 with:
94 ref: master
116 ref: master
117+ clean: false
95
118
96 - name: Run benchmarks
119 - name: Run benchmarks
97 if: steps.cache-charts-master.outputs.cache-hit != 'true'
120 if: steps.cache-charts-master.outputs.cache-hit != 'true'
98 run: |
121 run: |
99− cabal run bench-runner --project-file=cabal.project.report -- --targets "$CI_BENCHMARKS" --raw
122+ ./bench-runner --targets "$CI_BENCHMARKS" --raw
100
123
101 - name: Move charts to charts-master
124 - name: Move charts to charts-master
102 if: steps.cache-charts-master.outputs.cache-hit != 'true'
125 if: steps.cache-charts-master.outputs.cache-hit != 'true'
@@ -116,7 +139,7 @@ jobs:
116
139
117 - name: Run benchmarks and append
140 - name: Run benchmarks and append
118 run: |
141 run: |
119− cabal run bench-runner --project-file=cabal.project.report -- --targets "$CI_BENCHMARKS" --raw --append
142+ ./bench-runner --targets "$CI_BENCHMARKS" --raw --append
120
143
121 # -----------------------------------------------------------------
144 # -----------------------------------------------------------------
122 # -- Compare
145 # -- Compare
@@ -124,7 +147,7 @@ jobs:
124
147
125 - name: List all benchmarks
148 - name: List all benchmarks
126 run: |
149 run: |
127− cabal run bench-runner --project-file=cabal.project.report -- --targets "$CI_BENCHMARKS" --no-measure
150+ ./bench-runner --targets "$CI_BENCHMARKS" --no-measure
128
151
129 - name: Compare benchmarks
152 - name: Compare benchmarks
130 run: |
153 run: |
@@ -142,7 +165,7 @@ jobs:
142
165
143 echo
166 echo
144 echo "Checking $bname for regressions greater than $cutoff percent"
167 echo "Checking $bname for regressions greater than $cutoff percent"
145− ! cabal run bench-runner --project-file=cabal.project.report -- \
168+ ! ./bench-runner \
146 --targets "$bname" \
169 --targets "$bname" \
147 --fields "$CI_FIELDS" \
170 --fields "$CI_FIELDS" \
148 --no-measure --silent \
171 --no-measure --silent \