From 9e544bc39985b35fd96d8b6a5d1eeaf4a608dd05 Mon Sep 17 00:00:00 2001 From: Crozet Sébastien Date: Mon, 28 Sep 2020 14:05:46 +0200 Subject: Add a workflow for sending benchmark requests. --- .github/workflows/rapier-ci-bench.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 .github/workflows/rapier-ci-bench.yml (limited to '.github/workflows/rapier-ci-bench.yml') diff --git a/.github/workflows/rapier-ci-bench.yml b/.github/workflows/rapier-ci-bench.yml new file mode 100644 index 0000000..2d2745d --- /dev/null +++ b/.github/workflows/rapier-ci-bench.yml @@ -0,0 +1,20 @@ +name: Rapier CI bench + +on: + workflow_dispatch + +jobs: + send-bench-message: + runs-on: ubuntu-latest + steps: + - shell: bash + 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 }} + - name: Send 3D bench message + 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 -- cgit From 0691410b830f8f7028903c8da8d4542fa23d45fb Mon Sep 17 00:00:00 2001 From: Crozet Sébastien Date: Mon, 28 Sep 2020 14:11:36 +0200 Subject: Attemt to fix benchmark workflow. --- .github/workflows/rapier-ci-bench.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to '.github/workflows/rapier-ci-bench.yml') diff --git a/.github/workflows/rapier-ci-bench.yml b/.github/workflows/rapier-ci-bench.yml index 2d2745d..cef9b15 100644 --- a/.github/workflows/rapier-ci-bench.yml +++ b/.github/workflows/rapier-ci-bench.yml @@ -7,13 +7,13 @@ jobs: send-bench-message: runs-on: ubuntu-latest steps: - - shell: bash + - name: Send 3D bench message + shell: bash 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 }} - - name: Send 3D bench message 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 \ -- cgit From 94554f075ae354b9b2d15a51301fc15f23d45dc7 Mon Sep 17 00:00:00 2001 From: Crozet Sébastien Date: Mon, 28 Sep 2020 15:03:50 +0200 Subject: Add branch selector to the CI bench workflow. --- .github/workflows/rapier-ci-bench.yml | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) (limited to '.github/workflows/rapier-ci-bench.yml') 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 -- cgit