Skip to content

Commit 8bddde5

Browse files
Merge remote-tracking branch 'upstream/main' into fix/benchmark-push-retries
# Conflicts: # bench_runner/templates/_benchmark.src.yml
2 parents e8bc08a + 486c066 commit 8bddde5

38 files changed

Lines changed: 425 additions & 141 deletions

‎.github/dependabot.yml‎

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,24 @@
1-
# To get started with Dependabot version updates, you'll need to specify which
2-
# package ecosystems to update and where the package manifests are located.
3-
# Please see the documentation for all configuration options:
4-
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
5-
61
version: 2
72
updates:
8-
- package-ecosystem: "pip" # See documentation for possible values
9-
directory: "/" # Location of package manifests
3+
- package-ecosystem: "github-actions"
4+
directories:
5+
- "/"
6+
- "/bench_runner/templates"
7+
schedule:
8+
interval: "monthly"
9+
groups:
10+
actions:
11+
patterns: ["*"]
12+
cooldown:
13+
default-days: 14
14+
15+
- package-ecosystem: "pip"
16+
directory: "/"
1017
schedule:
11-
interval: "weekly"
18+
interval: "monthly"
19+
groups:
20+
pip:
21+
patterns: ["*"]
22+
exclude-patterns: ["pyperf"]
23+
cooldown:
24+
default-days: 14

‎.github/workflows/actions.lock‎

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
# This file is machine-generated by `gh actions-lock`.
2+
# Do not edit by hand; run `gh actions-lock` to update.
3+
# Docs: https://gh.io/actions-lockfile
4+
version: 'v0.0.3'
5+
workflows:
6+
'.github/workflows/ci.yml':
7+
- 'actions/checkout@v7.0.1'
8+
- 'actions/setup-python@v7.1.0'
9+
'.github/workflows/lint.yml':
10+
- 'actions/checkout@v7.0.1'
11+
- 'actions/setup-python@v7.1.0'
12+
- 'j178/prek-action@v3.1.0'
13+
'.github/workflows/pypi.yml':
14+
- 'actions/checkout@v7.0.1'
15+
- 'actions/download-artifact@v8.0.2'
16+
- 'actions/setup-python@v7.1.0'
17+
- 'actions/upload-artifact@v7.0.2'
18+
- 'pypa/gh-action-pypi-publish@v1.14.3'
19+
- 'sigstore/gh-action-sigstore-python@v3.5.0'
20+
dependencies:
21+
'actions/checkout@v7.0.1':
22+
ref: 'v7.0.1'
23+
commit: 'sha1-3d3c42e5aac5ba805825da76410c181273ba90b1'
24+
owner_id: 44036562
25+
repo_id: 197814629
26+
'actions/download-artifact@v8.0.2':
27+
ref: 'v8.0.2'
28+
commit: 'sha1-9000827ccba6bdab643e8b6fd33ac0654aef8333'
29+
owner_id: 44036562
30+
repo_id: 192626254
31+
'actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405':
32+
ref: 'v6.2.0'
33+
commit: 'sha1-a309ff8b426b58ec0e2a45f0f869d46889d02405'
34+
owner_id: 44036562
35+
repo_id: 192625525
36+
'actions/setup-python@v7.1.0':
37+
ref: 'v7.1.0'
38+
commit: 'sha1-6d4fd22b20465ccc0f7354476588e8df7c9ca0e0'
39+
owner_id: 44036562
40+
repo_id: 192625525
41+
'actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a':
42+
ref: 'v7.0.1'
43+
commit: 'sha1-043fb46d1a93c77aae656e7c1c64a875d1fc6a0a'
44+
owner_id: 44036562
45+
repo_id: 192625955
46+
'actions/upload-artifact@v7.0.2':
47+
ref: 'v7.0.2'
48+
commit: 'sha1-cf430e030ddbb5b0abf93d22962f4752f3646cd9'
49+
owner_id: 44036562
50+
repo_id: 192625955
51+
'j178/prek-action@v3.1.0':
52+
ref: 'v3.1.0'
53+
commit: 'sha1-44924fe9ef4a6f88253c4b6b1bf11c689d3ce53d'
54+
owner_id: 10510431
55+
repo_id: 1052387486
56+
'pypa/gh-action-pypi-publish@v1.14.3':
57+
ref: 'v1.14.3'
58+
commit: 'sha1-7245906fb61fa33a13554f9d5fb856fe61758086'
59+
owner_id: 647025
60+
repo_id: 178055147
61+
uses:
62+
- 'actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405'
63+
'sigstore/gh-action-sigstore-python@v3.5.0':
64+
ref: 'v3.5.0'
65+
commit: 'sha1-790bc6befb9d733738f18d8f895854b453640ec9'
66+
owner_id: 71096353
67+
repo_id: 508560980
68+
uses:
69+
- 'actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a'
70+
- 'softprops/action-gh-release@3d0d9888cb7fd7b750713d6e236d1fcb99157228'
71+
'softprops/action-gh-release@3d0d9888cb7fd7b750713d6e236d1fcb99157228':
72+
ref: 'v3.0.2'
73+
commit: 'sha1-3d0d9888cb7fd7b750713d6e236d1fcb99157228'
74+
owner_id: 2242
75+
repo_id: 204253808

