-
Notifications
You must be signed in to change notification settings - Fork 8
29 lines (23 loc) · 1.3 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
name: QuickMPC Benchmark
on:
workflow_run:
workflows: ['Push CC, MC, BTS Image']
types:
- completed
jobs:
benchmark-test:
name: Benchmark test
runs-on: ubuntu-latest
# releaseタグがtriggerの時のみ走らせる
if: ${{ !startsWith(github.event.workflow_run.head_branch, 'main') }}
steps:
- name: checkout
uses: actions/checkout@v2
- name: decode secret key
run: echo ${{ secrets.RUNNER_SECRET_KEY }} | base64 -d > secret && chmod 600 secret
- name: mkdir ${{ github.run_number }}
run: ssh -oStrictHostKeyChecking=no ubuntu@${{ secrets.RUNNER_IP }} -i secret "mkdir ${{ github.run_number }}"
- name: clone QuickMPC
run: ssh ubuntu@${{ secrets.RUNNER_IP }} -i secret "cd ${{ github.run_number }} && git clone https://github.com/acompany-develop/QuickMPC"
- name: run benchmark
run: ssh ubuntu@${{ secrets.RUNNER_IP }} -i secret 'nohup bash -c "cd ${{ github.run_number }}/QuickMPC/benchmark_src && chmod +x benchmark_runner.sh && ./benchmark_runner.sh ${{ secrets.GCP_SERVICE_ACCOUNT_KEY }} ${{ secrets.GCP_PROJECT_ID }} ${{ github.run_number }} ${{ secrets.SLACK_CHANNEL_ID }} ${{ secrets.SLACK_API_TOKEN }} && sudo rm -r ~/${{ github.run_number }}" &> /home/ubuntu/log/runner-${{ github.run_number }}.log &'