-
-
Notifications
You must be signed in to change notification settings - Fork 261
34 lines (32 loc) · 1.42 KB
/
rapier-ci-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
name: Rapier CI bench
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
workflow_dispatch:
jobs:
send-bench-message:
env:
BENCHBOT_AMQP_USER: ${{ secrets.BENCHBOT_AMQP_USER }}
BENCHBOT_AMQP_PASS: ${{ secrets.BENCHBOT_AMQP_PASS }}
BENCHBOT_AMQP_VHOST: ${{ secrets.BENCHBOT_AMQP_VHOST }}
BENCHBOT_AMQP_HOST: ${{ secrets.BENCHBOT_AMQP_HOST }}
BENCHBOT_TARGET_REPO: ${{ github.repository }}
BENCHBOT_TARGET_COMMIT: ${{ github.event.pull_request.head.sha }}
BENCHBOT_SHA: ${{ github.sha }}
BENCHBOT_HEAD_REF: ${{github.head_ref}}
BENCHBOT_OTHER_BACKENDS: false
runs-on: ubuntu-latest
steps:
- name: Find commit SHA
if: github.ref == 'refs/heads/master'
run: |
echo "::set-env name=BENCHBOT_TARGET_COMMIT::$BENCHBOT_SHA"
echo "::set-env name=BENCHBOT_OTHER_BACKENDS::true"
- name: Send 3D bench message
shell: bash
run: curl -u $BENCHBOT_AMQP_USER:$BENCHBOT_AMQP_PASS
-i -H "content-type:application/json" -X POST
https://$BENCHBOT_AMQP_HOST/api/exchanges/$BENCHBOT_AMQP_VHOST//publish
-d'{"properties":{},"routing_key":"benchmark","payload":"{ \"repository\":\"https://github.com/'$BENCHBOT_TARGET_REPO'\", \"branch\":\"'$GITHUB_REF'\", \"commit\":\"'$BENCHBOT_TARGET_COMMIT'\", \"other_backends\":'$BENCHBOT_OTHER_BACKENDS' }","payload_encoding":"string"}'