From 9de6d01aff9137d4905b25bb63c157873b7fe3a9 Mon Sep 17 00:00:00 2001 From: phuslu Date: Sun, 31 Dec 2023 18:04:05 +0800 Subject: [PATCH] Create benchmark.yml --- .github/workflows/benchmark.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .github/workflows/benchmark.yml diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml new file mode 100644 index 0000000..9ee885e --- /dev/null +++ b/.github/workflows/benchmark.yml @@ -0,0 +1,22 @@ +name: benchmark + +on: + schedule: + - cron: '0 0 * * *' + push: + branches: + - master + +jobs: + benchmark: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-go@v4 + with: + go-version: '1.21' + check-latest: true + - name: Benchmark + run: | + cd bench + go test -v -cpu=8 -run=none -bench=. -benchtime=5s -benchmem bench_test.go