forked from 1c3t3a/rust-socketio
-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (53 loc) · 1.82 KB
/
benchmark.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
on:
pull_request:
types: [opened]
issue_comment:
types: [created]
name: benchmark engine.io
jobs:
runBenchmark:
name: run benchmark
runs-on: ubuntu-latest
steps:
- uses: khan/pull-request-comment-trigger@master
id: check
with:
trigger: '/benchmark'
reaction: rocket
env:
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
- name: Checkout repository
if: steps.check.outputs.triggered == 'true'
uses: actions/checkout@v2
- name: Setup rust environment
if: steps.check.outputs.triggered == 'true'
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- name: Setup docker
if: steps.check.outputs.triggered == 'true'
id: buildx
uses: docker/setup-buildx-action@v1
- name: Generate keys
if: steps.check.outputs.triggered == 'true'
run: make keys
- name: Build docker container
if: steps.check.outputs.triggered == 'true'
run: |
cd ci && docker build -t test_suite:latest .
docker run -d -p 4200:4200 -p 4201:4201 -p 4202:4202 -p 4203:4203 -p 4204:4204 -p 4205:4205 -p 4206:4206 test_suite:latest
- name: Extract branch name
if: steps.check.outputs.triggered == 'true'
shell: bash
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
id: extract_branch
- uses: actions/checkout@master
if: steps.check.outputs.triggered == 'true'
- uses: boa-dev/criterion-compare-action@v3.2.0
if: steps.check.outputs.triggered == 'true'
with:
cwd: "engineio"
branchName: ${{ steps.extract_branch.outputs.branch }}
token: ${{ secrets.GITHUB_TOKEN }}