Added chanchal/zaphandler #24
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Update benchmark pages | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '0 0 * * 0' | |
push: | |
branches: | |
- main | |
jobs: | |
run_benchmark: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.ref }} | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: '1.21' | |
check-latest: true | |
# Not using now because updates to zerolog 1.32 break phsym/zeroslog. | |
# - name: Install the latest versions of each library | |
# run: go get -u ./... && go mod tidy | |
# TODO: that kind of thing shouldn't break bench and verify functionality, | |
# should just be a warning of some sort | |
- name: Benchmark Go logging libraries | |
run: go test -bench=. bench/*.go > ${{ runner.temp }}/bench.txt | |
- name: Verify Go logging libraries | |
run: go test -v ./verify -args -useWarnings > ${{ runner.temp }}/verify.txt | |
- name: Run Server & Get Pages | |
run: go run cmd/server/server.go -bench=${{ runner.temp }}/bench.txt -verify=${{ runner.temp }}/verify.txt & scripts/pages | |
- name: Commit Benchmark Results to Repo | |
uses: EndBug/add-and-commit@v9 | |
with: | |
message: Update Benchmark Results | |
commit: '--no-verify' |