Run benchmark (200k pages+) #10
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 | |
git config --local user.email "[email protected]" | |
git config --local user.name "capjamesg" | |
git add performance.txt | |
git commit -m "Add build time for ${{ matrix.os }} - Python ${{ matrix.python-version }} ($(git rev-parse --short HEAD))" | |
git push |