Skip to content
This repository has been archived by the owner on Jun 6, 2024. It is now read-only.

Commit

Permalink
feat: run client and server on same ec2 instance
Browse files Browse the repository at this point in the history
  • Loading branch information
unw9527 committed May 1, 2024
1 parent a72b1d2 commit f98a255
Showing 1 changed file with 6 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,46 +41,39 @@ jobs:
AWS_ACCESS_KEY_ID: ${{ secrets.GROUP_1_S3_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.GROUP_1_S3_SECRET_ACCESS_KEY }}
SERVER_URL: http://localhost:3030
strategy:
matrix:
runner_type: ['server', 'benchmark']
steps:
- name: Clone Server
if: matrix.runner_type == 'server'
uses: actions/checkout@v4
with:
repository: cmu-db/15721-s24-cache1
ref: lkl/benchmark
- name: Build Server
if: matrix.runner_type == 'server'
run: cargo build --package storage-node --bin storage_node
- name: Run Server
if: matrix.runner_type == 'server'
run: |
cargo run --package storage-node --bin storage_node &
cargo run --package storage-node --bin storage_node & >> ~/server.log
- name: Return to Home
run: cd ~
- name: Clone Benchmark
if: matrix.runner_type == 'benchmark'
uses: actions/checkout@v4
with:
ref: cache1-same-ec2
- name: Build Benchmark driver
if: matrix.runner_type == 'benchmark'
run: cargo build
- name: Wait for server
if: matrix.runner_type == 'benchmark'
run: |
until curl --output /dev/null --silent --head --fail $SERVER_URL/heartbeat; do
printf '.'
sleep 5
done
- name: Run Benchmark
if: matrix.runner_type == 'benchmark'
run: cargo run
- name: Stop Server
if: matrix.runner_type == 'benchmark'
run: |
curl -X POST $SERVER_URL/shutdown
- name: Read server log
run: cat ~/server.log

stop-runner:
name: Stop self-hosted EC2 runner
Expand All @@ -102,4 +95,4 @@ jobs:
mode: stop
github-token: ${{ secrets.GROUP_1_GH_PERSONAL_ACCESS_TOKEN }}
label: ${{ needs.start-runner.outputs.server-label }}
ec2-instance-id: ${{ needs.start-runner.outputs.server-ec2-instance-id }}
ec2-instance-id: ${{ needs.start-runner.outputs.server-ec2-instance-id }}

0 comments on commit f98a255

Please sign in to comment.