Benchmark #29
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: Benchmark | |
on: | |
workflow_dispatch: | |
inputs: | |
hostd-version: | |
description: hostd commit hash or branch name to use | |
required: false | |
default: 'master' | |
renterd-version: | |
description: renterd commit hash or branch name to use | |
required: false | |
default: 'dev' | |
schedule: | |
- cron: '0 0 * * *' | |
permissions: | |
contents: write | |
pull-requests: write | |
jobs: | |
benchmark: | |
runs-on: linux-benchmark | |
timeout-minutes: 30 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: stable | |
- name: Prepare | |
run: | | |
go get go.sia.tech/hostd@${{ github.event.inputs.hostd-version || 'master' }} | |
go get go.sia.tech/renterd@${{ github.event.inputs.renterd-version || 'dev' }} | |
go mod tidy | |
mkdir -p results | |
CGO_ENABLED=1 go build -o bin/ -trimpath -a ./cmd/benchmark | |
git reset --hard | |
- name: Run | |
run: ./bin/benchmark -output results | |
- name: Add Result | |
uses: peter-evans/create-pull-request@v7 | |
id: result | |
with: | |
delete-branch: true | |
commit-message: Add benchmark results | |
title: Add benchmark results | |
branch: benchmark-result | |
labels: | | |
benchmark | |
add-paths: | | |
results/*.csv | |
- name: Automerge | |
run: gh pr merge --merge --auto "${{ steps.result.outputs.pull-request-number }}" | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |