forked from aws/s2n-tls
-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (43 loc) · 1.45 KB
/
bench.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
46
47
48
49
50
51
name: Benchmarking
on:
push:
branches: [main]
schedule:
# run the job daily at midnight
- cron: "0 0 * * *"
jobs:
bench:
runs-on: ubuntu-latest
permissions:
contents: read # This is required for actions/checkout
id-token: write # This is required for requesting the JWT
steps:
- uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v1
with:
python-version: '3.x'
- name: Install dependencies
run: |
rustup toolchain install stable
rustup override set stable
cargo install cargo-criterion
pip3 install "boto3[crt]"
- name: Generate
working-directory: bindings/rust
run: ./generate.sh --skip-tests
- name: Benchmark
working-directory: bindings/rust/bench
run: cargo criterion --message-format json > criterion_output.log
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4.0.1
with:
role-to-assume: arn:aws:iam::024603541914:role/GitHubOIDCRole
role-session-name: s2ntlsghabenchsession
aws-region: us-west-2
- name: Emit CloudWatch metrics
run: |
python3 .github/bin/criterion_to_cloudwatch.py \
--criterion_output_path bindings/rust/bench/criterion_output.log \
--namespace s2n-tls-bench \
--platform ${{ runner.os }}-${{ runner.arch }}