‎.github/workflows/ci.yml‎

Lines changed: 29 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -7,28 +7,34 @@ name: ci
77
branches:
88
- main
99

10+
permissions:
11+
contents: read
12+
1013
jobs:
11-
lint:
12-
runs-on: ubuntu-latest
14+
lockfile:
15+
runs-on: ubuntu-slim
16+
timeout-minutes: 10
1317
steps:
14-
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
15-
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
18+
- uses: actions/checkout@v7.0.1
1619
with:
17-
python-version: "3.11"
18-
cache: pip
19-
- name: Install dependencies
20-
run: python -m pip install .[test]
21-
- name: Run lints
22-
run: ./lint.sh
20+
persist-credentials: false
21+
- name: Verify workflow lockfile
22+
env:
23+
GH_TOKEN: ${{ github.token }}
24+
run: |
25+
gh extension install github/gh-actions-lock --pin v0.4.1
26+
gh actions-lock --verify
2327
2428
test:
2529
runs-on: ubuntu-latest
2630
strategy:
2731
matrix:
28-
python_version: ["3.11", "3.12", "3.13"]
32+
python_version: ["3.11", "3.12", "3.13", "3.14", "3.15"]
2933
steps:
30-
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
31-
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
34+
- uses: actions/checkout@v7.0.1
35+
with:
36+
persist-credentials: false
37+
- uses: actions/setup-python@v7.1.0
3238
with:
3339
python-version: ${{ matrix.python_version }}
3440
cache: pip
@@ -42,10 +48,12 @@ jobs:
4248
long_test_linux:
4349
runs-on: ubuntu-latest
4450
steps:
45-
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
46-
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
51+
- uses: actions/checkout@v7.0.1
52+
with:
53+
persist-credentials: false
54+
- uses: actions/setup-python@v7.1.0
4755
with:
48-
python-version: 3.13
56+
python-version: "3.15"
4957
cache: pip
5058
- name: install dependencies
5159
run: |
@@ -57,10 +65,12 @@ jobs:
5765
long_test_windows:
5866
runs-on: windows-latest
5967
steps:
60-
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
61-
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
68+
- uses: actions/checkout@v7.0.1
69+
with:
70+
persist-credentials: false
71+
- uses: actions/setup-python@v7.1.0
6272
with:
63-
python-version: 3.13
73+
python-version: "3.15"
6474
cache: pip
6575
- name: install dependencies
6676
run: |

‎.github/workflows/lint.yml‎

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
name: lint
3+
4+
"on":
5+
pull_request:
6+
push:
7+
branches:
8+
- main
9+
10+
permissions:
11+
contents: read
12+
13+
jobs:
14+
lint:
15+
runs-on: ubuntu-latest
16+
timeout-minutes: 10
17+
steps:
18+
- uses: actions/checkout@v7.0.1
19+
with:
20+
persist-credentials: false
21+
- uses: actions/setup-python@v7.1.0
22+
with:
23+
python-version: "3.x"
24+
cache: pip
25+
- name: Install dependencies
26+
run: python -m pip install ".[test]"
27+
- uses: j178/prek-action@v3.1.0

‎.github/workflows/pypi.yml‎

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,20 @@ on:
77
tags:
88
- 'v*.*.*'
99

10+
permissions:
11+
contents: read
12+
1013
jobs:
1114
build:
1215
name: Build distribution 📦
1316
runs-on: ubuntu-latest
1417

1518
steps:
16-
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
19+
- uses: actions/checkout@v7.0.1
1720
with:
1821
persist-credentials: false
1922
- name: Set up Python
20-
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
23+
uses: actions/setup-python@v7.1.0
2124
with:
2225
python-version: "3.x"
2326
- name: Install pypa/build
@@ -27,7 +30,7 @@ jobs:
2730
run: |
2831
python3 -m build
2932
- name: Store the distribution packages
30-
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.0
33+
uses: actions/upload-artifact@v7.0.2
3134
with:
3235
name: python-package-distributions
3336
path: dist/
@@ -46,12 +49,12 @@ jobs:
4649

