Tweak smoketest params and add version benchmark action #1
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: Version Benchmarks | |
| on: | |
| # Manual trigger | |
| workflow_dispatch: | |
| # Daily at 3am UTC | |
| schedule: | |
| - cron: '0 3 * * *' | |
| # Triggered from lmdbjava/lmdbjava repository | |
| repository_dispatch: | |
| types: [lmdbjava-release, lmdbjava-commit] | |
| # Also run when benchmark scripts change | |
| push: | |
| branches: [master] | |
| paths: | |
| - '.github/workflows/version-benchmarks.yml' | |
| - 'run-vers.sh' | |
| - 'report-vers.sh' | |
| jobs: | |
| benchmark: | |
| name: Run Version Regression Benchmarks | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 120 | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v5 | |
| - name: Set up JDK | |
| uses: actions/setup-java@v5 | |
| with: | |
| java-version: '25' | |
| distribution: 'temurin' | |
| cache: maven | |
| - name: Build benchmarks JAR | |
| run: mvn -B clean package -DskipTests | |
| - name: Install dependencies for report generation | |
| run: sudo apt-get update && sudo apt-get install -y gnuplot jq | |
| - name: Run version regression benchmarks (smoketest mode) | |
| run: ./run-vers.sh smoketest | |
| timeout-minutes: 60 | |
| - name: Generate version regression report | |
| run: ./report-vers.sh | |
| - name: Add deployment timestamp | |
| run: | | |
| echo "<p style='text-align: center; color: #666; font-size: 0.9em; margin-top: 2em;'>Last updated: $(date -u '+%Y-%m-%d %H:%M:%S UTC')</p>" >> target/benchmark/README.md | |
| - name: Deploy to Cloudflare Pages | |
| uses: cloudflare/pages-action@v1 | |
| with: | |
| apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} | |
| accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} | |
| projectName: lmdbjava-version-benchmarks | |
| directory: target/benchmark | |
| gitHubToken: ${{ secrets.GITHUB_TOKEN }} | |
| branch: main | |
| - name: Upload benchmark artifacts (backup) | |
| uses: actions/upload-artifact@v4 | |
| if: always() | |
| with: | |
| name: version-benchmark-results-${{ github.run_number }} | |
| path: target/benchmark/ | |
| retention-days: 90 | |
| - name: Comment deployment URL on manual trigger | |
| if: github.event_name == 'workflow_dispatch' | |
| uses: actions/github-script@v7 | |
| with: | |
| script: | | |
| const runUrl = `${context.serverUrl}/${context.repo.owner}/${context.repo.repo}/actions/runs/${context.runId}`; | |
| console.log(`Deployment triggered manually. Check deployment at: https://version-benchmark.lmdbjava.org`); | |
| console.log(`Workflow run: ${runUrl}`); |