Merge pull request #30 from codegen-sh/codegen-cg-18917-fix-build #50
This file contains hidden or 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: Outline Benchmarks | |
| on: | |
| schedule: | |
| # Run benchmarks daily at 2 AM UTC | |
| - cron: '0 2 * * *' | |
| workflow_dispatch: | |
| # Allow manual triggering | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - 'benchmarks/**' | |
| - '.github/workflows/benchmark.yml' | |
| jobs: | |
| benchmark: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Set up Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: '3.12' | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v3 | |
| with: | |
| version: "latest" | |
| - name: Install dependencies | |
| run: | | |
| uv sync --all-extras | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Configure Git | |
| run: | | |
| git config --global user.name "Benchmark Bot" | |
| git config --global user.email "[email protected]" | |
| - name: Run benchmarks | |
| run: | | |
| uv run python benchmarks/scripts/auto_publish.py --run-benchmark | |
| env: | |
| DOCKER_HOST: unix:///var/run/docker.sock | |
| - name: Generate summary report | |
| run: | | |
| uv run python benchmarks/scripts/auto_publish.py --generate-summary | |
| - name: Commit and push results | |
| run: | | |
| git add benchmarks/results/ | |
| if ! git diff --cached --quiet; then | |
| git commit -m "📊 Automated benchmark results - $(date '+%Y-%m-%d %H:%M:%S')" | |
| git push | |
| else | |
| echo "No new benchmark results to commit" | |
| fi | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Upload benchmark artifacts | |
| uses: actions/upload-artifact@v4 | |
| if: always() | |
| with: | |
| name: benchmark-results | |
| path: benchmarks/results/ | |
| retention-days: 30 |