on master help sign in
Prefix all CI specific environment variables with "CI_"
ba5d328Adithya Kumar
.github/workflows/regression-check.yml+19−19
@@ -16,8 +16,8 @@ on: pull_request
16jobs:
16jobs:
17 check-regressions:
17 check-regressions:
18 env:
18 env:
19− BENCH_SH: bin/bench.sh
19+ CI_BENCH_SH: bin/bench.sh
20− BENCHMARKS_WITH_CUTOFF: >-
20+ CI_BENCHMARKS_WITH_CUTOFF: >-
21 Data.Array
21 Data.Array
22 Data.Array.Foreign
22 Data.Array.Foreign
23 Data.Array.Prim
23 Data.Array.Prim
@@ -43,8 +43,8 @@ jobs:
43 Unicode.Char
43 Unicode.Char
44 Unicode.Stream
44 Unicode.Stream
45 Unicode.Utf8
45 Unicode.Utf8
46− FIELDS: allocated
46+ CI_FIELDS: allocated
47− DIFF_CUTOFF_PERCENT: 3
47+ CI_DIFF_CUTOFF_PERCENT: 3
48
48
49 runs-on: ubuntu-latest
49 runs-on: ubuntu-latest
50
50
@@ -52,13 +52,13 @@ jobs:
52
52
53 - name: Update environment
53 - name: Update environment
54 run: |
54 run: |
55− BENCHMARKS=""
55+ CI_BENCHMARKS=""
56− for i in $BENCHMARKS_WITH_CUTOFF
56+ for i in $CI_BENCHMARKS_WITH_CUTOFF
57 do
57 do
58 bname=$(echo "$i" | cut -d: -f1)
58 bname=$(echo "$i" | cut -d: -f1)
59− BENCHMARKS="$BENCHMARKS $bname"
59+ CI_BENCHMARKS="$CI_BENCHMARKS $bname"
60 done
60 done
61− echo "BENCHMARKS=$BENCHMARKS" >> $GITHUB_ENV
61+ echo "CI_BENCHMARKS=$CI_BENCHMARKS" >> $GITHUB_ENV
62
62
63 - name: Setup haskell
63 - name: Setup haskell
64 uses: actions/setup-haskell@v1
64 uses: actions/setup-haskell@v1
@@ -96,8 +96,8 @@ jobs:
96 - name: Run benchmarks
96 - name: Run benchmarks
97 if: steps.cache-charts-master.outputs.cache-hit != 'true'
97 if: steps.cache-charts-master.outputs.cache-hit != 'true'
98 run: |
98 run: |
99− chmod +x $BENCH_SH
99+ chmod +x $CI_BENCH_SH
100− $BENCH_SH --benchmarks "$BENCHMARKS" --raw
100+ $CI_BENCH_SH --benchmarks "$CI_BENCHMARKS" --raw
101
101
102 - name: Move charts to charts-master
102 - name: Move charts to charts-master
103 if: steps.cache-charts-master.outputs.cache-hit != 'true'
103 if: steps.cache-charts-master.outputs.cache-hit != 'true'
@@ -117,8 +117,8 @@ jobs:
117
117
118 - name: Run benchmarks and append
118 - name: Run benchmarks and append
119 run: |
119 run: |
120− chmod +x $BENCH_SH
120+ chmod +x $CI_BENCH_SH
121− $BENCH_SH --benchmarks "$BENCHMARKS" --raw --append
121+ $CI_BENCH_SH --benchmarks "$CI_BENCHMARKS" --raw --append
122
122
123 # -----------------------------------------------------------------
123 # -----------------------------------------------------------------
124 # -- Compare
124 # -- Compare
@@ -126,28 +126,28 @@ jobs:
126
126
127 - name: List all benchmarks
127 - name: List all benchmarks
128 run: |
128 run: |
129− chmod +x $BENCH_SH
129+ chmod +x $CI_BENCH_SH
130− $BENCH_SH --no-measure
130+ $CI_BENCH_SH --no-measure
131
131
132 - name: Compare benchmarks
132 - name: Compare benchmarks
133 run: |
133 run: |
134− chmod +x $BENCH_SH
134+ chmod +x $CI_BENCH_SH
135
135
136 EXIT_STATUS=0
136 EXIT_STATUS=0
137
137
138− for i in $BENCHMARKS_WITH_CUTOFF
138+ for i in $CI_BENCHMARKS_WITH_CUTOFF
139 do
139 do
140 arrI=(${i//:/ })
140 arrI=(${i//:/ })
141
141
142 bname=${arrI[0]}
142 bname=${arrI[0]}
143 cutoff=${arrI[1]}
143 cutoff=${arrI[1]}
144
144
145− test -z "$cutoff" && cutoff=$DIFF_CUTOFF_PERCENT
145+ test -z "$cutoff" && cutoff=$CI_DIFF_CUTOFF_PERCENT
146
146
147 echo
147 echo
148 echo "Checking $bname for regressions greater than $cutoff percent"
148 echo "Checking $bname for regressions greater than $cutoff percent"
149− ! $BENCH_SH --benchmarks "$bname" \
149+ ! $CI_BENCH_SH --benchmarks "$bname" \
150− --fields "$FIELDS" \
150+ --fields "$CI_FIELDS" \
151 --no-measure --silent \
151 --no-measure --silent \
152 --diff-cutoff-percent $cutoff \
152 --diff-cutoff-percent $cutoff \
153 | grep -v "^$"
153 | grep -v "^$"