You've already forked opentelemetry-go
mirror of
https://github.com/open-telemetry/opentelemetry-go.git
synced 2026-06-03 18:35:08 +02:00
22178ff2fc
## What - Update `.github/workflows/benchmark.yml` to run on `oracle-bare-metal-64cpu-512gb-x86-64` instead of the Equinix bare metal/self-hosted pool. - Fixes https://github.com/open-telemetry/opentelemetry-go/issues/7182 ## Why Equinix Metal is being sunset and the current Equinix bare metal runners are unavailable, so we need to move benchmark execution to the Oracle bare metal runner pool. Context: open-telemetry/community#2801 Equinix announcement: https://docs.equinix.com/metal/
56 lines
2.0 KiB
YAML
56 lines
2.0 KiB
YAML
name: Benchmark
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
workflow_dispatch:
|
|
|
|
# Declare default permissions as read only.
|
|
permissions: read-all
|
|
|
|
env:
|
|
DEFAULT_GO_VERSION: "~1.25.0"
|
|
jobs:
|
|
benchmark:
|
|
permissions:
|
|
contents: write # required for pushing to gh-pages branch
|
|
name: Benchmarks
|
|
runs-on: oracle-bare-metal-64cpu-512gb-x86-64
|
|
steps:
|
|
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
|
- uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
|
|
with:
|
|
go-version: ${{ env.DEFAULT_GO_VERSION }}
|
|
check-latest: true
|
|
cache-dependency-path: "**/go.sum"
|
|
- name: Run benchmarks
|
|
run: make benchmark | tee output.txt
|
|
- name: Download previous benchmark data
|
|
uses: actions/cache/restore@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
|
|
with:
|
|
path: ./benchmarks
|
|
# `github.event.before` means the commit before the push (i.e. the previous commit).
|
|
# So we can fetch the exact benchmark data from the previous commit.
|
|
key: ${{ runner.os }}-benchmark-${{ github.event.before }}
|
|
- name: Store benchmarks result
|
|
uses: benchmark-action/github-action-benchmark@d48d326b4ca9ba73ca0cd0d59f108f9e02a381c7 # v1.20.4
|
|
with:
|
|
name: Benchmarks
|
|
tool: 'go'
|
|
output-file-path: output.txt
|
|
external-data-json-path: ./benchmarks/data.json
|
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
gh-pages-branch: benchmarks
|
|
fail-on-alert: true
|
|
alert-threshold: "400%"
|
|
# Add benchmark summary to GitHub workflow run report
|
|
summary-always: true
|
|
- name: Save benchmark data
|
|
uses: actions/cache/save@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
|
|
# The cache will be saved even if a step fails.
|
|
if: always()
|
|
with:
|
|
path: ./benchmarks
|
|
# Use the current commit SHA as the cache key.
|
|
key: ${{ runner.os }}-benchmark-${{ github.sha }}
|