Update benchmark.yml #12
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: Run benchmark (200k pages+) | |
on: workflow_dispatch | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: ["ubuntu-latest", "macos-latest"] | |
python-version: ["3.12"] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
cache: 'pip' | |
- name: Install dependencies | |
run: | | |
python3 -m pip install --upgrade pip | |
pip install -e . | |
git clone https://github.com/capjamesg/aurora-hn-benchmark | |
- name: Build main site | |
env: | |
SITE_ENV: ${{ secrets.SITE_ENV }} | |
run: | | |
cd aurora-hn-benchmark | |
{ time aurora build; } 2> time_output.txt | |
echo "${{ matrix.os }} - Python ${{ matrix.python-version }}" > performance.txt | |
echo "Commit: $(git rev-parse HEAD)" >> time_taken.txt | |
cat time_output.txt | grep real | awk '{print $2}' >> performance.txt | |
echo "---" >> performance.txt | |
cp performance.txt .. | |
- name: Commit changes | |
- uses: EndBug/add-and-commit@v9 | |
with: | |
author_name: capjamesg | |
author_email: [email protected] | |
message: 'add performance data' | |
add: "performance.txt" |