Merge branch 'main' of https://github.com/premAI-io/benchmarks #44
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Update Benchmark | |
on: | |
push: | |
branches: ["main"] | |
paths: | |
- docs/llama2.md.template | |
workflow_dispatch: | |
jobs: | |
update-readme: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Code Repository | |
uses: actions/checkout@v3 | |
- name: Update Benchmark | |
run: | | |
sed "s|<LAST_UPDATE>|$(date -u +"%dth %B %Y")|g" docs/llama2.md.template > docs/llama2.md | |
sed -n '/^## A100 80GB Inference Bench:/,/^## M2 MAX 32GB Inference Bench:/p' docs/llama2.md | sed '$d' | awk '/^\*\*Performance Metrics:\*\*/{p=1; next} p; /^\*\*\(Data updated:/{exit}' > first_table.md | |
awk '/<LLAMA-GPU-TABLE>/{system("cat first_table.md"); next} 1' README.md.template > README.md | |
- name: Commit changes | |
run: | | |
git config --global user.email "actions@github.com" | |
git config --global user.name "GitHub Actions" | |
git add docs/llama2.md README.md | |
git commit -m "Update <LAST_UPDATE> placeholder in llama2.md and README.md" || true | |
- name: Push changes | |
uses: ad-m/github-push-action@master | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
branch: ${{ github.ref }} |