mirror of
https://github.com/rosenpass/rosenpass.git
synced 2025-12-31 15:08:15 -08:00
Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 5. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v4...v5) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: '5' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
91 lines
2.5 KiB
YAML
91 lines
2.5 KiB
YAML
name: rosenpass - protocol - benchmark
|
|
|
|
permissions:
|
|
contents: write
|
|
|
|
on:
|
|
#pull_request:
|
|
push:
|
|
|
|
env:
|
|
CARGO_TERM_COLOR: always
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
proto-benchmark:
|
|
strategy:
|
|
fail-fast: true
|
|
matrix:
|
|
system: ["x86_64-linux", "i686-linux"]
|
|
|
|
runs-on: ubicloud-standard-2
|
|
defaults:
|
|
run:
|
|
shell: bash
|
|
|
|
steps:
|
|
- uses: actions/checkout@v5
|
|
|
|
# Install nix
|
|
|
|
- name: Install Nix
|
|
uses: cachix/install-nix-action@v27 # A popular action for installing Nix
|
|
with:
|
|
extra_nix_config: |
|
|
experimental-features = nix-command flakes
|
|
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
|
|
|
|
# Set up environment
|
|
|
|
- name: 🛠️ Prepare Benchmark Path
|
|
env:
|
|
EVENT_NAME: ${{ github.event_name }}
|
|
BRANCH_NAME: ${{ github.ref_name }}
|
|
PR_NUMBER: ${{ github.event.pull_request.number }}
|
|
run: |
|
|
case "$EVENT_NAME" in
|
|
"push")
|
|
echo "BENCH_PATH=branch/$BRANCH_NAME" >> $GITHUB_ENV
|
|
;;
|
|
"pull_request")
|
|
echo "BENCH_PATH=pull/$PR_NUMBER" >> $GITHUB_ENV
|
|
;;
|
|
*)
|
|
echo "don't know benchmark path for event of type $EVENT_NAME, aborting"
|
|
exit 1
|
|
esac
|
|
|
|
# Benchmarks ...
|
|
|
|
- name: 🏃🏻♀️ Benchmarks
|
|
run: nix develop ".#devShells.${{ matrix.system }}.benchmarks" --command cargo bench -p rosenpass --bench trace_handshake -F trace_bench --verbose >bench-protocol.json
|
|
|
|
- name: Upload benchmarks
|
|
uses: cryspen/benchmark-upload-and-plot-action@v3
|
|
with:
|
|
name: Protocol Benchmarks
|
|
group-by: "operating system,architecture,protocol version,run time"
|
|
schema: "operating system,architecture,protocol version,run time,name"
|
|
input-data-path: bench-protocol.json
|
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
# NOTE: pushes to current repository
|
|
gh-repository: github.com/${{ github.repository }}
|
|
auto-push: true
|
|
fail-on-alert: true
|
|
base-path: benchmarks/
|
|
|
|
ciphers-protocol-bench-status:
|
|
if: ${{ always() }}
|
|
needs: [proto-benchmark]
|
|
runs-on: ubicloud-standard-2
|
|
steps:
|
|
- name: Successful
|
|
if: ${{ !(contains(needs.*.result, 'failure')) }}
|
|
run: exit 0
|
|
- name: Failing
|
|
if: ${{ (contains(needs.*.result, 'failure')) }}
|
|
run: exit 1
|