Skip to content

Commit 75887cd

Browse files
authored
Merge pull request #122 from crazy-max/make-bench
make bench target
2 parents a676bd0 + b967806 commit 75887cd

File tree

3 files changed

+14
-9
lines changed

3 files changed

+14
-9
lines changed

Diff for: .github/workflows/ci.yml

+2-3
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ jobs:
147147
-
148148
name: Test
149149
run: |
150-
./hack/test
150+
make test
151151
env:
152152
TEST_TYPES: test
153153
-
@@ -221,9 +221,8 @@ jobs:
221221
-
222222
name: Benchmark
223223
run: |
224-
./hack/test
224+
make bench
225225
env:
226-
TEST_TYPES: benchmark
227226
TEST_BENCH_REGEXP: ${{ matrix.test }}$
228227
TEST_BENCH_RUN: ${{ matrix.count }}
229228
TEST_BENCH_TIME: ${{ matrix.benchtime }}

Diff for: Makefile

+4
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ all:
55
test:
66
./hack/test
77

8+
.PHONY: bench
9+
bench:
10+
TEST_TYPES=benchmark ./hack/test
11+
812
.PHONY: gen
913
gen:
1014
./hack/gen

Diff for: README.md

+8-6
Original file line numberDiff line numberDiff line change
@@ -31,24 +31,26 @@ TEST_TYPES=test make test
3131

3232
# run only benchmarks
3333
TEST_TYPES=benchmark make test
34+
# or
35+
make bench
3436

3537
# run a specific benchmark
36-
TEST_BENCH_REGEXP=/BenchmarkBuildLocal$ make test
38+
TEST_BENCH_REGEXP=/BenchmarkBuildLocal$ make bench
3739

3840
# run all benchmarks 3 times (default 1)
39-
TEST_BENCH_RUN=3 make test
41+
TEST_BENCH_RUN=3 make bench
4042

4143
# run 5 iterations of each benchmark (default 1x)
42-
TEST_BENCH_TIME=5x make test
44+
TEST_BENCH_TIME=5x make bench
4345

4446
# run all with master, v0.9.3 and v0.16.0 git references
45-
BUILDKIT_REFS=master,v0.9.3,v0.16.0 make test
47+
BUILDKIT_REFS=master,v0.9.3,v0.16.0 make bench
4648
```
4749

4850
> [!NOTE]
4951
> Set `TEST_KEEP_CACHE=1` for the test framework to keep external dependant
50-
> images in a docker volume if you are repeatedly calling `./hack/test` script.
51-
> This helps to avoid rate limiting on the remote registry side.
52+
> images in a docker volume if you are repeatedly calling `make test` or
53+
> `make bench`. This helps to avoid rate limiting on the remote registry side.
5254
5355
After running the tests, you can generate the HTML report and serve the
5456
website with:

0 commit comments

Comments
 (0)