Debian Codegraph @

crt/s2n/.github/workflows/regression_ci.yml

raw symbols SCIP
1 # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2 # SPDX-License-Identifier: MIT-0
3 name: Performance Regression Test
4
5 on:
6 push:
7 branches: [main]
8 pull_request:
9 branches:
10 - main
11 merge_group:
12 types: [checks_requested]
13 branches: [main]
14
15 env:
16 ROOT_PATH: bindings/rust/extended
17
18 permissions:
19 contents: read
20
21 jobs:
22 regression-test:
23 runs-on: ubuntu-latest
24 if: ${{ github.event_name == 'pull_request' }}
25 steps:
26 # Checkout the code from the pull request branch
27 - name: Checkout code
28 uses: actions/checkout@v7
29 with:
30 ref: ${{ github.event.pull_request.head.sha }}
31
32 # Install the stable Rust toolchain
33 - name: Install Rust toolchain
34 id: toolchain
35 run: |
36 rustup toolchain install stable
37 rustup override set stable
38
39 # Update the package list on the runner
40 - name: Update package list
41 run: sudo apt-get update
42
43 # Download and install Valgrind 3.23 from source
44 - name: Download Valgrind 3.23 Source
45 run: |
46 wget https://sourceware.org/pub/valgrind/valgrind-3.23.0.tar.bz2
47 tar -xjf valgrind-3.23.0.tar.bz2
48 cd valgrind-3.23.0
49 ./configure
50 make
51 sudo make install
52
53 # Switch to the main branch
54 - name: Switch to mainline
55 run: |
56 git fetch origin main
57 git switch main
58
59 # Generate bindings for main branch
60 - name: Generate bindings (mainline)
61 run: ${{env.ROOT_PATH}}/generate.sh --skip-tests
62
63 # Run performance tests using Valgrind for main branch
64 - name: Run scalar performance test (mainline)
65 env:
66 PERF_MODE: valgrind
67 run: cargo test --release --manifest-path=tests/regression/Cargo.toml
68
69 # Checkout pull request branch
70 - name: Checkout pull request branch
71 run: git checkout ${{ github.event.pull_request.head.sha }}
72
73 # Generate bindings for PR branch
74 - name: Generate bindings (PR branch)
75 run: ${{env.ROOT_PATH}}/generate.sh --skip-tests
76
77 # Run performance tests using Valgrind for PR branch
78 - name: Run scalar performance test (PR branch)
79 env:
80 PERF_MODE: valgrind
81 run: cargo test --release --manifest-path=tests/regression/Cargo.toml
82
83 # Run the differential performance test
84 - name: Run diff test
85 env:
86 PERF_MODE: diff
87 run: cargo test --release --manifest-path=tests/regression/Cargo.toml
88
89 # Upload the performance output artifacts. This runs even if run diff test fails so debug files can be accessed
90 - name: Upload artifacts
91 if: ${{ always() }}
92 uses: actions/upload-artifact@v7
93 with:
94 name: regression_artifacts
95 path: tests/regression/target/regression_artifacts