aboutsummaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorCrozet Sébastien <developer@crozet.re>2020-09-28 15:03:50 +0200
committerCrozet Sébastien <developer@crozet.re>2020-09-28 15:15:49 +0200
commit94554f075ae354b9b2d15a51301fc15f23d45dc7 (patch)
treeb3f558c51e1b4fe51cfa6235ec5bd907c5537a59 /.github
parent0691410b830f8f7028903c8da8d4542fa23d45fb (diff)
downloadrapier-94554f075ae354b9b2d15a51301fc15f23d45dc7.tar.gz
rapier-94554f075ae354b9b2d15a51301fc15f23d45dc7.tar.bz2
rapier-94554f075ae354b9b2d15a51301fc15f23d45dc7.zip
Add branch selector to the CI bench workflow.
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/rapier-ci-bench.yml19
1 files changed, 14 insertions, 5 deletions
diff --git a/.github/workflows/rapier-ci-bench.yml b/.github/workflows/rapier-ci-bench.yml
index cef9b15..89ed247 100644
--- a/.github/workflows/rapier-ci-bench.yml
+++ b/.github/workflows/rapier-ci-bench.yml
@@ -1,12 +1,19 @@
name: Rapier CI bench
on:
- workflow_dispatch
+ push:
+ branches: [ master ]
+ pull_request:
+ branches: [ master ]
+ workflow_dispatch:
jobs:
send-bench-message:
runs-on: ubuntu-latest
steps:
+ - name: Get the latest commit on PR
+ id: get-latest-commit
+ uses: ActionsRML/get-PR-latest-commit@v1
- name: Send 3D bench message
shell: bash
env:
@@ -14,7 +21,9 @@ jobs:
BENCHBOT_AMQP_PASS: ${{ secrets.BENCHBOT_AMQP_PASS }}
BENCHBOT_AMQP_VHOST: ${{ secrets.BENCHBOT_AMQP_VHOST }}
BENCHBOT_AMQP_HOST: ${{ secrets.BENCHBOT_AMQP_HOST }}
- run: curl -u ${BENCHBOT_AMQP_USER}:${BENCHBOT_AMQP_PASS} \
- -i -H "content-type:application/json" -X POST \
- https://${BENCHBOT_AMQP_PASS}/api/exchanges/${BENCHBOT_AMQP_VHOST}//publish \
- -d'{"properties":{},"routing_key":"benchmark","payload":"{ \"repository\":\"https://github.com/dimforge/rapier\", \"branch\":\"$GITHUB_REF\", \"commit\":\"$GITHUB_SHA\" }","payload_encoding":"string"}' \ No newline at end of file
+ BENCHBOT_TARGET_REPO: ${{ github.repository }}
+ BENCHBOT_TARGET_COMMIT: ${{ steps.get-latest-commit.outputs.latest_commit_sha }}
+ 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'\" }","payload_encoding":"string"}' \ No newline at end of file