4750
steps:
4851
- name: Download all the dists
49-
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c #v8.0.1
52+
uses: actions/download-artifact@v8.0.2
5053
with:
5154
name: python-package-distributions
5255
path: dist/
5356
- name: Publish distribution 📦 to PyPI
54-
uses: pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b #v1.14.0
57+
uses: pypa/gh-action-pypi-publish@v1.14.3
5558

5659
github-release:
5760
name: >-
@@ -67,12 +70,12 @@ jobs:
6770

6871
steps:
6972
- name: Download all the dists
70-
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c #v8.0.1
73+
uses: actions/download-artifact@v8.0.2
7174
with:
7275
name: python-package-distributions
7376
path: dist/
7477
- name: Sign the dists with Sigstore
75-
uses: sigstore/gh-action-sigstore-python@04cffa1d795717b140764e8b640de88853c92acc # v3.3.0
78+
uses: sigstore/gh-action-sigstore-python@v3.5.0
7679
with:
7780
inputs: >-
7881
./dist/*.tar.gz
@@ -94,4 +97,4 @@ jobs:
9497
run: >-
9598
gh release upload
9699
"$GITHUB_REF_NAME" dist/**
97-
--repo "$GITHUB_REPOSITORY"
100+
--repo "$GITHUB_REPOSITORY"

‎.pre-commit-config.yaml‎

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
repos:
2+
- repo: https://github.com/astral-sh/ruff-pre-commit
3+
rev: e05c5c0818279e5ac248ac9e954431ba58865e61 # frozen: v0.15.7
4+
hooks:
5+
- id: ruff-check
6+
args: [--exit-non-zero-on-fix]
7+
- id: ruff-format
8+
args: [--exit-non-zero-on-fix]
9+
10+
- repo: https://github.com/zizmorcore/zizmor-pre-commit
11+
rev: 06a39750ec31860bb44f2acf67182c40016cd1e7 # frozen: v1.32.0
12+
hooks:
13+
- id: zizmor
14+
args: [--offline, --strict-collection, .github]
15+
pass_filenames: false
16+
files: ^\.github/
17+
types: [file] # Include actions.lock.
18+
stages: [pre-commit]
19+
20+
- repo: local
21+
hooks:
22+
- id: pyright
23+
name: pyright
24+
entry: python -m pyright bench_runner
25+
language: system
26+
pass_filenames: false
27+
types: [python]
28+
stages: [pre-commit]

‎CHANGELOG.md‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,18 @@
11
## Unreleased
22

3+
### Configurable benchmark timeout per runner
4+
5+
Set `timeout_minutes` in a runner's `bench_runner.toml` configuration to
6+
override its benchmark job timeout.
7+
38
### Bugfixes
49

10+
#### Build against OpenSSL 3 on macOS
11+
12+
macOS builds now default to Homebrew's `openssl@3` instead of the removed `openssl@1.1`.
13+
If `openssl@3` is not installed, run `brew install openssl@3` on existing macOS
14+
runners before you update `bench_runner`.
15+
516
#### Use PGO on weekly builds
617

718
Since 2.0.0, PGO was not being used on weekly builds. This is now fixed.

‎DEVELOPER.md‎

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,23 @@
22

33
This repository contains a number of GitHub Actions workflows to run benchmarks on a set of private, self-hosted, bare metal machines.
44

5+
## Linting
6+
7+
We recommend [prek](https://prek.j178.dev/) to run the hooks in
8+
`.pre-commit-config.yaml`. From the repository root, with a virtual environment active:
9+
10+
```sh
11+
python -m pip install -e ".[test]" prek
12+
prek install
13+
prek run --all-files
14+
```
15+
16+
The hooks include zizmor checks for `.github`.
17+
18+
After changing action references or adding workflows under `.github/workflows`,
19+
run `gh actions-lock` and commit the updated lockfile with the workflow changes.
20+
This requires the [gh-actions-lock extension](https://github.com/github/gh-actions-lock).
21+
522
## The workflows
623

724
There is a single user-facing workflow, `benchmark.yml`, that [reuses](https://docs.github.com/en/actions/using-workflows/reusing-workflows) the other workflows, prefixed with `_`.

0 commit comments

Comments
 (0)