forked from pyca/cryptography
-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (39 loc) · 1.17 KB
/
benchmark.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
name: Benchmark
on:
push:
branches:
- main
pull_request:
paths:
- '.github/workflows/benchmark.yml'
- 'src/**'
- 'tests/**'
workflow_dispatch:
permissions:
contents: read
env:
CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse
jobs:
benchmark:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
timeout-minutes: 3
- name: Clone test vectors
timeout-minutes: 2
uses: ./.github/actions/fetch-vectors
- name: Setup python
id: setup-python
uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1
with:
python-version: "3.12"
- name: Create virtualenv
run: |
python -m venv .venv
.venv/bin/pip install -v -c ./ci-constraints-requirements.txt "./[test]" ./vectors/
- name: Run benchmarks
uses: CodSpeedHQ/action@v2
with:
token: ${{ secrets.CODSPEED_TOKEN }}
run: .venv/bin/pytest --codspeed --benchmark-enable --benchmark-only ./tests/bench/ --benchmark-json=bench-pr.json --x509-limbo-root=x509-limbo/