Skip to content

Commit

Permalink
chore: save commit url directly into benchmark result (#256)
Browse files Browse the repository at this point in the history
* chore: save commit url directly into benchmark s3 file

* chore: switch to bigger ubuntu runner for vm tests
  • Loading branch information
jonathanpwang authored Aug 3, 2024
1 parent a4d45e6 commit d054a47
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 12 deletions.
12 changes: 2 additions & 10 deletions .github/workflows/benchmark-call.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,19 +85,12 @@ jobs:
- name: Get previous benchmark value
id: get-previous-benchmark
run: |
git fetch origin main
main_sha=$(git rev-parse origin/main)
echo "Main branch SHA: $main_sha"
echo "main_sha=${main_sha}" >> $GITHUB_ENV
s5cmd cp "${{ env.S3_PATH }}/main-${{ inputs.benchmark_name }}.md" results.md
previous_result="$(<results.md)"
commit_url="https://github.com/${{ github.repository }}/commit/${main_sha}"
echo 'previous-benchmark<<EOF' >> $GITHUB_ENV
echo '# Previous Benchmark' >> $GITHUB_ENV
echo "${commit_url}" >> $GITHUB_ENV
echo "${previous_result}" >> $GITHUB_ENV
echo 'EOF' >> $GITHUB_ENV
Expand All @@ -107,21 +100,20 @@ jobs:
current_sha=$(git rev-parse HEAD)
echo "Current SHA: $current_sha"
echo "current_sha=${current_sha}" >> $GITHUB_ENV
commit_url="https://github.com/${{ github.repository }}/commit/${current_sha}"
RESULT_PATH=benchmark/tmp/_result.md
echo "" >> $RESULT_PATH
echo "Commit: ${commit_url}" >> $RESULT_PATH
echo "AWS Instance Type: [${{ inputs.aws_instance_type }}](https://instances.vantage.sh/aws/ec2/${{ inputs.aws_instance_type }})" >> $RESULT_PATH
echo "[Benchmark Workflow](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }})" >> $RESULT_PATH
s5cmd cp $RESULT_PATH "${{ env.S3_PATH }}/${current_sha}-${{ inputs.benchmark_name }}.md"
new_result="$(<${RESULT_PATH})"
echo "${new_result}"
commit_url="https://github.com/${{ github.repository }}/commit/${current_sha}"
echo 'new-benchmark<<EOF' >> $GITHUB_ENV
echo "# New Benchmark" >> $GITHUB_ENV
echo "${commit_url}" >> $GITHUB_ENV
echo "${new_result}" >> $GITHUB_ENV
echo 'EOF' >> $GITHUB_ENV
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/recursion.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ env:

jobs:
tests:
runs-on: ubuntu-latest
runs-on: ubuntu-latest-64core-256ram

steps:
- uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/vm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ env:

jobs:
tests:
runs-on: ubuntu-latest
runs-on: ubuntu-latest-64core-256ram

steps:
- uses: actions/checkout@v4
Expand Down

0 comments on commit d054a47

Please sign in to comment.