-
Notifications
You must be signed in to change notification settings - Fork 712
91 lines (78 loc) · 2.79 KB
/
regression_ci.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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: MIT-0
name: Performance Regression Test
on:
push:
branches: [main]
pull_request:
branches:
- main
paths-ignore:
- tests/regression/**
merge_group:
types: [checks_requested]
branches: [main]
jobs:
regression-test:
runs-on: ubuntu-latest
if: ${{ github.event_name == 'pull_request' }}
steps:
# Checkout the code from the pull request branch
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
# Install the stable Rust toolchain
- name: Install Rust toolchain
id: toolchain
run: |
rustup toolchain install stable
rustup override set stable
# Update the package list on the runner
- name: Update package list
run: sudo apt-get update
# Download and install Valgrind 3.23 from source
- name: Download Valgrind 3.23 Source
run: |
wget https://sourceware.org/pub/valgrind/valgrind-3.23.0.tar.bz2
tar -xjf valgrind-3.23.0.tar.bz2
cd valgrind-3.23.0
./configure
make
sudo make install
# Switch to the main branch
- name: Switch to mainline
run: |
git fetch origin main
git switch main
# Generate bindings for main branch
- name: Generate bindings (mainline)
run: ${{env.ROOT_PATH}}bindings/rust/generate.sh --skip-tests
# Run performance tests using Valgrind for main branch
- name: Run scalar performance test (mainline)
env:
PERF_MODE: valgrind
run: cargo test --release --manifest-path=tests/regression/Cargo.toml
# Checkout pull request branch
- name: Checkout pull request branch
run: git checkout ${{ github.event.pull_request.head.sha }}
# Generate bindings for PR branch
- name: Generate bindings (PR branch)
run: ${{env.ROOT_PATH}}bindings/rust/generate.sh --skip-tests
# Run performance tests using Valgrind for PR branch
- name: Run scalar performance test (PR branch)
env:
PERF_MODE: valgrind
run: cargo test --release --manifest-path=tests/regression/Cargo.toml
# Run the differential performance test
- name: Run diff test
env:
PERF_MODE: diff
run: cargo test --release --manifest-path=tests/regression/Cargo.toml
# Upload the performance output artifacts. This runs even if run diff test fails so debug files can be accessed
- name: Upload artifacts
if: ${{ always() }}
uses: actions/upload-artifact@v4
with:
name: regression_artifacts
path: tests/regression/target/regression_artifacts