Skip to content

Commit

Permalink
feat: add CodSpeed to the project
Browse files Browse the repository at this point in the history
  • Loading branch information
adriencaccia authored and CodSpeed Install Bot committed Sep 3, 2024
1 parent 709e9de commit 859af91
Show file tree
Hide file tree
Showing 13 changed files with 18 additions and 1,275 deletions.
23 changes: 0 additions & 23 deletions .github/workflows/auto-close-stale.yml

This file was deleted.

46 changes: 13 additions & 33 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,18 @@
name: Benchmark
on:
push:
branches:
- main
pull_request:
paths:
- '.github/workflows/benchmark.yml'
- 'src/**'
- 'tests/**'
workflow_dispatch:
inputs:
base_commit:
description: The base commit to compare against


permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true

env:
CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse

Expand All @@ -28,38 +23,23 @@ jobs:
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
timeout-minutes: 3
with:
persist-credentials: false
path: "cryptography-pr"
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
timeout-minutes: 3
with:
repository: "pyca/cryptography"
path: "cryptography-base"
ref: "${{ github.event.inputs.base_commit || github.base_ref }}"
- name: Clone test vectors
timeout-minutes: 2
uses: ./cryptography-base/.github/actions/fetch-vectors
uses: ./.github/actions/fetch-vectors

- name: Setup python
id: setup-python
uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0
with:
python-version: "3.11"
python-version: "3.12"

- name: Create virtualenv (base)
run: |
python -m venv .venv-base
.venv-base/bin/pip install -v -c ./cryptography-base/ci-constraints-requirements.txt "./cryptography-base[test]" ./cryptography-base/vectors/
- name: Create virtualenv (PR)
- name: Create virtualenv
run: |
python -m venv .venv-pr
.venv-pr/bin/pip install -v -c ./cryptography-pr/ci-constraints-requirements.txt "./cryptography-pr[test]" ./cryptography-pr/vectors/
python -m venv .venv
.venv/bin/pip install -v -c ./ci-constraints-requirements.txt "./[test]" ./vectors/
- name: Run benchmarks (base)
run: .venv-base/bin/pytest --benchmark-enable --benchmark-only ./cryptography-pr/tests/bench/ --benchmark-json=bench-base.json --x509-limbo-root=x509-limbo/
- name: Run benchmarks (PR)
run: .venv-pr/bin/pytest --benchmark-enable --benchmark-only ./cryptography-pr/tests/bench/ --benchmark-json=bench-pr.json --x509-limbo-root=x509-limbo/

- name: Compare results
run: python ./cryptography-pr/.github/compare_benchmarks.py bench-base.json bench-pr.json | tee -a $GITHUB_STEP_SUMMARY
- 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/
71 changes: 0 additions & 71 deletions .github/workflows/boring-open-version-bump.yml

This file was deleted.

80 changes: 0 additions & 80 deletions .github/workflows/build_openssl.sh

This file was deleted.

Loading

0 comments on commit 859af91

Please sign in to comment.