From 4881cb953d0c3e9d8863c31c1415d90f19010c8f Mon Sep 17 00:00:00 2001 From: phuslu Date: Mon, 1 Jan 2024 23:05:53 +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..8ec6f7e --- /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 + working-directory: ./bench + run: | + go test -v -cpu=8 -run=none -bench=. -benchtime=60s -benchmem bench_test.go