forked from virtuallynathan/qpep
-
Notifications
You must be signed in to change notification settings - Fork 2
106 lines (96 loc) · 3.2 KB
/
performance.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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
name: PerformanceTests
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: ${{ secrets.AWS_DEFAULT_REGION }}
AWS_INSTANCE_ID: ${{ secrets.AWS_INSTANCE_ID }}
on:
schedule:
- cron: '1 1 * * *'
workflow_dispatch:
inputs:
server_public_address:
description: 'public address for the server'
type: string
default: 35.163.142.7
required: true
server_private_address:
description: 'private address for the server'
type: string
default: 172.31.38.198
required: true
client_listen_address:
description: 'address for the client to listen on'
type: string
default: 172.31.21.30
required: true
connection_delay_device:
description: 'serverside network device to set delay on'
type: string
default: eth0
required: true
ignore_caches:
description: 'resets caches to force new build'
type: boolean
default: false
required: true
keep_aws_running:
description: 'keeps aws vm running for subsequent runs'
type: boolean
default: false
required: true
run-name: Performance Testing [${{ github.event_name }}][${{ github.head_ref || github.ref_name }}] - ${{ inputs.server_public_address || '35.163.142.7' }}/${{ inputs.connect_delay_ms || '500' }}ms delay
jobs:
launch-aws-vm:
runs-on: ubuntu-latest
steps:
- name: Install AWS cli
id: install-aws-cli
uses: unfor19/install-aws-cli-action@master
with:
version: "2"
- run: |
aws --version
# run the instance
aws ec2 start-instances --instance-ids ${{ secrets.AWS_INSTANCE_ID }}
shell: bash
- run: |
# assure that the instance is stopped on error
aws ec2 stop-instances --instance-ids ${{ secrets.AWS_INSTANCE_ID }}
shell: bash
if: ${{ failure() && ! inputs.keep_aws_running }}
stop-aws-vm:
runs-on: ubuntu-latest
needs: qpep-run
if: ${{ always() && ! inputs.keep_aws_running }}
steps:
- name: Install AWS cli
id: install-aws-cli
uses: unfor19/install-aws-cli-action@master
with:
version: "2"
- run: |
# assure that the instance is stopped even on error
aws ec2 stop-instances --instance-ids ${{ secrets.AWS_INSTANCE_ID }}
shell: bash
qpep-run:
needs: launch-aws-vm
strategy:
max-parallel: 1
matrix:
backend: [ 'quic-go', 'quicly-go' ]
cca: [ 'reno', 'search' ]
connection_delay_ms: [ 0, 500 ]
exclude:
- backend: 'quic-go'
cca: 'search'
uses: './.github/workflows/common-performance.yml'
with:
server_public_address: ${{ inputs.server_public_address }}
server_private_address: ${{ inputs.server_private_address }}
client_listen_address: ${{ inputs.client_listen_address }}
connection_delay_device: ${{ inputs.connection_delay_device }}
ignore_caches: ${{ inputs.ignore_caches }}
backend: ${{ matrix.backend }}
cca: ${{ matrix.cca }}
secrets: inherit